You are on page 1of 36

Mathematics 2 : Difference Equations

Prepared by Dr Phil Stephenson (May 2013)

Differential equations may be used when time is assumed to be continuous. However, difference
equations may be used when time is assumed to be discrete (i.e. not continuous). For discrete
time t, then usually t can only take the values 0, 1, 2, 3, … (for example, if interest is added to a
bank account once a year). Difference equations are also known as recurrence relations.

First-Order Difference Equations


Consider a first-order difference equation of the form
yt = ayt – 1 + b ……………… (∆)
where a, b are constants. The difference between the lowest (t – 1) and highest (t) subscripts is
1, and so we know that we have a first-order difference equation.

The objective is to solve the equation (∆) to find an expression for yt in terms of t.

Solving a first-order difference equation


yt = ayt – 1 + b or yt + 1 = ayt + b (a ≠ 1)
General Solution: yt = y* + (y0 – y*)at if first term is y0
yt = y* + (y1 – y*)at – 1 if first term is y1
b
where y* = (y* = time-independent solution)
1− a

Please don’t remember the expression for y*, since, as you will see in the following example, y*
is very easy to find directly from the given equation.

5
(Ex 1) Solve the equation yt + 1 = 5yt + 6 if y0 = , and describe the long-term behaviour.
2

(Solution)
yt + 1 = ayt + b, where a = 5 and b = 6.
3
Let y* = yt + 1 = yt. Then, y* = 5y* + 6 ∴ 4y* = –6 ∴ y* = –
2

General solution: yt = y* + (y0 – y*)at


5 3 5 3 3
y0 = . So, the complete solution is yt = – +  +  (5)t ∴ yt = – + 4(5)t
2 2 2 2 2

Behaviour: 5 > 1, so (5)t → ∞, so yt → ∞, increasing exponentially and diverging.


***************************************************************

Page 1 of 36
Mathematics 2 : Difference Equations

Long-Term Behaviour of Solution


The solution to a differential or difference equation might be referred to as the time path if the
equation is a function of time t. The following descriptions of behaviour apply to first-order
difference equations, but also help a bit with second-order difference equations.

b
If the solution is of the form yt = y* + (y0 – y*)at where y* = , then the behaviour of yt
1− a
depends only on the constant a, for large values of t.

Value of a Behaviour of at as t → ∞ Behaviour of yt = y* + (y0 – y*)at as t → ∞


a>1 at → ∞ (increasing) yt → ∞ if y0 – y* > 0 or yt → –∞ if y0 – y* < 0
0<a<1 at → 0 (decreasing) yt → y*
at → 0 (oscillating with
–1 < a < 0 yt → y* (with decreasing oscillation)
decreasing magnitude)
(–1) = ±1 (oscillating with
t
Graph oscillates with uniform magnitude
a = –1
uniform magnitude) between y* – (y0 – y*) and y* + (y0 – y*)
a → ±∞ (oscillating with
t
a < –1 yt → ±∞ (with increasing oscillation about y*)
increasing magnitude)

The following graphs illustrate the behaviour of at as t → ∞. Strictly speaking, we should not
join up the points since t is discrete (i.e. t = 0, 1, 2, …). However, in practice, we normally just
produce a smooth curve. However, I do not expect you to be asked to sketch the graph of the
solution to a difference equation in this course.

at at
1 0<a<1

1 a>1

0 t 0 t

at at
1 –1 < a < 0 a < –1

0 t 0 t

Page 2 of 36
Mathematics 2 : Difference Equations

(Ex 2) Suppose that a savings account pays interest annually at the rate of 5% p.a. An investor
deposits an amount $P and, at the end of each year for the next 12 years, withdraws $300
from the account. Let yt be the amount in the account at the end of t years.

(a) Create a first-order difference equation involving yt and yt – 1, and solve it.

(b) Given that the balance in the account is zero at the end of the 12 years, find P.

(Solution)
(a) yt = the amount at the end of year t
y0 = P

Each year, yt is increased by 5%, and then decreased by 300.


∴ y1 = y0 + (5% of y0) – 300 = 1.05y0 – 300
Similarly, y2 = y1 + (5% of y1) – 300 = 1.05y1 – 300
In general,
yt = (1.05)yt – 1 – 300

This is of the form yt = ayt – 1 + b, where a = 1.05 and b = –300.


Let y* = yt – 1 = yt. Then, y* = 1.05y* – 300 ∴ 0.05y* = 300 ∴ y* = 6000
General solution: yt = y* + (y0 – y*)at
Solution: yt = 6000 + (P – 6000)(1.05)t

(b) yt = 6000 + (P – 6000)(1.05)t and y12 = 0.


∴ 0 = 6000 + (P – 6000)(1.05)12
∴ (P – 6000)(1.05)12 = –6000
6000
∴ P – 6000 = –
(1.05)12
6000
∴ P = 6000 –
(1.05)12
∴ P = 6000[1 – (1.05)–12]
Hence, the initial deposit, $P, was approximately ${6000[1 – (1.05)–12]}
******************************************************************

Page 3 of 36
Mathematics 2 : Difference Equations

Cobweb Model
Suppose we have one commodity with a supply equation and a demand equation, but allow a
time-lag in the actions of the suppliers. By this, I mean that the model’s current supply depends
upon the previous period’s price.

Suppose the standard supply and demand equations are of the form
Supply: Qs = bP – a
Demand: Qd = c – dP

The cobweb equations, obtained from these standard equations, are


Supply: Qst = bPt – 1 – a
Demand: Qdt = c – dPt

If you have to write down the cobweb equations from the original equations, then remember to
replace P by Pt – 1 in the supply equation only.

These new time-dependent supply and demand equations form a cobweb model, so named
because the graph obtained by joining up the points (P0, Qd0), (P0 , Qs1), (P1 , Qd1), (P1 , Qs2),
(P2 , Qd2), … etc, produce a figure similar to a spiralling cobweb.

The time-independent equilibrium point (Q*, P*) is easily obtained by solving the equation
Qs = Qd, letting P* = Pt = Pt – 1 and Q* = Qt. In a cobweb model question, I suggest you find
(Q* , P*) first.

The next step is to solve the equation Qst = Qdt to find an expression for Pt in terms of t. When
you equate the supply and demand cobweb equations, you will obtain a first-order difference
equation. After you have solved this equation to find the time path of Pt, you should then use
the demand cobweb equation to find the time path of Qt.

Cobweb Stability
Let P* and Q* be the equilibrium price and quantity.

If Pt → P* as t → ∞ then Qt → Q* as t → ∞ and we have a stable cobweb.


That is, the graph will converge, in a spiralling cobweb, to the equilibrium point (Q*, P*).

If Pt → ±∞ as t → ∞ then Qt → ±∞ as t → ∞ and we have an unstable cobweb (also called


exploding cobweb). That is, the graph will explode in a spiralling cobweb (spiralling outwards).

However, it is possible to determine the cobweb stability just looking at the coefficients of P in
the supply and demand equations. You could remember the following conditions:

Page 4 of 36
Mathematics 2 : Difference Equations

Cobweb Stability

Suppose the cobweb supply and demand equations are


Supply: Qst = bPt – 1 – a
Demand: Qdt = c – dPt

b
If <1 then the time path Pt converges, oscillating with decreasing
d
magnitude, so that Pt → P* as t → ∞. The cobweb is stable.

b
If =1 then the time path Pt oscillates uniformly.
d
The cobweb is not exploding or converging.

b
If >1 then the time path Pt explodes, oscillating with increasing
d
magnitude, so that Pt → ±∞ as t → ∞.
The cobweb explodes (unstable cobweb).

Cobweb Graph
(1) Draw the Qt-axis and Pt-axis (I usually put the Qt-axis horizontally).

(2) Draw the supply and demand (time-independent) lines, labelling these. Include the
values where these lines meet the axes.

(3) The supply and demand lines should intersect at the equilibrium point (Q*, P*).
Mark Q* and P* on the axes.

(4) The starting point of the cobweb graph is always on the demand line, corresponding to
P0, which you will be given. The cobweb graph is a continuous series of horizontal and
vertical lines, beginning with a horizontal line. The horizontal lines always end at the
supply line, while the vertical lines always end at the demand line. Put a directional
arrow on each line of the cobweb graph, unless the cobweb graph becomes too
congested.

If you have put Pt on the vertical axis, then


cobweb will converge to (Q*, P*) if the supply line is steeper than the demand line.
cobweb will oscillate uniformly if the supply and demand lines have the same gradient.
cobweb will explode if the demand line is steeper than the supply line.

Page 5 of 36
Mathematics 2 : Difference Equations

You may be asked to join the points (P0 , Qd0), (P0 , Qs1), (P1 , Qd1), (P1 , Qs2), (P2 , Qd2), … etc
on a two-dimensional graph. Note that Q1 = Qd1 = Qs1, and Q2 = Qd2 = Qs2, etc.
You would already have found equations for the time paths of Pt and Qt. Use these equations to
find P1, P2 and Q0, Q1, Q2 . For example, to find Q0, just put t = 0 in the equation for Qt.

Pt Supply

P0 Stable Cobweb

P*

P1
Demand

0 Q0 Q* Q1 Qt

Pt

Supply

P1 Exploding Cobweb

P*
P0

Demand

0 Q1 Q* Q0 Q2 Qt

(Ex 3) Comment on the stability of the cobweb model with supply and demand as follows:
Qst = 5Pt – 1 – 12
Qdt = 8 – 2Pt
(Solution)
b 5
Qst = bPt – 1 – 12 and Qdt = 8 – dPt where = > 1.
d 2

Hence, we have an exploding (unstable) cobweb.

*************************************************************

Page 6 of 36
Mathematics 2 : Difference Equations

(Ex 4) For t = 1, 2, 3, …, we are told that qt and pt satisfy the equations


qt = 40 – 12pt (derived from demand function)
qt = 15pt – 1 – 41 (derived from supply function)

The initial price is 2.5


Find expressions for pt and qt. How do pt and qt behave as t tends to infinity?

(Solution)
qt = 40 – 12pt ……………………… (1)
qt = 15pt – 1 – 41 …………………… (2)
Equating (1) and (2),
40 – 12pt = 15pt – 1 – 41
∴ 12pt = –15pt – 1 + 81
∴ pt = –1.25pt – 1 + 6.75 ……………… (∆)
(∆) is of the form pt = apt – 1 + b, where a = –1.25 and b = 6.75
Let p* = pt – 1 = pt. Then, p* = –1.25p* + 6.75 ∴ 2.25p* = 6.75 ∴ p* = 3
General solution: pt = p* + (p0 – p*)at and we are told that p0 = 2.5
Complete solution: pt = 3 + (2.5 – 3)(–1.25)t
1
∴ pt = 3 – (–1.25)t
2
1
From (1), qt = 40 – 12pt = 40 – 12[3 – (–1.25)t] = 40 – 36 + 6(–1.25)t = 4 + 6(–1.25)t
2
1
Hence, pt = 3 – (–1.25) and qt = 4 + 6(–1.25)t
t
2

Behaviour:
–1.25 < –1 and so (–1.25)t → ±∞ as t → ∞, oscillating with increasing magnitude about 0
Hence, pt → ±∞ as t → ∞, oscillating with increasing magnitude about pt = 3,
and qt → ±∞ as t → ∞, oscillating with increasing magnitude about qt = 4.

Both solutions diverge, and so both are unstable.


****************************************************************
Notes: (1) If pt = 7pt – 1 + 5, say, then pt + 1 = 7pt + 5, replacing t by t + 1.
(2) If the demand function is D(p) = 28 – 2p, say, then D(pt) = 28 – 2pt.

Page 7 of 36
Mathematics 2 : Difference Equations

(Ex 5)Suppose supply, QSt, for a particular product in year t depends upon the price, Pt – 1, in
the previous year, t – 1, as follows

QSt = g + hPt – 1 , with h > 0.

Suppose further that the demand, QDt, is a function of current year prices according to
QDt = c + bPt , with b < 0.

(a) Assuming market equilibrium, create and solve a first order difference equation in Pt.

(b) Given g = –30, c = 180, P0 = 220 show how the behaviour of the solution Pt depends
upon the parameters h and b and illustrate your answer with the particular cases of

(i) h = 0.3 , b = –0.75


(ii) h = 0.3 , b = –0.3
(iii) h = 0.3 , b = –0.1

(c) For (b)(i), draw a sketch graph of the solution series for Qt (= QSt = QDt) and Pt in order
to demonstrate why the model is often referred to as the cobweb model.

(Solution)
(a) The time-independent equilibrium occurs when
c−g
QS = QD ∴ g + hP = c + bP ∴ P(h – b) = c – g ∴ P* = ∴ Q* = g + hP*
h−b
c−g
Hence, the time-independent equilibrium occurs at P* = and Q* = g + hP*
h−b
The cobweb equations are
QSt = g + hPt – 1 …………………… (1)
QDt = c + bPt ……………………… (2)

Equilibrium occurs when


QSt = QDt
∴ g + hPt – 1 = c + bPt
∴ bPt = hPt – 1 + (g – c)
h g −c
∴ Pt = Pt – 1 + ………………. (∆)
b b

Page 8 of 36
Mathematics 2 : Difference Equations

h g −c
Pt = Pt – 1 + ……………………………… (∆)
b b

(∆) is a first-order difference equation in Pt .

t
h c−g
The solution of (∆) is Pt = P* + (P0 – P*)   , where P* =
b h−b

(b) Given: g = –30, c = 180, P0 = 220


t
h 210
The solution of (∆) is Pt = P* + (220 – P*)   , where P* =
b h−b

(i) h = 0.3 , b = –0.75


h 0. 3 210
= = 0.4 < 1 , P* = = 200
b 0.75 1.05

Pt = 200 + 20(–0.4)t
∴ Pt → P* = 200 as t → ∞, oscillating with decreasing magnitude.
Cobweb converges to (Q*, P*), i.e. (30, 200). Cobweb is stable.

(ii) h = 0.3 , b = –0.3


h 0. 3 210
= =1 , P* = = 350
b 0. 3 0. 6

Pt = 350 – 130(–1)t
∴ Pt oscillates uniformly about P* = 350.
Cobweb oscillates uniformly about (Q*, P*), i.e. (75, 350).
The cobweb is not converging or exploding.

(iii) h = 0.3 , b = –0.1


h 0. 3 210
= = 3 > 1 , P* = = 525
b 0. 1 0.4

Pt = 525 – 305(–3)t
(Q*, P*) = (127.5, 525). Cobweb explodes. Cobweb is unstable.
∴ Pt → ±∞ as t → ∞, oscillating with increasing magnitude about 525.

Page 9 of 36
Mathematics 2 : Difference Equations

(c) g = –30, c = 180, h = 0.3, b = –0.75


The cobweb equations are
QSt = –30 + 0.3Pt – 1
QDt = 180 – 0.75Pt ……………….. (3)
From (b)(i), Pt = 200 + 20(–0.4)t ……………… (4)
From (3), Qt = 180 – 0.75Pt (you can use this to evaluate Qt when t = 0, 1, 2)
= 180 – 0.75[200 + 20(–0.4)t] , from (4)
∴ t
Qt = 30 – 15(–0.4) ……………….. (5)

Using (4) and (5),


t = 0 : P0 = 220 , Q0 = 15
t = 1 : P1 = 192 , Q1 = 36
t = 2 : P2 = 203.2 , Q2 = 27.6
P* = 200, from (b)(i)
Q* = 180 – 0.75P* =180 – 150 = 30

QS = –30 + 0.3P
QD = 180 – 0.75P , where Q* = 30, P* = 200

Pt
Supply
240
P0 220 Stable Cobweb,
converging to (Q*, P*)
P2

P* 200

P1 192

100

Demand

0 15 30 36 180 Qt
Q0 Q2 Q* Q1

Page 10 of 36
Mathematics 2 : Difference Equations

Second-Order Difference Equations

In this course, we consider second-order difference equations of the form


ayt + 2 + byt + 1 + cyt = f(t) ………………….. (∆)
where a (≠ 0), b, c are constants, and f(t) is a function of t. Note that f(t) could be a constant.

The method of solving (∆), to find an expression for yt in terms of t, is similar to the method we
use to solve second-order differential equations.

The first step in solving (∆) to find yt, is to find the general solution of the corresponding
homogeneous equation:
ayt + 2 + byt + 1 + cyt = 0 …………………… (*)

If we try yt = mt, then yt + 1 = mt + 1 and yt + 2 = mt + 2.


Then, equation (*) becomes amt + 2 + bmt + 1 + cmt = 0.
Dividing by mt, we get am2 + bm + c = 0 …………………… auxiliary equation
Make sure the subscripts in the given equation are arranged in decreasing order. The coefficient
of the term with the highest subscript is the coefficient of m2 in the auxiliary equation.

We must solve the auxiliary equation for m.


There are three possible cases, depending on the discriminant term b2 – 4ac. Recall that b2 – 4ac
is the term inside the square root in the quadratic formula.

The general solution of (*) is also the complementary function for (∆).

You must remember the form of the complementary function for each of the three cases, as
given in the following table.

ayt + 2 + byt + 1 + cyt = f(t)


auxiliary equation : am2 + bm + c = 0
Complementary function (where A, B are constants)
2
b – 4ac > 0
yt = A(p)t + B(q)t
2 distinct real roots p, q
b2 – 4ac = 0
yt = (At + B)(r)t
1 distinct real root r
t
 c
yt =   [Acos(θt) + Bsin(θt)]

b2 – 4ac < 0  a 
2 complex roots  −b 
where θ = cos −1  
 2 ac 

Page 11 of 36
Mathematics 2 : Difference Equations
Choosing a Particular Solution

ayt + 2 + byt + 1 + cyt = f(t) …………………. (∆)


The RHS of (∆) might not be zero in the exam, so you must know how to choose the appropriate
form of the particular solution. The following table helps.

ayt + 2 + byt + 1 + cyt = f(t)


f(t) First Choice for Particular Solution
0 0
(non-zero constant) 5 or –9 D
(linear) 6t – 5 or –8t Dt + E
(quadratic) 5t2 + 6 or –2t2 Dt2 + Et + F
3(5)t D(5)t
3cos(5t) Dcos(5t) + Esin(5t)
3sin(5t) Dcos(5t) + Esin(5t)
2cos(5t) – 15sin(5t) Dcos(5t) + Esin(5t)

If any of the terms in your first choice of particular solution have the same form as any terms in
the complementary function, then you must modify your first choice of the particular solution by
multiplying each of the affected terms (i.e. terms in the same row as the troublesome term in
above table) in the particular solution by t.

Strategy for solving a second-order difference equation


ayt + 2 + byt + 1 + cyt = f(t) ………………….. (∆)

(1) Write down Auxiliary equation.


(2) Solve Auxiliary equation, or show that b2 – 4ac < 0.
(3) Use solution to Auxiliary equation to write down the Complementary function.
(4) Use f(t) to write down a Particular solution yt.
(5) Find yt + 1 and yt + 2 using Particular solution yt.
(6) Put yt, yt + 1, yt + 2 into (∆) to find unknown constant(s) in Particular solution.
(7) General solution of (∆) is yt = (Particular solution) + (Complementary function)
(8) If we are given the initial conditions y0 and y1, then
(i) Put initial conditions into General solution, to obtain two equations.
(ii) Solve these two equations simultaneously to find A and B.
(iii) Re-write general solution of (∆) with the values of A and B.

Page 12 of 36
Mathematics 2 : Difference Equations

(Ex 6) Solve the following difference equation given that y0 = 2 and y1 = 31.
yt + 2 + 5yt + 1 – 14yt = 0 ……………………. (∆)

(Solution)
Auxiliary equation: m2 + 5m – 14 = 0 ∴ (m + 7)(m – 2) = 0 ∴ m = –7 or m = 2
Complementary function: yt = A(–7)t + B(2)t

The RHS of (∆) is zero, so a particular solution is yt = 0

General solution: yt = PS + CF ∴ yt = A(–7)t + B(2)t ……. (GS)


y0 = 2, so A + B = 2, so 2A + 2B = 4 …………..………….. (1)
y1 = 31, so –7A + 2B = 31 ………………………………… (2)
(1) – (2): 9A = –27, so A = –3, so B = 2 + 3 = 5
The complete solution to (∆) is yt = –3(–7)t + 5(2)t [Note: You can’t simplify this]
***********************************************************************
(Ex 7) Solve the following difference equation given that y0 = 7 and y1 = 6.
yt + 2 – 5yt + 1 + 6yt = 12 ……………………………. (∆)

(Solution)
Auxiliary equation: m2 – 5m + 6 = 0
∴ (m – 2)(m – 3) = 0
∴ m = 2 or m = 3

Complementary function: yt = A(2)t + B(3)t

For a particular solution, try yt = D


From (∆), D – 5D + 6D = 12 ∴ 2D = 12 ∴ D = 6
Particular solution: yt = 6

General solution: yt = PS + CF ∴ yt = 6 + A(2)t + B(3)t ………… (GS)


y0 = 7, so 6 + A + B = 7, so A + B = 1, so 2A + 2B = 2 ………….... (1)
y1 = 6, so 6 + 2A + 3B = 6, so 2A + 3B = 0 ……………………….. (2)
(2) – (1): B = –2, so A = 1 + 2 = 3
Hence, the complete solution to (∆) is yt = 6 + 3(2)t – 2(3)t
***********************************************************************

Page 13 of 36
Mathematics 2 : Difference Equations

(Ex 8) Solve the following difference equation given that y0 = 6 and y1 = 10.
yt – 5yt – 1 + 6yt – 2 = 12t – 2
Check your answer by finding y2 using both the given equation and your answer.

(Solution)
yt – 5yt – 1 + 6yt – 2 = 12t – 2 ………………… (∆)
Auxiliary equation: m2 – 5m + 6 = 0
∴ (m – 2)(m – 3) = 0
∴ m = 2 or m = 3
Complementary function: yt = A(2)t + B(3)t

For a particular solution, try yt = Dt + E


From (∆), Dt + E – 5[D(t – 1) + E] + 6[D(t – 2) + E] = 12t – 2
∴ Dt + E – 5Dt + 5D – 5E + 6Dt – 12D + 6E = 12t – 2
∴ 2Dt – 7D + 2E = 12t – 2

Equating coefficients,
t terms: 2D = 12 ∴ D = 6
Constant terms: –7D + 2E = –2 ∴ 2E = 40 ∴ E = 20
Particular solution: yt = 6t + 20

General solution: yt = PS + CF ∴ yt = 6t + 20 + A(2)t + B(3)t ………….. (GS)


y0 = 6, so 20 + A + B = 6, so A + B = –14, so 2A + 2B = –28 …………..… (1)
y1 = 10, so 6 + 20 + 2A + 3B = 10, so 2A + 3B = –16 ……………………. (2)
(2) – (1): B = 12, so A = –14 – 12 = –26
Hence, the complete solution to (∆) is yt = 6t + 20 – 26(2)t + 12(3)t

Checking: (∆) ⇒ y2 – 5y1 + 6y0 = 12(2) – 2 ⇒ y2 – 50 + 36 = 24 – 2 ⇒ y2 = 36


Solution ⇒ y2 = 6(2) + 20 – 26(2)2 + 12(3)2 = 12 + 20 – 104 + 108 = 36
Although this does not prove that the solution is correct, we should feel fairly confident
that this is the case. To fully prove your solution is correct, you would have to confirm
that your solution satisfies the given equation.

*******************************************************************

Page 14 of 36
Mathematics 2 : Difference Equations

(Ex 9) Solve the following difference equation given that y0 = 5 and y1 = 11.
yt + 2 – yt + 1 – 12yt = –12(3)t …………… (∆)

(Solution)
Auxiliary equation: m2 – m – 12 = 0 ∴ (m + 3)(m – 4) = 0 ∴ m = –3 or m = 4
Complementary function: yt = A(–3)t + B(4)t
For a particular solution, try yt = D(3)t
From (∆), D(3)t + 2 – D(3)t + 1 – 12D(3)t = –12(3)t
∴ 9D – 3D – 12D = –12 ∴ –6D = –12 ∴ D = 2
Particular solution: yt = 2(3)t
General solution: yt = PS + CF ∴ yt = 2(3)t + A(–3)t + B(4)t ……. (GS)
y0 = 5, so 2 + A + B = 5, so A + B = 3, so 3A + 3B = 9 …………… (1)
y1 = 11, so 6 – 3A + 4B = 11, so –3A + 4B = 5 …………………… (2)
(1) + (2): 7B = 14, so B = 2, so A = 3 – 2 = 1
Hence, the complete solution to (∆) is yt = 2(3)t + (–3)t + 2(4)t
*******************************************************************
(Ex 10) Using yt = Dt for a particular solution,
solve the following difference equation given that y0 = 30 and y1 = 20.
yt + 2 – 3yt + 1 + 2yt = 12 …………… (∆)
(Solution)
Auxiliary equation: m2 – 3m + 2 = 0 ∴ (m – 1)(m – 2) = 0 ∴ m = 1 or m = 2
Complementary function: yt = A(1)t + B(2)t = A + B(2)t
For a particular solution, try yt = Dt (as instructed)
From (∆), D(t + 2) – 3D(t + 1) + 2Dt = 12
∴ Dt + 2D – 3Dt – 3D + 2Dt = 12 ∴ –D = 12 ∴ D = –12
Particular solution: yt = –12t
General solution: yt = PS + CF ∴ yt = –12t + A + B(2)t ………… (GS)
y0 = 30, so A + B = 30 ……………………………………………. (1)
y1 = 20, so –12 + A + 2B = 20, so A + 2B = 32 …………………… (2)
(2) – (1): B = 2, so A = 30 – 2 = 28
Hence, the complete solution to (∆) is yt = –12t + 28 + 2(2)t
*****************************************************************

Page 15 of 36
Mathematics 2 : Difference Equations

(Ex 11) Using yt = Dt2(4)t for a particular solution,


solve the following difference equation given that y0 = 3 and y1 = 36.
yt + 2 – 8yt + 1 + 16yt = 64(4)t

(Solution)
yt + 2 – 8yt + 1 + 16yt = 64(4)t ……………… (∆)
Auxiliary equation: m2 – 8m + 16 = 0
∴ (m – 4)(m – 4) = 0
∴ m=4
Complementary function: yt = (At + B)(4)t = At(4)t + B(4)t

For a particular solution, try yt = Dt2(4)t (as instructed)


From (∆),
D(t + 2)2(4)t + 2 – 8D(t + 1)2(4)t + 1 + 16Dt2(4)t = 64(4)t
∴ D[16(t2 + 4t + 4) – 32(t2 + 2t + 1) + 16t2] = 64
∴ D[16t2 + 64t + 64 – 32t2 – 64t – 32 + 16t2] = 64
∴ 32D = 64
∴ D=2
Particular solution: yt = 2t2(4)t

General solution: yt = PS + CF
∴ yt = 2t2(4)t + (At + B)(4)t
∴ yt = (2t2 + At + B)(4)t …………… (GS)

y0 = 3, so B = 3
y1 = 36, so 4(2 + A + B) = 36, so 2 + A + 3 = 9, so A = 4

Hence, the complete solution to (∆) is yt = (2t2 + 4t + 3)(4)t


***********************************************************************

Page 16 of 36
Mathematics 2 : Difference Equations

(Ex 12) Solve the following difference equation given that y0 = 6 and y1 = 15.
3yt – 6yt – 1 + 12yt – 2 = 7(3)t + 9 ………………… (∆)
(Solution)
Auxiliary equation: 3m2 – 6m + 12 = 0 ∴ m2 – 2m + 4 = 0 ∴ b2 – 4ac = 4 – 16 = –12 < 0

 −b   6  1 π 1
θ = cos −1   = cos −1   = cos −1   = , since cos(60°) =
 2 ac   2 36  2 3 2
t
 c
 
 a = ( 4) t
= (2)t
 
tπ tπ
Complementary function: yt = (2)t(Acos + Bsin )
3 3
For a particular solution, try yt = D(3)t + E
From (∆), 3D(3)t + 3E – 6D(3)t – 1 – 6E + 12D(3)t – 2 + 12E = 7(3)t + 9
Constant terms: 9E = 9 ∴ E = 1
Remaining terms: 3D(3)t – 6D(3)t – 1 + 12D(3)t – 2 = 7(3)t
4
∴ 3D – 2D + D = 7 ∴ 3D + 4D = 21 ∴ 7D = 21 ∴ D = 3
3

Particular solution: yt = 3(3)t + 1

General solution: yt = PS + CF
tπ tπ
∴ yt = 3(3)t + 1 + (2)t(Acos + Bsin ) ………….. (GS)
3 3
y0 = 6 ∴ 3 + 1 + A = 6 ∴ A = 2

1  3
y1 = 15 ∴ 9 + 1 + 2[2cos(60°) + Bsin(60°)] = 15 ∴ 2[2   + B  ] = 5

2  2 
∴ 2+ 3B =5 ∴ 3B = 3 ∴ B = 3

tπ tπ
Hence, the complete solution to (∆) is yt = 3(3)t + 1 + (2)t(2cos + 3 sin )
3 3
***********************************************************************

1 1
If θ = cos −1   , say, then your final answer must involve cos −1   , and it is possible to
4 4
evaluate the constants A and B, since we can use the identity cos (θ) + sin2(θ) = 1.
2

Page 17 of 36
Mathematics 2 : Difference Equations

(Ex 13) Solve the following difference equation given that y0 = 4 and y1 = 9.
yt – 2yt – 1 + 6yt – 2 = 15 ………………… (∆)

(Solution)
Auxiliary equation: m2 – 2m + 6 = 0 ∴ b2 – 4ac = 4 – 24 = –20 < 0

 −b   2   1  1
θ = cos −1   = cos −1   = cos −1   , in first quadrant since >0
 2 ac  2 6  6 6
t
 c
 
 a = ( 6) t

 

Complementary function: yt = ( 6 ) (Acos θt + Bsin θt), where θ = cos


t −1  1 
 
 6
For a particular solution, try yt = D
From (∆), D – 2D + 6D = 15 ∴ 5D = 15 ∴ D = 3
Particular solution: yt = 3

General solution: yt = PS + CF

∴ yt = 3 + ( 6 ) (Acos θt + Bsin θt) ……………… (GS)


t

y0 = 4 ∴ 3 + A = 4 ∴ A = 1
2
 1  1 5
cos2(θ) + sin2(θ) = 1, so sin2(θ) = 1 –   =1– = and sin(θ) > 0
 6 6 6
5
So sin(θ) =
6

y1 = 9 ∴ 3 + 6 [cos(θ) + Bsin(θ)] = 9

1 5
∴ 6[ +B ]=6
6 6

∴1+ 5B=6

∴ 5B=5

∴ B= 5

The complete solution to (∆) is yt = 3 + ( 6 ) (cos θt +


t  1 
5 sin θt), where θ = cos −1  
 6
***********************************************************************

Page 18 of 36
Mathematics 2 : Difference Equations

Behaviour Of Solutions
After solving a second-order equation, you may be asked to describe the behaviour of the time
path.

Oscillation would occur if (–K)t or cos(Kt) or sin(Kt) appears in the solution

Stability
The solution yt is stable if yt converges to a finite limit. For example, if yt → 6 as t → ∞.
If the solution yt does not converge to a finite limit, then yt is unstable.

Important Limits
If –1 < r < 1 then rt → 0 as t → ∞
If r < –1 or r > 1 then rt → ∞ or ±∞ as t → ∞ (depending on sign of r)

Examples (Behaviour)

t
t t t2
(1) Suppose yt = 32 + 3 – 2 = 32 + 3 [1 –   ]
3
t
2 2
Then, yt → ∞ as t → ∞, since 0 < < 1 so that   → 0 as t → ∞
3 3

t
2
(2) Suppose yt = 32 + 2t – 3t = 32 – 3t[1 –   ]
3
t
2 2
Then, yt → –∞ as t → ∞, since 0 < < 1 so that   → 0 as t → ∞
3 3

(3) Suppose yt = 6 + [–0.8t + 1]3t Then, yt → –∞ as t → ∞

(4) Suppose yt = 32 + (0.3)t – (0.2)t Then, yt → 32 as t → ∞. yt is stable

(5) Suppose yt = 32 + (–0.3)t – (0.2)t


Then, yt → 32 as t → ∞, oscillating with decreasing magnitude about yt = 32. yt is stable

***********************************************************************

Page 19 of 36
Mathematics 2 : Difference Equations

(Ex 14) Solve the following difference equation given that y0 = 0 and y1 = 1.
yt + 12yt – 1 + 11yt – 2 = 24
How does the solution behave for large t?

(Solution)
yt + 12yt – 1 + 11yt – 2 = 24 ………………………………… (∆)
Auxiliary equation: m2 + 12m + 11 = 0
∴ (m + 1)(m + 11) = 0
∴ m = –1 or m = –11

Complementary function: yt = A(–1)t + B(–11)t

For a particular solution, try yt = D


From (∆),
D + 12D + 11D = 24
∴ 24D = 24
∴ D=1
Particular solution: yt = 1

General solution: yt = PS + CF ∴ yt = 1 + A(–1)t + B(–11)t …….. (GS)

y0 = 0 ∴ 1 + A + B = 0 ∴ A + B = –1 …………………………. (1)
y1 = 1 ∴ 1 – A – 11B = 1 ∴ –A – 11B = 0 ……………………… (2)
1
(1) + (2): –10B = –1 ∴ B =
10

1 11
From (1), A + = –1 ∴ A = –
10 10

11 1
Hence, the complete solution to (∆) is yt = 1 – (–1)t + (–11)t
10 10

Behaviour of yt: (–1)t = ±1 and (–11)t → ±∞ as t → ∞.


∴ yt → ±∞ as t → ∞, oscillating with increasing magnitude about yt = 1.
The system is unstable.
********************************************************************

Page 20 of 36
Mathematics 2 : Difference Equations

3 2
(Ex 15) Find the eigenvalues of the matrix A =  
1 4
and find an eigenvector corresponding to each eigenvalue.
Hence find an invertible matrix P and a diagonal matrix D such that P–1AP = D.
Hence, or otherwise, find the solutions for xt and yt such that x0 = 4 and y0 = 1 and
xt = 3xt – 1 + 2yt – 1
yt = xt – 1 + 4yt – 1
(Solution 1)
3−λ 2
A – λI = = (3 – λ)(4 – λ) – 2 = 12 – 7λ + λ2 – 2
1 4−λ

Hence A – λI = 0 ⇒ λ2 – 7λ + 10 = 0 ⇒ (λ – 2)(λ – 5) = 0 ⇒ λ = 2 or λ = 5


The eigenvalues are therefore 2 and 5.
1 2   x   0  x + 2 y = 0 2
If λ = 2 then     =   , so  , so x + 2y = 0 with eigenvector  
1 2   y   0  x + 2 y = 0  −1
 − 2 2   x  0 − 2 x + 2 y = 0 1
If λ = 5 then     =   , so  , so y = x with eigenvector  
 1 − 1  y   0   x− y =0 1
2 1  2 0 1 1 − 1 1 1 − 1
P–1AP = D where P =  , D =   , so P –1 =  =  .
 −1 1  0 5 2 − (−1) 1 2  3 1 2 
 xt   xt − 1  3 2
  = A   where A =
  
 yt   yt − 1  1 4
 xt   wt 
Let sequences wt and zt be defined by   = P   ………………………. (1)
 yt   zt 
 wt   xt   w0   x0  1  − 1 1   4   − 1
(1) ⇒   = P–1   , so   = P–1   =    =  
 zt   yt   z0   y0  3  1 2   1   2 

 wt   xt − 1  w  w  w 
P   = A   = AP  t − 1  , so P–1P  t  = P–1AP  t − 1 
   z 
 zt   yt − 1   zt − 1   zt   t −1 
 wt   wt − 1   wt   wt − 1   wt   2 0   wt − 1   2wt − 1 
So, I   = D   , so
   = D   , so
   =    =
 


 zt   zt − 1   zt   zt − 1   zt   0 5   zt − 1   5 zt − 1 
So, wt = 2wt – 1 and zt = 5zt – 1 (geometric sequences with r = 2 and r = 5)
So, wt = w0(2)t and zt = z0(5)t. So, wt = –(2)t and zt = 2(5)t
 xt   − 2 1  − (2)t   2(2)t + 2(5) t 
(1) ⇒   =     =
t  

t
 yt   1 1  2(5)   − (2) + 2(5) 
t

Hence, xt = 2(2)t + 2(5)t and yt = –(2)t + 2(5)t (t = 0, 1, 2, …)

Page 21 of 36
Mathematics 2 : Difference Equations

(Solution 2)
3−λ 2
A – λI = = (3 – λ)(4 – λ) – 2 = 12 – 7λ + λ2 – 2
1 4−λ

Hence A – λI = 0 ⇒ λ2 – 7λ + 10 = 0 ⇒ (λ – 2)(λ – 5) = 0 ⇒ λ = 2 or λ = 5


The eigenvalues are therefore 2 and 5.
1 2   x   0  x + 2 y = 0 2
If λ = 2 then     =   , so  , so x + 2y = 0 with eigenvector  
1 2   y   0  x + 2 y = 0  − 1
 − 2 2   x   0 − 2 x + 2 y = 0 1
If λ = 5 then     =   , so  , so y = x with eigenvector  
 1 − 1  y   0   x− y =0 1
 2 1  2 0 1 1 − 1 1 1 − 1
P–1AP = D where P =   , D =   , so P –1 =  =  .
 − 1 1  0 5 2 − (−1) 1 2  3 1 2 

 xt   xt − 1 
In matrix form, the given system is   = A  

 yt   yt − 1 
 x1   x0   x2   x1   x0   x3   x2   x0 
So,   = A   and   = A   = A2   and   = A   = A3  
 y1   y0   y2   y1   y0   y3   y2   y0 

 xt   x0   x0  1  2 1  (2)t 0  1 − 1  4 
So,   = At   = PD tP–1   =      
 yt   y0   y0  3  − 1 1  0 (5) t  1 2   1 

1  2( 2) t (5) t   3
=    
 − ( 2) t (5) t 
3  6
 2( 2) t (5) t   1 
=   
 − ( 2)
t
(5) t   2 

 2(2) t + 2(5) t 
=  
t 
 − (2) + 2(5) 
t

Hence, xt = 2(2)t + 2(5)t and yt = –(2)t + 2(5)t (t = 0, 1, 2, …)

Page 22 of 36
Mathematics 2 : Difference Equations

(Solution 3)
xt = 3xt – 1 + 2yt – 1 ………………………… (1)
yt = xt – 1 + 4yt – 1 …………………………. (2)
1
(1) ⇒ yt – 1 = (xt – 3xt – 1) ………………………. (3)
2
1
⇒ yt = (xt + 1 – 3xt) …………………………. (4) , replacing t by t + 1
2
1
(xt + 1 – 3xt) = xt – 1 + 2(xt – 3xt – 1) , putting (3) and (4) into (2)
2

∴ xt + 1 – 3xt = 2xt – 1 + 4xt – 12xt – 1

∴ xt + 1 – 7xt + 10xt – 1 = 0 …………………… (∆)


Auxiliary equation: m2 – 7m + 10 = 0
∴ (m – 2)(m – 5) = 0
∴ m = 2 or m = 5

Complementary function: xt = A(2)t + B(5)t

The RHS of (∆) is zero, so a particular solution is xt = 0

Put t = 1 in (1): x1 = 3x0 + 2y0 = 3(4) + 2(1) = 12 + 2 = 14

The general solution of (∆) is xt = PS + CF, i.e. xt = A(2)t + B(5)t

x0 = 4 ∴ A + B = 4 ∴ 2A + 2B = 8 …….. (5)
x1 = 14 ∴ 2A + 5B = 14 …………………. (6)
(6) – (5): 3B = 6 ∴ B = 2
From (5), A + 2 = 4 ∴ A = 2
Hence, the complete solution to (∆) is xt = 2(2)t + 2(5)t
1 1
yt = (xt + 1 – 3xt) = [2(2)t + 1 + 2(5)t + 1 – 6(2)t – 6(5)t] , from (4)
2 2

1
= [4(2)t + 10(5)t – 6(2)t – 6(5)t]
2

Hence, xt = 2(2) + 2(5)t and yt = –(2)t + 2(5)t (t = 0, 1, 2, …)


t

********************************************************************

Page 23 of 36
Mathematics 2 : Difference Equations

If a first order difference equation is of the form yt + ayt – 1 = f(t) or yt + 1 + ayt = f(t), where f(t) is
not a constant then we can solve the equation using the method for solving a second order
difference equation.

(Ex 16) Solve the following difference equation given that y0 = 6.


yt + 1 – 12yt = 33 – 20(7)t

(Solution)
yt + 1 – 12yt = 33 – 20(7)t ………..………………… (∆)
Auxiliary equation: m – 12 = 0 ∴ m = 12
Complementary function: yt = A(12)t

For a particular solution, try yt = B + C(7)t


From (∆), B + C(7)t + 1 – 12B – 12C(7)t = 33 – 20(7)t
∴ –11B + 7C(7)t – 12C(7)t = 33 – 20(7)t
∴ –11B – 5C(7)t = 33 – 20(7)t
Equating coefficients,
(7)t terms: –5C = –20 ∴ C = 4
Constant terms: –11B = 33 ∴ B = –3
Particular solution: yt = –3 + 4(7)t

General solution: yt = PS + CF
∴ yt = –3 + 4(7)t + A(12)t ……………….. (GS)
y0 = 6, so –3 + 4 + A = 6, so A = 5
Hence, the complete solution to (∆) is yt = –3 + 4(7)t + 5(12)t
*******************************************************************

Page 24 of 36
Mathematics 2 : Difference Equations

Revision Problems
1. Solve the following difference equations, and describe the long-term behaviour of yt.
1
(a) yt = 8yt – 1 + 3, y0 = 2 (b) yt = 60 – yt – 1, y0 = 70
2

2. Solve the following difference equations for yt.


(a) yt + 2 – yt + 1 – 12yt = 48 , given that y0 = 1 and y1 = 23
(b) yt + 2 – yt + 1 + 0.25yt = 6 , given that y0 = 2 and y1 = 5
2
(c) yt + 2 + 4yt + 1 + 8yt = 13t – 14t + 35 , given that y0 = 8 and y1 = 4
(d) yt + 2 + 3yt + 1 – 10yt = 70(–5)t given that y0 = 1 and y1 = 6
For a particular solution, try yt = Dt(–5)t
(e) yt + 2 + 4yt = 15 , given that y0 = 12 and y1 = 11
(f) yt + 2 – 3yt + 1 + 3yt = 5 , given that y0 = 6 and y1 = 8

3. The following equations relate to consumption Ct, Investment It, Income Yt and
Production Qt, at time t:
3 1
Ct = Yt – 1 , It = 20 + (Qt – 1 – Qt – 2) , Qt = Yt , Yt = Ct + It
8 8

(a) Derive a second-order difference equation in Y.


(b) Given that Y0 = 33 and Y1 = 32.5 determine a general solution for Yt and comment upon
the behaviour of the solution as t changes.

4. Find the eigenvalues of the matrix


7 9
A =  
 − 1 − 3
and find an eigenvector corresponding to each eigenvalue.
Hence find an invertible matrix P and a diagonal matrix D such that P–1AP = D.
Use your result to find the solutions for xt and yt such that x0 = 5 and y0 = 3 and
xt = 7xt – 1 + 9yt – 1
yt = –xt – 1 – 3yt – 1

5. Two sequences xt and yt satisfy x0 = 5, y0 = 3 and


xt = 7xt – 1 + 9yt – 1
yt = –xt – 1 – 3yt – 1
Create and solve a second-order difference equation to find the solutions for xt and yt.

Page 25 of 36
Mathematics 2 : Difference Equations

6. Suppose that the supply equation for a good is


q = qS(p) = bp – a
where a, b > 0, and that the demand equation is
q = qD(p) = c – dp
where c, d > 0.
(a) Find the inverse demand function pD(q), which expresses price in terms of quantity on
the demand curve.

(b) Determine the equilibrium price p* and equilibrium quantity q*.

(c) Suppose that the sequence of prices pt and quantities qt are determined by the two
equations
qt = qS(pt – 1) , pt = pD(qt)
Derive a first-order difference equation for pt.

(d) Discuss the behaviour of pt as t tends to infinity.


(e) Suppose b = 3, a = 7, c = 38, d = 12 and that p0 = 4. Find pt and qt.

7. Solve the following difference equation given that y0 = 20.


yt = –5yt – 1 + 42 + 27(4)t

Page 26 of 36
Mathematics 2 : Difference Equations

Solutions to Revision Problems

1. (a) yt = 8yt – 1 + 3
yt = ayt – 1 + b, where a = 8 and b = 3.
3
Let y* = yt = yt – 1. Then, y* = 8y* + 3 ∴ 7y* = –3 ∴ y* = –
7
t
General solution: yt = y* + (y0 – y*)a
3  3 3 17
y0 = 2 ∴ The complete solution is yt = – +  2 +  8t ∴ y t = – + (8)t
7  7 7 7

Behaviour: yt → ∞ as t → ∞, increasing exponentially, since 8 > 1.


************************************************************
1
1. (b) yt = 60 – yt – 1
2
1
yt = ayt – 1 + b, where a = – and b = 60.
2
1 3
Let y* = yt = yt – 1. Then, y* = – y* + 60 ∴ y* = 60 ∴ y* = 40
2 2

General solution: yt = y* + (y0 – y*)at


t
 1
y0 = 70 ∴ The complete solution is yt = 40 + 30  − 
 2
Behaviour: yt → 40 as t → ∞, oscillating with decreasing magnitude about yt = 40
************************************************************
2. (a) yt + 2 – yt + 1 – 12yt = 48 ……………… (∆)
Auxiliary equation: m2 – m – 12 = 0 ∴ (m + 3)(m – 4) = 0 ∴ m = –3 or m = 4
Complementary function: yt = A(–3)t + B(4)t
For a particular solution, try yt = D
From (∆), D – D – 12D = 48 ∴ –12D = 48 ∴ D = –4
Particular solution: yt = –4
General solution: yt = PS + CF ∴ yt = –4 + A(–3)t + B(4)t ……… (GS)
y0 = 1, so –4 + A + B = 1, so A + B = 5, so 3A + 3B = 15 ………… (1)
y1 = 23, so –4 – 3A + 4B = 23, so –3A + 4B = 27 ………………… (2)
(1) + (2): 7B = 42, so B = 6, so A = 5 – 6 = –1
Hence, the complete solution to (∆) is yt = –4 – (–3)t + 6(4)t

Page 27 of 36
Mathematics 2 : Difference Equations

2. (b) yt + 2 – yt + 1 + 0.25yt = 6 ……………………………………. …….. (∆)


Auxiliary equation: m2 – m + 0.25 = 0 ∴ (m – 0.5)(m – 0.5) = 0 ∴ m = 0.5
Complementary function: yt = (At + B)(0.5)t
For a particular solution, try yt = D
From (∆), D – D + 0.25D = 6 ∴ 0.25D = 6 ∴ D = 24
Particular solution: yt = 24
General solution: yt = PS + CF ∴ yt = 24 + (At + B)(0.5)t ……… (GS)
y0 = 2 ∴ 24 + B = 2 ∴ B = –22
y1 = 5 ∴ 24 + 0.5(A + B) = 5 ∴ A – 22 = –38 ∴ A = –16
Hence, the complete solution to (∆) is yt = 24 + (–16t – 22)(0.5)t
***********************************************************************
2. (c) yt + 2 + 4yt + 1 + 8yt = 13t2 – 14t + 35 ………………… (∆)
Auxiliary equation: m2 + 4m + 8 = 0 ∴ b2 – 4c = 16 – 32 = –16 < 0
t
 c
 
 a = ( 8) t  −b 
and θ = cos −1 
 −4 
 = cos −1 
 − 1  3π
 = cos −1  =
4
   2 ac  2 8  2

Complementary function: yt = ( 8 ) (Acos 34πt


t
+ Bsin
3πt
4
)

For a particular solution, try yt = Dt2 + Et + F


From (∆),
D(t + 2)2 + E(t + 2) + F + 4[D(t + 1)2 + E(t + 1) + F] + 8(Dt2 + Et + F) = 13t2 – 14t + 35
∴ 13Dt2 + 12Dt + 8D + 13Et + 6E + 13F = 13t2 – 14t + 35
t2 terms: 13D = 13 ∴ D = 1
t terms: 12D + 13E = –14 ∴ 13E = –26 ∴ E = –2
Constant terms: 8D + 6E + 13F = 35 ∴ 13F = 35 – 8 + 12 ∴ 13F = 39 ∴ F = 3
Particular solution: yt = t2 – 2t + 3
GS = PS + CF, so general solution is yt = t2 – 2t + 3 + ( 8 ) (Acos 34πt
t
+ Bsin
3πt
4
)
y0 = 8, so 3 + A = 8, so A = 5
−A B 
y1 = 4, so 1 – 2 + 3 + 2 2  +  = 4, so –2A + 2B = 2, so B = 6
 2 2
t
( )
So, the complete solution to (∆) is yt = t2 – 2t + 3 + 8 (5cos
3πt
4
+ 6sin
3πt
4
)

Page 28 of 36
Mathematics 2 : Difference Equations

2. (d) yt + 2 + 3yt + 1 – 10yt = 70(–5)t ………………….. (∆)


Auxiliary equation: m2 + 3m – 10 = 0 ∴ (m + 5)(m – 2) = 0 ∴ m = –5 or m = 2
Complementary function: yt = A(–5)t + B(2)t
For a particular solution, try yt = Dt(–5)t (as instructed)

From (∆), D(t + 2)(–5)t + 2 + 3D(t + 1)(–5)t + 1 – 10Dt(–5)t = 70(–5)t


∴ D(–5)t[(t + 2)(–5)2 + 3(t + 1)(–5) – 10t] = 70(–5)t
∴ D[25(t + 2) – 15(t + 1) – 10t] = 70
∴ D[25t + 50 – 15t – 15 – 10t] = 70 ∴ 35D = 70 ∴ D = 2

General solution: yt = PS + CF
∴ yt = 2t(–5)t + A(–5)t + B(2)t ……………………. (GS)
y0 = 1, so A + B = 1, so 2A + 2B = 2 ……………………………… (1)
y1 = 6, so –10 – 5A + 2B = 6, so –5A + 2B = 16 ………………….. (2)
(1) – (2): 7A = –14, so A = –2, so B = 1 + 2 = 3
Hence, the complete solution to (∆) is yt = 2t(–5)t – 2(–5)t + 3(2)t
***********************************************************************
2. (e) yt + 2 + 4yt = 15 …………………………………………………….. (∆)
Auxiliary equation: m2 + 4 = 0 ∴ b2 – 4ac = –16 < 0 ∴ complex roots

t
 −b 
θ = cos 
−1
 = cos–1 (0) =
1  c
π and   =
 ( 4) t
= (2)t
 2 ac  2  a

1  1 
Complementary function: yt = (2)t[Acos  πt  + Bsin  πt  ]
2  2 
For a particular solution, try yt = D
From (∆), D + 4D = 15 ∴ 5D = 15 ∴ D = 3
Particular solution: yt = 3
1  1 
General solution: yt = PS + CF ∴ yt = 3 + (2)t[Acos  πt  + Bsin  πt  ] ……… (GS)
2  2 
y0 = 12 ∴ 12 = 3 + A ∴ A = 9
y1 = 11 ∴ 11 = 3 + 2B ∴ 2B = 8 ∴ B = 4
1  1 
Hence, the complete solution to (∆) is yt = 3 + (2)t[9cos  πt  + 4sin  πt  ]
2  2 

Page 29 of 36
Mathematics 2 : Difference Equations

2. (f) yt + 2 – 3yt + 1 + 3yt = 5 …………… (∆)


Auxiliary equation: m2 – 3m + 3 = 0 ∴ b2 – 4c = 9 – 12 = –3 < 0
t
 c
 
 a = ( 3) t  −b 
and θ = cos −1 
 3 
 = cos −1 
 3 π
 = cos −1   =
 6
   2 ac  2 3  2 
t
Complementary function: yt = 3 (Acos
πt
6
( )
πt
+ Bsin )
6
For a particular solution, try yt = D
From (∆), D – 3D + 3D = 5 ∴ D = 5
Particular solution: yt = 5

GS = PS + CF, so general solution is yt = 5 + ( 3 ) (Acos π6t + Bsin π6t )


t

y0 = 6, so 5 + A = 6, so A = 1
 3A B 
y1 = 8, so 5 + 3  +  = 8, so 10 + 3 + 3 B = 16, so B = 3
 2 2

Hence, the complete solution to (∆) is yt = 5 + ( 3 ) (cos π6t +


t
3 sin
πt
6
)

***********************************************************************
3
3. (a) Ct = Yt – 1 ………………………………………. (1)
8

1
It = 20 + (Qt – 1 – Qt – 2) ………………………… (2)
8

Qt = Yt ……………………………………………. (3)
Yt = Ct + It ………………………………………… (4)
1
∴ It = 20 + (Yt – 1 – Yt – 2) ………………………….. (5) , putting (3) into (2)
8

3 1
∴ Yt = Yt – 1 + 20 + (Yt – 1 – Yt – 2) , putting (1) and (5) into (4)
8 8

3 1 1
∴ Yt = Yt – 1 + Yt – 1 – Yt – 2 + 20
8 8 8

1 1
∴ Yt – Yt – 1 + Yt – 2 = 20 ………………………… (∆)
2 8

Page 30 of 36
Mathematics 2 : Difference Equations

1 1
3. (b) Auxiliary equation: m2 – m+ =0
2 8

1 1 1
∴ b2 – 4ac = – =– < 0 ∴ complex roots
4 2 4

 1 
t  
 c  = cos −1  8  = cos −1  2 2 
t
−1  − b 
 = 
1  −1 
  and θ = cos   = cos 2
 a  8  2 ac     4   4 
  2
1
    
 8 
 4   1  1
∴ θ = cos −1   = cos −1  = π
4 2  2 4
t
 1  1  1 
Complementary function: Yt =   [Acos  πt  + Bsin  πt  ]
 8 4  4 
For a particular solution, try Yt = D.
1 1 5
From (∆), D – D+ D = 20 ∴ D = 20 ∴ D = 32
2 8 8
t
 1  1  1 
General solution: Yt = PS + CF, i.e., Yt = 32 +   [Acos  πt  + Bsin  πt  ]
 8 4  4 

Y0 = 33 ∴ 32 + A = 33 ∴ A = 1
1 1  1 
Y1 = 32.5 ∴ 32 + [cos  π  + Bsin  π  ] = 32.5
8 4  4 

 1
1 B  1
∴  + =
2 2  2 2 2

1 1 1
∴ + B=
4 4 2

∴ 1+B=2
∴ B=1
t
 1  1  1 
Hence, the complete solution to (∆) is Yt = 32 +   [cos  πt  + sin  πt  ]
 8 4  4 

Behaviour : Yt → 32 as t → ∞, oscillating with decreasing magnitude about line Yt = 32.


Yt is stable since Yt converges.
***************************************************************

Page 31 of 36
Mathematics 2 : Difference Equations

4. (Solution 1)
7−λ 9
A – λI = 0 ⇒ = 0 ⇒ (7 – λ)(–3 – λ) + 9 = 0 ⇒ λ2 – 4λ – 12 = 0
−1 −3−λ
⇒ (λ – 6)(λ + 2) = 0 ⇒ λ = 6 or λ = –2

 9 9   x  0 9 x + 9 y = 0 1
λ = –2:     =   , so  , so x + y = 0 with eigenvector  
 − 1 − 1  y   0  − x− y = 0  − 1

 1 9   x  0  x + 9y = 0  − 9
λ = 6:     =   , so  , so x + 9y = 0 with eigenvector  
 −1 − 9   y   0  − x − 9 y = 0  1 

−9 1   6 0  –1 1  − 1 − 1  1 1 1 
P–1AP = D, where P =   , D =   , P =   = –  
 1 − 1  0 − 2 8  −1 − 9  8 1 9 
 xt   xt − 1 
  = A  

 yt   yt − 1 
 xt   wt 
Let sequences wt and zt be defined by   = P   ………………………. (1)
 yt   zt 

 wt   xt   w0  x  1 1 1   5   − 1 
(1) ⇒   = P–1   , so   = P–1  0  = –     =  
 zt   yt   z0   y0  8 1 9   3   − 4 

 wt   xt − 1  w  w  w 
P   = A   = AP  t − 1  , so P–1P  t  = P–1AP  t − 1 
  zt − 1   zt − 1 
 zt   yt − 1     zt   
 wt   wt − 1   wt   wt − 1 
So, I   = D   , so
   = D  

 zt   zt − 1   zt   zt − 1 
 wt   6 0   wt − 1   6wt − 1 
So   =    =
 


 zt   0 − 2   zt − 1   − 2 zt − 1 
So, wt = 6wt – 1 and zt = –2zt – 1 (geometric sequences with r = 6 and r = –2)
So, wt = w0(6)t and zt = z0(–2)t
So, wt = –(6)t and zt = –4(–2)t

 xt   − 9 1   − (6)t   9(6) t − 4(−2) t 


(1) ⇒   =     =
t 

t
 yt   1 − 1  − 4(−2)   − (6) + 4(−2) 
t

Hence, xt = 9(6)t – 4(–2)t and yt = –(6)t + 4(–2)t

Page 32 of 36
Mathematics 2 : Difference Equations

4. (Solution 2)
7−λ 9
A – λI = 0 ⇒ = 0 ⇒ (7 – λ)(–3 – λ) + 9 = 0 ⇒ λ2 – 4λ – 12 = 0
−1 −3−λ
⇒ (λ – 6)(λ + 2) = 0 ⇒ λ = 6 or λ = –2

 9 9   x  0 9 x + 9 y = 0 1
λ = –2:     =   , so  , so x + y = 0 with eigenvector  
 − 1 − 1  y   0  − x− y = 0  − 1

 1 9   x  0  x + 9y = 0  − 9
λ = 6:     =   , so  , so x + 9y = 0 with eigenvector  
 −1 − 9   y   0  − x − 9 y = 0  1 

−9 1   6 0  –1 1  − 1 − 1  1 1 1 
P–1AP = D, where P =   , D =   , P =   = –  
 1 − 1  0 − 2 8  −1 − 9  8 1 9 

 xt   xt − 1 
In matrix form, the given system is   = A  

 yt   yt − 1 
 x1   x0   x2   x1   x0   x3   x2   x0 
So,   = A   and   = A   = A2   and   = A   = A3  
 y1   y0   y2   y1   y0   y3   y2   y0 

 xt   x0   x0  1  − 9 1   (6 ) t 0  1 1   5 
So,   = At   = PD tP–1   = –     
 yt   y0   y0  8  1 − 1  0 (−2)t  1 9   3 

1  − 9( 6) t (−2) t   8 
=–   
8  ( 6) t
 − (−2) t   32 

 − 9( 6) t (−2)t   − 1 
=   
 ( 6)
t
− (−2) t   − 4 

 9(6)t − 4(−2)t 
=  
t
 − ( 6) t
+ 4( −2) 
Hence, xt = 9(6)t – 4(–2)t and yt = –(6)t + 4(–2)t
************************************************************

Page 33 of 36
Mathematics 2 : Difference Equations

5. xt = 7xt – 1 + 9yt – 1 ………………………… (1)


yt = –xt – 1 – 3yt – 1 ………………………… (2)
1
(1) ⇒ yt – 1 = (xt – 7xt – 1) ………………………. (3)
9

1
⇒ yt = (xt + 1 – 7xt) …………………………. (4) , replacing t by t + 1
9

1 3
(xt + 1 – 7xt) = –xt – 1 – (xt – 7xt – 1) , putting (3) and (4) into (2)
9 9

∴ xt + 1 – 7xt = –9xt – 1 – 3xt + 21xt – 1

∴ xt + 1 – 4xt – 12xt – 1 = 0 ……………………. (∆)


Auxiliary equation: m2 – 4m – 12 = 0
∴ (m – 6)(m + 2) = 0
∴ m = –2 or m = 6
Complementary function: xt = A(–2)t + B(6)t
The RHS of (∆) is zero, so a particular solution is xt = 0
Put t = 1 in (1): x1 = 7x0 + 9y0 = 7(5) + 9(3) = 35 + 27 = 62
The general solution of (∆) is xt = PS + CF, i.e. xt = A(–2)t + B(6)t
x0 = 5 ∴ A + B = 5 ……………………………………… (5)
x1 = 62 ∴ –2A + 6B = 62 ∴ –A + 3B = 31 ……………. (6)
(5) + (6): 4B = 36 ∴ B = 9
From (5), A + 9 = 5 ∴ A = –4
So, the complete solution to (∆) is xt = –4(–2)t + 9(6)t
1 1
yt = (xt + 1 – 7xt) = [–4(–2)t + 1 + 9(6)t + 1 + 28(–2)t – 63(6)t] , from (4)
9 9

1
= [8(–2)t + 54(6)t + 28(–2)t – 63(6)t]
9

∴ yt = –(6)t + 4(–2)t
Hence, xt = –4(–2)t + 9(6)t and yt = –(6)t + 4(–2)t
************************************************************

Page 34 of 36
Mathematics 2 : Difference Equations

c−q
6. (a) q = qS(p) = bp – a, q = qD(p) = c – dp ∴ dp = c – q ∴ pD(q) =
d
(b) The time-independent equilibrium occurs when
a+c
qS = qD ∴ bp – a = c – dp ∴ bp + dp = a + c ∴ p(b + d) = a + c ∴ p* =
b+d
a+c b( a + c ) − a ( b + d ) bc − ad
∴ q* = bp* – a = b   –a= =
b+d  b+d b+d
c − qt
(c) pt = ……………………….. (1) , since pt = pD(qt)
d
qt = bpt – 1 – a ……………………… (2) , since qt = qS(pt – 1)
c − bpt − 1 + a
∴ pt = , putting (2) into (1)
d
b a+c
∴ pt = – pt – 1 + ……………… (3)
d d

t
a+c  a+c   b  b
(d) pt = +  p0 −  −  , from (b) and (c). b, d > 0 ∴ – <0
b+d  b+d   d  d
b
If –1 < – < 0 (i.e. b < d) then pt → p* as t → ∞, oscillating with decreasing magnitude
d
b
If – = –1 (i.e. b = d) then pt oscillates uniformly about p*
d
b
If – < –1 (i.e. b > d) then pt → ±∞ as t → ∞, oscillating with increasing magnitude
d

(e) Suppose b = 3, a = 7, c = 38, d = 12 and that p0 = 4.


a+c
Equation (3) becomes pt = –0.25pt – 1 + 3.75 and p* = =3
b+d
Equation (3) is of the form pt = apt – 1 + b, where a = –0.25 and b = 3.75
General solution: pt = p* + (p0 – p*)at, so the complete solution is pt = 3 + (–0.25)t
qt = c – dpt = 38 – 12[3 + (–0.25)t] = 2 – 12(–0.25)t
Hence, pt = 3 + (–0.25)t and qt = 2 – 12(–0.25)t
************************************************************

Page 35 of 36
Mathematics 2 : Difference Equations

7. yt + 5yt – 1 = 42 + 27(4)t …………… (∆)


Auxiliary equation: m + 5 = 0 ∴ m = –5
Complementary function: yt = A(–5)t

For a particular solution, try yt = B + C(4)t


From (∆), B + C(4)t + 5B + 5C(4)t – 1 = 42 + 27(4)t
5
∴ 6B + C(4)t + C(4)t = 42 + 27(4)t
4

9
∴ 6B + C(4)t = 42 + 27(4)t
4

Equating coefficients,
9
(4)t terms: C = 27 ∴ C = 12
4

Constant terms: 6B = 42 ∴ B = 7
Particular solution: yt = 7 + 12(4)t

General solution: yt = PS + CF
∴ yt = 7 + 12(4)t + A(–5)t ……………….. (GS)
y0 = 20, so 7 + 12 + A = 20, so A = 1
Hence, the complete solution to (∆) is yt = 7 + 12(4)t + (–5)t
*******************************************************************

Page 36 of 36

You might also like