9.2 Second-order difference equations
- Definition
-
A second-order difference equation is an equation
xt+2 = f(t, xt, xt+1),where f is a function of three variables. A solution of the second-order difference equation xt+2 = f(t, xt, xt+1) is a function x of a single variable whose domain is the set of integers such that xt+2 = f(t, xt, xt+1) for every integer t, where xt denotes the value of x at t.
- Proposition 9.2.1
- For every pair of numbers x0 and x1, every second-order difference equation xt+2 = f(t, xt, xt+1) has a unique solution in which the value of x is x0 at 0 and x1 at 1.
Second-order linear difference equations with constant coefficients
- Definition
-
A linear second-order difference equation with constant coefficients is a second-order difference equation that may be written in the form
xt+2 + axt+1 + bxt = ct,where a, b, and ct for each value of t, are numbers. The equation is homogeneous if ct = 0 for all t.
Thus we have the following result.
- Proposition 9.2.2
-
Let x be a solution of the linear second-order ordinary difference equation with constant coefficients
xt+2 + axt+1 + bxt = ct.Then y is a solution of this equation if and only if yt = xt + zt for all t, where z is a solution of the (homogeneous) equationxt+2 + axt+1 + bxt = 0.
- Procedure for finding general solution of linear second-order difference equation with constant coefficients
-
The solutions of the difference equation
xt+2 + axt+1 + bxt = ctmay be found as follows.
- Find the solutions of the associated homogeneous equation xt+2 + axt+1 + bxt = 0.
- Find a single solution of the original equation xt+2 + axt+1 + bxt = ct.
- Add together the solutions found in steps 1 and 2.
1. Find the solutions of a homogeneous equation
You might guess that the homogeneous equation- Proposition 9.2.3
-
Consider the homogeneous linear second-order difference equation with constant coefficients
xt+2 + axt+1 + bxt = 0.The set of solutions of this equation depends on the character of the roots of the characteristic equation m2 + am + b = 0 as follows.
- Distinct real roots
- If a2 > 4b, in which case the characteristic equation has distinct real roots, say m1 and m2, every solution of the equation has the form
Amtfor numbers A and B.
1 + Bmt
2 - Single real root
- If a2 = 4b, in which case the characteristic equation has a single root, every solution of the equation has the form
(A + Bt)mtfor numbers A and B, where m = −(1/2)a is the root.
- Complex roots
- If a2 < 4b, in which case the characteristic equation has complex roots, every solution of the equation has the form
Art cos(θt + ω)for numbers A and ω, where r = √b and cos θ = −a/(2√b). This solution may alternatively be expressed asC1rt cos(θt) + C2rt sin(θt),where C1 = A cos ω and C2 = −A sin ω (using the formula cos(x+y) = (cos x)(cos y) − (sin x)(sin y).
- Source
- For a proof, see Goldberg (1958), pp. 134–142.
- Example 9.2.1
-
Consider the equation
xt+2 + xt+1 − 2xt = 0.The roots of the characteristic equation are 1 and −2 (real and distinct). Thus every solution has the formxt = A + B(−2)t.
- Example 9.2.2
-
Consider the equation
xt+2 + 6xt+1 + 9xt = 0.The single root of the characteristic equation is −3. Thus every solution has the formxt = (A + Bt)(−3)t.
- Example 9.2.3
-
Consider the equation
xt+2 − xt+1 + xt = 0.The roots of the characteristic equation are complex. We have r = 1 and cos θ = 1/2, so θ = (1/3)π. So every solution has the formxt = Acos((1/3)πt + ω).The frequency of the oscillations is (π/3)/2π = 1/6 and the growth factor is 1, so the oscillations are neither damped nor explosive.
2. Find a solution of a nonhomogeneous equation
For other forms of ct, the method used to find a solution of a nonhomogeneous second-order differential equation can be used. For example, if ct is a linear combination of terms of the form qt, tm, cos(pt), and sin(pt), for constants q, p, and m, and products of such terms, then guess that the equation has a solution that is a linear combination of such terms; substitute such a function into the equation and see whether there are coefficients that generate a solution. If the ct you find happens to satisfy the homogeneous equation, then a different approach must be taken, which I do not discuss.
- Example 9.2.4
-
Consider the equation
xt+2 − 5xt+1 + 6xt = 2t − 3.To find a solution, guess that there is one of the form at + b. For this function to be a solution, we needa(t+2) + b − 5[a(t+1) + b] + 6(at + b) = 2t − 3.Equating the coefficients of t and the constant on each side, we have a = 1 and b = 0. Thus xt = t for all t is a solution.
- Example 9.2.5
-
Consider the equation
xt+2 − 5xt+1 + 6xt = 4t + t2 + 3.To find a solution, tryxt = C4t + Dt2 + Et + F.Substituting this potential solution into the equation and equating the coefficients of 4t, t2, and the constant on each side we find thatC = 1/2, D = 1/2, E = 3/2, and F = 4.
Thus a solution of the equation is
xt = (1/2)4t + (1/2)t2 + (3/2)t + 4.
3. Add together the solutions found in steps 1 and 2
- Example 9.2.6
-
Consider the equation
xt+2 − 5xt+1 + 6xt = 2t − 3.The associated homogeneous equation isxt+2 − 5xt+1 + 6xt = 0.The characteristic equation has two real roots, 2 and 3, so by a previous result, every solution of the equation has the form A2t + B3t.
By a previous example, a solution of the original equation is xt = t for all t.
We conclude that every solution of the equation has the form
xt = A2t + B3t + t.
- Example 9.2.7
-
Consider the equation
xt+2 − 5xt+1 + 6xt = 4t + t2 + 3.As in the previous example, every solution of the associated homogeneous equation has the form A2t + B3t.
By a previous example, a solution of the original equation is
xt = (1/2)4t + (1/2)t2 + (3/2)t + 4.Thus every solution of the original equation has the form
xt = A2t + B3t + (1/2)4t + (1/2)t2 + (3/2)t + 4.
Equilibrium and stability
The notions of equilibrium and stability for a second-order difference equation are analogous to the ones for a differential equation.- Definition
-
An equilibrium of the linear second-order difference equation with constant coefficients
xt+2 + axt+1 + bxt = cis a number x* such that xt = x* for all t is a solution of the equation. An equilibrium x* is stable if every solution of the equation converges to x*.
Also, from a previous result we know that every solution of
- Characteristic equation has distinct real roots
- Every solution of the difference equation has the form
Amtfor numbers A and B. These solutions converge to zero if and only if |m1| < 1 and |m2| < 1.
1 + Bmt
2 - Characteristic equation has single real root
- Every solution of the difference equation has the form
(A + Bt)mtfor numbers A and B, where m = −(1/2)a is the root. These solutions converge to zero if and only if |m| < 1. (The function tmt converges to zero if and only if |m| < 1.)
- Characteristic equation has complex roots
- Every solution of the equation has the form
Art cos(θt + ω)for numbers A and ω, where r = √b and cos θ = −a/(2√b). These solutions converge to zero if and only if r < 1.
If the characteristic equation has complex roots, then, using the formula for the roots of a quadratic equation, these roots are −a/2 ± i√(b − a2/4). Thus the modulus of each root is √(a2/4 + b − a2/4) = √b. The modulus of a real number is simply its absolute value (the complex number α + βi is real if and only if β = 0), so the conditions we found for every solution of the homogeneous equation to converge to zero are, in every case, simply that the modulus of each root of the characteristic equation is less than 1.
We have the following result.
- Proposition 9.2.4
- For any value of c, an equilibrium of the linear second-order difference equation with constant coefficients xt+2 + axt+1 + bxt = c is stable if and only if the modulus of each root of the characteristic equation m2 + am + b = 0 is less than 1, or, equivalently, if and only if |a| < 1 + b and b < 1.
- Proof
-
The arguments preceding the statement establish that a necessary and sufficient for the equilibrium to be stable is that the modulus of each root is less than 1.
I now show that this condition is equivalent to the conditions |a| < 1 + b and b < 1.
Note that the second condition is equivalent to the two conditions a < 1 + b, or b > a − 1, and −a < 1 + b, or b > −a − 1. In the following figure, b > a − 1 if b is above the blue line and b > −a − 1 if b is above the red line. Thus the set of values of (a, b) satisfying the conditions |a| < 1 + b and b < 1 is the shaded triangle. The characteristic equation has real roots if b lies below the black curve b = a2/4 and complex roots if b lies above this curve. The figure is useful in following the logic of the subsequent slightly intricate algebra.
First consider the case in which the roots of the characteristic equation are real. Then the roots are −a/2 ± √(a2 − 4b)/2, so the modulus of each root is less than 1 if and only if
−1 < −a/2 + √(a2 − 4b)/2 < 1 −1 < −a/2 − √(a2 − 4b)/2 < 1 −2 + a < √(a2 − 4b) < 2 + a −2 + a < −√(a2 − 4b) < 2 + a. √(a2 − 4b) < 2 + a −2 + a < −√(a2 − 4b). a2 − 4b < (2 + a)2 = 4 + 4a + a2or1 + a + b > 0.For the second inequality to hold, we need a < 2 (because the right-hand side is negative) and, squaring both sides,(−2 + a)2 > a2 − 4b(both sides are negative, so the inequality changes), or4 − 4a + a2 > a2 − 4bor1 − a + b > 0.In summary, if the roots of the characteristic equation are real, which is true if and only if a2 > 4b, then the modulus of each root is less than 1 if and only if−2 < a < 2, 1 + a + b > 0, and 1 − a + b > 0.Now, if b < 1 then the last two inequalities imply −2 < a < 2. Further, −2 < a < 2 and a2 > 4b imply b < 1. Thus if the roots of the characteristic equation are real, then the modulus of each root is less than 1 if and only ifb < 1, 1 + a + b > 0, and 1 − a + b > 0.Now consider the case in which the roots of the characteristic equation are complex. Then a2 < 4b, so that b > 0, and, as noted previously, the modulus of each root is √b. Thus the modulus of each root is less than 1 if and only if b < 1. Now, a2 < 4b and b < 1 imply that |a| < 2, so that (a − 2)2 > 0. But (a − 2)2 = a2 − 4a + 4, so a2 > 4a − 4, or a2/4 > a − 1. Given a2 < 4b, we have b > a − 1, or 1 − a + b > 0. The inequality |a| < 2 implies also that (a + 2)2 > 0, so that a2 + 4a + 4 > 0, or a2 > −4a − 4, or a2/4 > −a − 1. Thus given a2 < 4b, we have b > −a − 1, or 1 + a + b > 0. Thus if the modulus of each root of the characteristic equation is less than 1, we haveb < 1, 1 + a + b > 0, and 1 − a + b > 0.In conclusion, whether the roots of the characteristic equation are real or complex, the modulus of each root is less than 1 if and only if
b < 1, 1 + a + b > 0, and 1 − a + b > 0.