22
Difference Equations Weijie Chen Department of Political and Economics Studies University of Helsinki 16 Aug, 2011 Contents 1 First Order Difference Equation 2 1.1 Iterative Method ......................... 2 1.2 General Method ......................... 4 1.2.1 One Example ....................... 6 2 Second-Order Difference Equation 7 2.1 Complementary Solution ..................... 7 2.2 Particular Solutions ....................... 9 2.3 One Example ........................... 9 3 p th -Order Difference Equation 10 3.1 Iterative Method ......................... 11 3.2 Analytical Solution ........................ 13 3.2.1 Distinct Real Eigenvalues ................ 14 3.2.2 Distinct Complex Eigenvalues .............. 19 3.2.3 Repeated Eigenvalues .................. 20 4 Lag Operator 20 4.1 p th -order difference equation with lag operator ........ 21 5 Appendix 21 5.1 MATLAB code .......................... 21 1

Difference Equation

Embed Size (px)

DESCRIPTION

Difference equations for economists.

Citation preview

Page 1: Difference Equation

Difference Equations

Weijie Chen

Department of Political and Economics Studies

University of Helsinki

16 Aug, 2011

Contents

1 First Order Difference Equation 21.1 Iterative Method . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 General Method . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.1 One Example . . . . . . . . . . . . . . . . . . . . . . . 6

2 Second-Order Difference Equation 72.1 Complementary Solution . . . . . . . . . . . . . . . . . . . . . 72.2 Particular Solutions . . . . . . . . . . . . . . . . . . . . . . . 92.3 One Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 pth-Order Difference Equation 103.1 Iterative Method . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2.1 Distinct Real Eigenvalues . . . . . . . . . . . . . . . . 143.2.2 Distinct Complex Eigenvalues . . . . . . . . . . . . . . 193.2.3 Repeated Eigenvalues . . . . . . . . . . . . . . . . . . 20

4 Lag Operator 204.1 pth-order difference equation with lag operator . . . . . . . . 21

5 Appendix 215.1 MATLAB code . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1

Page 2: Difference Equation

Abstract

Difference equations are close cousin of differential equations, theyhave remarkable similarity as you will soon find out. So if you havelearned differential equations, you will have a rather nice head start.Conventionally we study differential equations first, then differenceequations, it is not simply because it is better to study them chronolog-ically, it is mainly because diffence equations has a naturally strongerbond with computational science, sometimes we even need to studyhow to make a differential equation into its discrete version-differenceequation-since which can be simulated by MATLAB. Difference equa-tions are always the first lesson of any advanced time series anal-ysis course, difference equation largely overshadows its econometricbrother, lag operation, that is because difference equation can be ex-pressed by matrix, which tremendously increase it power, you will seeits shockingly powerful application of space-state model and Kalmanfilter.

1 First Order Difference Equation

Difference equations emerge because we need to deal with discrete timemodel, which is more realistic when we study econometrics, time seriesdatasets are apparently discrete. First we will discuss about iterative mathod,which is almost the topic of first chapter of every time series textbook. Inpreface of Ender (2004)[5],‘In my experience, this material (difference equa-tion) and a knowledge of regression analysis is sufficient to bring students tothe point where they are able to read the professional journals and embarkon a serious applied study.’ Although I do not full agree with his optimism,I do concur that the knowledge of difference equation is the key to all furtherstudy of time series and advanced macreconomic theory.

A simple difference equation is a dynamic model, which describes thetime path of evolution, highly resembles the differential equations, so itssolution should be a function of t, completed free of yt+1−yt, a time instantt can exactly locate the position of its variable.

1.1 Iterative Method

This method is also called recursive substitution, basically it means if youknow the y0, you know y1, and rest of yt can be expressed by a recursiverelation. We start with a simple example which appears in very time seriestextbook,

yt = ayt−1 + wt (1)

2

Page 3: Difference Equation

where

w =

w0

w1...wt

.w is a determinstic vector, later we will drop this assumption when westudy stochastic difference equations, but for the time being and simplicity,we assume w nonstochastic yet.

Notice that

y0 = ay−1 + w0

y1 = ay0 + w1

y2 = ay1 + w2

...

yt = ayt−1 + wt

Assume that we know y−1 and w. Thus, substitute y0 into y1,

y1 = a(ay−1 + w0) + w1 = a2y−1 + aw0 + w1

Now we have y1, follow this procedure, substitute y1 into y2,

y2 = a(a2y−1 + aw0 + w1) + w2 = a3y−1 + a2w0 + aw1 + w2

Again, substitute y2 into y3,

y3 = a(a3y−1 + a2w0 + aw1 + w2) + w3

= a4y−1 + a3w0 + a2w1 + aw2 + w3

I trust you are able to perceive the pattern of the dynamics,

yt = at+1y−1 +

t∑i=0

aiwt−i

Actually what we have done is not the simplest version of differenceequation, to show your the outrageously simplest version, let us run throughnext example in a lightning fast speed. A homogeneous difference equation1,

myt − nyt−1 = 0

1 If this is first time you hear about this, refer to my notes of differential equation[2].

3

Page 4: Difference Equation

To rearrange it in a familiar manner,

yt =

(n

m

)yt−1

As the recurisve methods implies, if we have an intial value y02, then

y1 =

(n

m

)y0

y2 =

(n

m

)y1

. . .

yt =

(n

m

)yt−1

Substitute y1 into y2,

y2 =

(n

m

)(n

m

)y0 =

(n

m

)2

y0

Then substitute y2 into y3,

y3 =

(n

m

)(n

m

)2

y1 =

(n

m

)3

y0

Well the pattern is clear, and solution is

yt =

(n

m

)t

y0

If we denote (n/m)t as bt and y0 as A, it becomes Abt, this is the counterpartof solution of first order differential equation Aert. They both play thefundamental role in solving differential or difference equations. Notice thatthe solution is a function of t, here only t is a varible, y0 is an initial valuewhich is a known constant.

1.2 General Method

As you no doubt have guess the general solution will difference equation willalso be the counterpart of its differential version.

y = yp + yc

where yp is the particular solution and yc is the comlementary solution3.

2 For sake of mathematical convenience, we assume initial value y0 rather than y−1

this time, but the essence is identical.3 All these terminology is full explained in my notes of differential equations.

4

Page 5: Difference Equation

The process will be clear with the help of an example,

yt+1 + ayt = c

We follow the standard procedure, we will find the complementary solutionfirst, which is the solution of the according homogeneous difference equation,

yt+1 + ayt = 0

With the knowledge of last section, we can try a solution of Abt, when Isay ‘try’ it does not mean we just randomly guess, because we don’t needto perform the crude iterative method every time, we can make use of thesolution of previously solved equation, so

yt+1 + ayt = Abt+1 + aAbt = 0,

Cancel the common factor,

b+ a = 0

b = −a

If b = −a, this solution will work, so the complementary solution is

yc = Abt = A(−a)t

Next step, find the particular solution of

yt+1 + ayt = c.

The most intreguing thing comes, to make the equation above hold, we canchoose any yt to satisfy it. Might to your surprise, we can even choose yt = kfor −∞ < t <∞, which is just a constant time series, every period we havethe same value k. So

k + ak = c

k = yp =c

1 + a

You can easily notice that if we want to make this solution work, thena 6= −1. Then the question we ask will simply be, what if a = −1? Ofcourse it is not define, we have to change the form of the solution, here weuse yt = kt which is similar to the one we used in differential equation,

(k + 1)t+ akt = c

k =c

t+ 1 + at,

5

Page 6: Difference Equation

because a = −1,

k = c,

But this time yp = kt, so yp = ct, still it is a function of t.Add yp and yc together,

yt = A(−a)t +c

1 + aif a 6= −1 (2)

yt = A(−a)t + ct if a = −1 (3)

Last, of course you can solve A if you have an initial condition, say yt = y0,and a 6= −1,

y0 = A+c

1 + aA = y0 −

c

1 + a

If a = 1,y0 = A(−a)0 + 0 = A

Then just plug them back to the according solution (2) and (3).

1.2.1 One Example

Solveyt+1 − 2yt = 2

First solve the complementary equation,

yt+1 − 2yt = 0

use Abt,

Abt+1 − 2Abt = 0

b− 2 = 0

b = 2

So, complementary solution,

yc = A(2)t

To find particular solution, let yt = k for −∞ < t <∞,

k − 2k = 2

k = yp = −2

So the general solution,

yt = yp + yc = −2 + 2tA

6

Page 7: Difference Equation

If we are given an initial value, y0 = 4,

4 = −2 + 20A

A = 6

then the definite solution is

yt = −2 + 6 · 2t

2 Second-Order Difference Equation

Second order difference equation is that an equation involves ∆2yt, which is

∆(∆yt) = ∆(yt+1 − yt)∆2yt = ∆yt+1 −∆yt

∆2yt = (yt+2 − yt+1)− (yt+1 − yt)∆2yt = yt+2 − 2yt+1 + yt

We define a linear second-order difference equation as,

yt+2 + a1yt+1 + a2yt = c

But we better not use iterative method to mess with it, trust me, it is moreconfusing then illuminating, so we come straightly to the general solution.As we we have studied by far, the general solution is the addition of thecomplementary solution and particular solution, we will talk about themnext.

2.1 Complementary Solution

As interestingly as differential equation, we have several situations to discuss.So first we try to solve the complementary equation, some textbook mightcall this reduced equation, it is simply the homogeneous version of the orginalequation,

yt+2 + a1yt+1 + a2yt = 0

We learned from first-order difference equation that homogeneous differenceequation has a solution form of yt = Abt, we try it,

Abt+2 + a1Abt+1 + a2Ab

t = 0

(b2 + a1b+ a2)Abt = 0

We assume that Abt is nonzero,

b2 + a1b+ a2 = 0

7

Page 8: Difference Equation

This is our characteristic equation, same as we had seen in differential equa-tion, high school math can sometime bring us a little fun,

b =−a1 ±

√a21 − 4a2

2

I guess you are much familiar with it in textbook form, if we have a qudracticeqution x2 + bx+ c = 0,

x =−b±

√b2 − 4ab

2a

The same as we did in second-order differential equations, now we have threecases to discuss.

Case I a21 − 4a2 > 0 Then we have two distinct real roots, and thecomplementary solution will be

yc = A1bt1 +A2b

t2

Note that, A1bt1 and A2b

t2 are linearly independent, we can’t only use one of

them to represent complementary solution, because we need two constantsA1 and A2.

Case II a21 − 4a2 = 0 Only one real root is available to us.

b = b1 = b2 = −a12

Then the complementary solution collapses,

yc = A1bt +A2b

t = (A1 +A2)bt

We just need another constant to fill the position, say A4,

yc = A3bt +A4tb

t

where A3 = A1 + A2, and tbt is just old trick we have similiarly used indifferential equation, which we used tert.

Case III a21 − 4a2 < 0 Complex numbers are our old friends, we needto make use of them again here.

b1 = α+ iβ

b2 = α− iβ

where α = −a12 , β =

√4a2−a212 . Thus,

yc = A1(α+ iβ)t +A2(α− iβ)t

Here we simply need to make use of De Moivre’s theorem,

yc = A1 ‖b1‖t [cos (tθ) + i sin (tθ)] +A2 ‖b2‖t [cos (tθ)− i sin (tθ)]

8

Page 9: Difference Equation

where ‖b1‖ = ‖b2‖, because

‖b1‖ = ‖b2‖ =√α2 + β2

Thus,

yc = A1 ‖b‖t [cos (tθ) + i sin (tθ)] +A2 ‖b‖t [cos (tθ)− i sin (tθ)]

= ‖b‖t {A1[cos (tθ) + i sin (tθ)] +A2[cos (tθ)− i sin (tθ)]}= ‖b‖t [(A1 +A2) cos (tθ) + (A1 −A2)i sin (tθ)

= ‖b‖t [A5 cos (tθ) +A6 sin (tθ)]

2.2 Particular Solutions

We pick any yp to satisfy

yt+2 + a1yy+1 + a2yt = c

The simplest case is to choose yt+2 = yt+1 = yt = k, thus

k + a1k + a2k = c, and k =c

1 + a1 + a2

But we have to make sure that a1 + a2 6= −1. If a1 + a2 = −1 happens wewill use choose yp = kt, and following this pattern there will be kt2, kt3, etcto choose depending on the situation we have.

2.3 One Example

Solveyt+2 − 4yy+1 + 4yt = 7

First, complementary solution, its characteristic equation is

b2 − 4b+ 4 = 0

(b+ 2)(b− 2) = 0

The complementary solution is

yc = A1b21 +A2b

−22

For particular solution, we try yt+2 = yt+1 = yt = k, then

k − 4k + 4k = 7, which is k = 7

Then the general solution is

y = yc + yp = A12t −A2(−2)t + 7

9

Page 10: Difference Equation

And we have two initial conditions, y0 = 1 and y1 = 3,

y0 = A1 −A2 + 7 = 1

y1 = 2A1 + 2A2 + 7 = 3

Solve forA1 = −4 A2 = 2

Difinite solution is

y = yc + yp = −4 · 2t − 2(−2)t + 7

3 pth-Order Difference Equation

Previous sections are simply teaching your to solve the low order differenceequations, no much of insight and difficulty. From this section on, difficultyincreases significantly, for those of you who do not prepare linear algebrawell enough, it might not be a good idea to study this section in a hurry.Every mathematics is built on another, it is not quite possible to progressin jumps. And one warning, as the mathematics is becoming deeper, thenotation is also becoming complicated. However, don’t get dismayed, thisis not rocket science.

We generalize our difference equation into pth-Order,

yt = a1yt−1 + a2yt−2 + · · ·+ apyt−p + ωt (4)

This is actually a generalization of (1), we need to set ω here in order toprepare for stochastic difference equations. It is a conventional that wediffence backwards when deal with high orders. But here we still take itas constant. We can’t handle this difference equation in this form since itdoesn’t leave us much of room to perform any useful algebraic operation.Even if you try to use old method, its characteristic equation will be

bt − a1bt−1 − a2bt−2 · · ·+ apbt−p = 0,

factor out bt−p,bp − a1bp−1 − a2bp−2 · · · ap = 0

If the p is high enough make you have headache, it means this isn’t the rightway to advance.

Everything will be reshaped into its matrix form, define

ψt =

ytyt−1

yt−2...

yt−p+1

10

Page 11: Difference Equation

which is a p× 1 vector. And define

F =

a1 a2 a3 · · · ap−1 ap1 0 0 · · · 0 00 1 0 · · · 0 0...

...... · · ·

......

0 0 0 · · · 1 0

Finally, define

vt =

ωt

00...0

Put them together, we have new vector form first-order difference equation,

ψt = Fψt−1 + vt

you will see what is ψt−1 in next explicit form,ytyt−1

yt−2...

yt−p+1

=

a1 a2 a3 · · · ap−1 ap1 0 0 · · · 0 00 1 0 · · · 0 0...

...... · · ·

......

0 0 0 · · · 1 0

yt−1

yt−2

yt−3...

yt−p

+

ωt

00...0

The first equation is

yt = a1yt−1 + a2yt−2 + · · ·+ apyt−p + ωt

which is exactly (4). And it is quite obvious for you that from second to pth

equation is simple a yi = yi form. The reason that we write it like this isnot obvious till now, but one reason is that we reduce the system down toa first-order difference equation, although it is in matrix form, we can useold methods to analyse it.

3.1 Iterative Method

We list evolution of difference equations as follows,

ψ0 = Fψ−1 + v0

ψ1 = Fψ0 + v1

ψ2 = Fψ1 + v2...

ψt = Fψt−1 + vt

11

Page 12: Difference Equation

And we need to assume that ψ−1 and v0 are known. Then old tricks ofrecursive substitution,

ψ1 = F (Fψ−1 + v0) + v1

= F 2ψ−1 + Fv0 + v1

Again,

ψ2 = Fψ1 + v2

= F (F 2ψ−1 + Fv0 + v1) + v2

= F 3ψ−1 + F 2v0 + Fv1 + v2

Till step t,

ψt = F t+1ψ−1 + F tv0 + F t−1v1 + . . .+ Fvt−1 + vt

= F t+1ψ−1 +t∑

i=0

F ivt−i

which has explicit form,ytyt−1

yt−2...

yt−p+1

= F t+1

y−1

y−2

y−3...y−p

+ F t

ω0

00...0

+ F t−1

ω1

00...0

+ · · ·+ F

ωt−1

00...0

+

ωt

00...0

Note that how we use vi here. Unfortunatly, more notations are needed. We

denote the (1, 1) elelment of F t as f(t)11 , and so on so forth. We made these

notation in order to extract the first equation from above unwieldy system,thus

yt = f(t+1)11 y−1 + f

(t+1)12 y−2 + f

(t+1)13 y−3 + . . .+ f

(t+1)1p y−p

+ f(t)11 ω0 + f

(t−1)11 ω1 + . . .+ f11ωt−1 + ωt

I have to admit, most of time mathematics looks more difficult than itreally is, notation is evil, and trust me, more evil stuff you haven’t seenyet. However, keep on telling youself this is just the first equation of thesystem, nothing more. Because the idea is the same in matrix form, we aretold that we know ψ−1 and v0 as initial value. Here we just write them in aexplicit way, yt is a function of initial values from y−1 to y−p, and a sequenceof ωi. The scalar first-order difference equation need one initial value, andpth-order need p initial values. But if we turn it into vector form, it needone initial value again, which is ψ−1.

12

Page 13: Difference Equation

If you want, you can even take partial derivative to find dynamic multi-plier, say we find

∂yt∂ω0

= f(t)11

this measure one-unit increase in ω0, and is give by f(t)11 .

3.2 Analytical Solution

We need to study further about matrix F , because it is the core of thesystem, all information are hidden in this matrix. We’d better use a smallscale F to study the general pattern. Let’s set

F =

[a1 a21 0

]So the first equation of the system, we can write,

yt = a1yt−1 + a2yt−2 + ωt, or you might like, yt − a1yt−1 − a2yt−2 = ωt

It is your familiar form, a nonhomogenenous second-order difference equa-tion. And calculate its eigenvalue,∣∣∣∣a1 − λ a2

1 −λ

∣∣∣∣ = 0

Write determinant in algebraic form,

λ2 − a1λ− a2 = 0

We finally reveal the myth why we always solve a characteristic equationfirst, because we are finding it eigenvalues. In general the charactersticequal of pth-order difference equation will be,

λp − a1λp−1 − a2λp−2 − · · · − ap = 0 (5)

we of course can prove it by using |F − λI| = 0, but the process looksrather messy, the basic idea is to perform row operations to turn it intoupper triangle matrix, then the determinant is just the product of diagonalentries. Not much insight we can get from it, so we omit the process here.

In second order differential or difference equation, we usually discussthree cases of solution, two distinct roots (now you know they are eigen-values), one repeated root, complex roots. We have a root formula twocatagorize them b2 − 4ac, however, that is only used in second order, whenwe come to high orders, we don’t have anything like that. But it actuallymakes high orders more interesting than low ones, because we can use linearalgebra.

13

Page 14: Difference Equation

3.2.1 Distinct Real Eigenvalues

Distinct eigenvalue category here corresponds to two distinct real roots insecond order. It is becoming hardcore in following content, be sure you arewell-prepared in linear algebra.

If F has p distinct eigenvalues, you should be happy, because diagonal-ization is waving hands towards you. Recall that

A = PDP−1

where P is a nonsingular matrix, because distinct eigenvalues assure thatwe have linearly dependent eigenvectors. We need to make some cosmeticchange to suit our need,

F = PΛP−1

We use a capital Λ to indicate that all eigenvalues on the principle diagonal.You should naturally respond that

F t = PΛtP−1,

simply because,

F 2 = PΛP−1PΛP−1

= PΛΛP−1

= PΛ2P−1

Diagonal matrix shows its convenience,

Λt =

λt1 0 · · · 00 λt2 · · · 0...

.... . .

...0 0 · · · λtp

And unfortunately again, we need more notation, we denote tij to be theith row, jth column entry of P , and tij to be the ith row, jth column entryof P−1.

We try to write F t in explicit matrix form,

F t =

t11 t12 · · · t1pt21 t22 · · · t2p...

.... . .

...tp1 tp2 · · · tpp

λt1 0 · · · 00 λt2 · · · 0...

.... . .

...0 0 · · · λtp

t11 t12 · · · t1p

t21 t22 · · · t2p

......

. . ....

tp1 tp2 · · · tpp

=

t11λ

t1 t12λ

t2 · · · t1pλ

tp

t21λt1 t22λ

t2 · · · t2pλ

tp

......

. . ....

tp1λt1 tp2λ

t2 · · · tppλ

tp

t11 t12 · · · t1p

t21 t22 · · · t2p

......

. . ....

tp1 tp2 · · · tpp

14

Page 15: Difference Equation

Then f t11 isf t11 = t11t

11λt1 + t12t21λt2 + ·+ t1pt

p1λtp

if we denote ci = t1iti1, then

f t11 = c1λt1 + c2λ

t2 + ·+ cpλ

tp

Obviously if you pay attention to,

c1 + c2 + . . .+ cp = t11t11 + t12t

21 + . . .+ t1ptp1,

you would realize it is a scalar product, it is from the first row of P and firstcolumn of P−1. In other words, it is the first element of PP−1. Magically,PP−1 is an identity matrix. Thus,

c1 + c2 + . . .+ cp = 1

This time if you want to calculate dynamic multiplier,

∂yt∂ω0

= f(t)11

= c1λt1 + c2λ

t2 + ·+ cpλ

tp

the dynamic multiplier is a weighted average of all tth powered eigenvalues.Here one problem must be solved before we move on, how can we find

ci? Or is it just some unclosed form expression, we can stop here?What we do next might look very strange to you, but don’t stop and

finish it you will get a sense of what we are preparing here.Set ti to be the ith eigenvalue,

ti =

λp−1i

λp−2i...λ1i1

Then,

Fti =

a1 a2 a3 · · · ap−1 ap1 0 0 · · · 0 00 1 0 · · · 0 0...

...... · · ·

......

0 0 0 · · · 1 0

λp−1i

λp−2i...λ1i1

=

a1λ

p−1i + a2λ

p−2i + . . .+ ap−1λ

1i + ap

λp−1i

λp−2i...λ1i

15

Page 16: Difference Equation

Recall you have seen the characteristic equation of pth-order (5),

λp − a1λp−1 − a2λp−2 − · · · − ap−1λ− ap = 0

Rearange,λp = a1λ

p−1 + a2λp−2 + · · ·+ ap−1λ+ ap (6)

Interestingly, we get what we want here, the right-hand side of last equationis just the first element of Fti.

Fti =

λpiλp−1i

λp−2i...λ1i

We factor out a λi,

Fti = λi

λp−1i

λp−2i...λ1i1

= λiti

We have successfully showed that ti is the eigenvalue of F . Now we can setup a P , its every column is eigenvalue,

P =

λp−11 λp−1

2 · · · λp−1p

λp−21 λp−2

2 · · · λp−2p

......

. . ....

λ11 λ12 · · · λ1p1 1 · · · 1

Actually this is a transposed Vandermonde matrix, which is mainly madeuse of in signal processing and polynomial interpolation. Since we do notknow P−14yet. We use the notation of tij , we postmultiply P by the firstcolumn of P−1,

λp−11 λp−1

2 · · · λp−1p

λp−21 λp−2

2 · · · λp−2p

......

. . ....

λ11 λ12 · · · λ1p1 1 · · · 1

t11

t21

...tp1

=

10...00

4 Don’t ever try to calculate its inverse matrix by ajugate matrix or Gauss-Jordon

elimination by hands, it is very inaccurate and time consuming.

16

Page 17: Difference Equation

This is a linear equation system, solution will look like,

t11 =1

(λ1 − λ2)(λ1 − λ3) · · · (λ1 − λp)

t21 =1

(λ2 − λ2)(λ2 − λ3) · · · (λ2 − λp)...

tp1 =1

(λp − λ2)(λp − λ3) · · · (λp − λp)

Thus,

c1 = t11t11 =

λp−11

(λ1 − λ2)(λ1 − λ3) · · · (λ1 − λp)

c2 = t12t21 =

λp−12

(λ2 − λ1)(λ2 − λ3) · · · (λ2 − λp)...

cp = t1ptp1 =

λp−1p

(λp − λ2)(λp − λ3) · · · (λp − λp−1)

I know all this must been quite uncomfortable to you if you don’t fancymathematics too much. We’d better go through a small example to getfamiliar with these artilleries.

Let’s look at a second-order difference equation,

yt = 0.4yt−1 + 0.7yt−2 + ωt.

But I guess you would prefer to it like this,

yt+2 − 0.4yt+1 − 0.7yt = ωt+2.

Calculate its characteristic equation,

|F − λI| = 0,

which is

F − λI =

[0.4 0.71 0

]−[λ 00 λ

]=

[0.4− λ 0.7

1 −λ

]Now calculate its determinant,

F − λI = λ2 − 0.4λ− 0.7

17

Page 18: Difference Equation

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Figure 1: Dynamic multiplier as a function of t.

Use root formula,

λ1 =0.4 +

√(−0.4)2 − 4(−0.7)

2= 1.0602

λ2 =0.4−

√(−0.4)2 − 4(−0.7)

2= −0.6602

For ci,

c1 =λ1

λ1 − λ2=

1.0602

1.0602 + 0.6602= 0.6163

c2 =λ2

λ2 − λ1=

−0.6602

−0.6602− 1.0602= 0.3837

And note that 0.6163 + 0.3837 = 1. Dynamic multiplier is

∂yt∂ωt

= c1λt + c2λ

t = 0.6163 · 1.0602t + 0.3837 · (−0.6602)t

The figure 1 shows the dynamic multiplier as a function of t, MATLABcode is at the appendix. The dynamic multiplier will explode as t → ∞,because we have an eigenvalue λ1 > 1.

18

Page 19: Difference Equation

3.2.2 Distinct Complex Eigenvalues

We also need to talk about distinct complex eigenvalues, but the examplewill still resort to second-order difference equation, because we have a handyroot formula. The pace might be a little fast, but easily understandable.Suppose we have two complex eigenvalues,

λ1 = α+ iβ

λ2 = α− iβ

And modulus of the conjugate pair is the same,

‖λ‖ =√α2 + β2

Then rewritten conjugate pair as,

λ1 = ‖λ‖ (cos θ + i sin θ)

λ2 = ‖λ‖ (cos θ − i sin θ)

According to De Moivre’s theorem, to raise the power of complex number,

λt1 = ‖λ‖t (cos tθ + i sin tθ)

λt2 = ‖λ‖t (cos tθ − i sin tθ)

Back to dynamic multiplier,

∂yt∂ωt

= c1λt1 + c2λ

t2

= c1 ‖λ‖t (cos tθ + i sin tθ) + c2 ‖λ‖t (cos tθ − i sin tθ)

rearrange, we have

= (c1 + c2) ‖λ‖t cos tθ + i(c1 − c2) ‖λ‖t sin tθ

However, ci is calculated from λi, so since eigenvalues are complexe number,and so are ci’s. We can denote the conjugate pair as,

c1 = γ + iδ

c2 = γ − iδ

Thus,

c1λt1 + c2λ

t2 = [(γ + iδ) + (γ − iδ)] ‖λ‖t cos tθ + i[((γ + iδ)− (γ − iδ)] ‖λ‖t sin tθ

= 2γ ‖λ‖t cos tθ + i2iδ ‖λ‖t sin tθ

= 2γ ‖λ‖t cos tθ − 2δ ‖λ‖t sin tθ

it turns out real number again. And the time path is determined by modulus‖λ‖, if ‖λ‖ > |1|, the dynamic multiplier will explode, if ‖λ‖ < |1| dynamicmultiplier follow either a oscillating or nonoscillating decaying pattern.

19

Page 20: Difference Equation

3.2.3 Repeated Eigenvalues

If we have repeat eigenvalues, diagonalization might not be the choice, sincewe might encounter singular P . But since we have enough mathematicalartillery to use, we just switch to another kind of more general diagonaliza-tion, which is called the Jordon decomposition. Let’s give a definition first,a h× h matrix which is called Jordon block matrix, is defined as

Jh(λ) =

λ 1 0 · · · 00 λ 1 · · · 00 0 λ · · ·...

......

. . ....

0 0 0 · · · λ

This is a Jordon canonical form,5

The Jordon decomposition says, if we have a m×m matrix A, then theremust be a nonsingular matrix B such that,

B−1AB = J =

Jh1(λ1) (0) · · · (0)

(0) Jh2(λ2) · · · (0)...

.... . .

...(0) (0) · · · Jhr(λr)

Cosmetically change to our notation,

F = MJM−1

As you can imagine,F t = MJ tM−1

And

J t =

J t

h1(λ1) (0) · · · (0)

(0) J th2

(λ2) · · · (0)...

.... . .

...(0) (0) · · · J t

hr(λr)

What you need to do is just to calculate J t

hi(λi) one by one, of course we

should leave this to computer. Then you can calculate dynamic multiplier

as usual, once you figure out the F , then pick the (1, 1) entry f(t)11 the rest

will be done.

4 Lag Operator

In econometrics, the convention is to use lag operator to function as what wedid with difference equation. Essentially, they are the identical. But there

5 Study my notes of Linear Algebra and Matrix Analysis II [1].

20

Page 21: Difference Equation

is still some subtle conceptual discrepancy, difference equation is a kind ofequation, a balanced expression on both sides, but lag operator represents akind of operation, no different from addition, substraction or multiplication.Lag operator will turn a time series into a difference equation.

We conventionally use L to represent lag operator, for instance,

Lxt = xt−1 L2xt = xt−2

4.1 pth-order difference equation with lag operator

Basically this section is to reproduce the crucial results of what we did withdifference equation. We are trying to show you that we can reach the samegoal with the help of either difference equations or lag operators.

Turn this pth-order difference equation into lag operator form,

yt − a1yt−1 − a2yt−2 − · · · − apyt−p = ωt

which will be(1− a1L− a2L2 − · · · − apLp)yt = ωt

Because it is an operation in the equation above, some steps below mightnot be appropriate, but if we switch to

(1− a1z − a2z2 − · · · − apzp)yt = ωt,

we can use some algebraic operation to analyse it. Multiply both sides byz−p,

z−p(1− a1z − a2z2 − · · · − apzp)yt = z−pωt

(z−p − a1zz−p − a2z2z−p − · · · − apzpz−p)yt = z−pωt

(z−p − a1z1−p − a2z2−p − · · · − ap)yt = z−pωt

And define λ = z−1, and set the right-hand side zero,

λp − a1λp−1 − a2λp−2 − · · · − ap−1λ− ap = 0

This is the characteristic equation, reproduction of equation (6).to be finished!Actually the rest of reproduction has no insight at all,

simply technical manipulation to reproduce the same results as differenceequqation.

5 Appendix

5.1 MATLAB code

x=1:20;

y=y=0.6163*1.0602.^x+0.3837*(-0.6602).^x;

bar(x,y)

21

Page 22: Difference Equation

References

[1] Chen W. (2011): Linear Algebra and Matrix Analysis II, study notes

[2] Chen W. (2011): Differential Equations, study notes

[3] Chiang A.C. and Wainwright K.(2005): Fundamental Methods of Math-ematical Economics, McGraw-Hill

[4] Simon C. and Blume L.(1994): Mathematics For Economists,W.W.Norton & Company

[5] Enders W. (2004): Applied Econometric Time Series, John Wiley &Sons

22