xt+2 = f (t, xt, xt+1).As for a first-order equation, a second-order equation has a unique solution: by successive calculation we can see that given x0 and x1 there exists a uniquely determined value of xt for all t ≥ 2. (Note that for a second-order equation we need two starting values, x0 and x1, rather than one.)
xt+2 + atxt+1 + btxt = ct.We solve this equation by first considering the associated homogeneous equation
xt+2 + atxt+1 + btxt = 0.Suppose that we find two solutions of this equation, ut and vt. Then
ut+2 + atut+1 + btut = 0and
vt+2 + atvt+1 + btvt = 0.Hence for any constants A and B we have
(Aut+2 + Aatut+1 + Abtut) + (Bvt+2 + Batvt+1 + Bbtvt) = 0,or
(Aut+2 + Bvt+2) + (atAut+1 + atBvt+1) + (btAut + btBvt) = 0.That is, Aut + Bvt is also a solution of the equation.
This solution has two arbitrary constants in it, so it seems it might be a general solution. But in order to be a general solution, it must be that the two solutions are really independent; for example, they can't be proportional to each other. The solutions are linearly independent if
If this condition is satisfied, then Aut + Bvt is a general solution of the homogeneous equation.
u0 v0 u1 v1 ≠ 0.
Now return to the original equation. Suppose that u*t is a solution of this equation. Let xt be an arbitrary solution of the original equation. Then xt − u*t is a solution of the homogeneous equation. Thus xt − u*t = Aut + Bvt for some values of A and B, or
xt = Aut + Bvt + u*t.
That is, any solution of the original equation is the sum of a some solution of this equation and a solution of the homogeneous equation.
|
Second-order linear equations with constant coefficients
A second-order linear equation with constant coefficients takes the form
xt+2 + axt+1 + bxt = ct.The strategy for solving such an equation is very similar to the strategy for solving a second-order linear differential equations with constant coefficients. We first consider the associated homogeneous equation
xt+2 + axt+1 + bxt = 0.
xt+2 + axt+1 + bxt = 0.We can guess that a solution takes the form ut = mt. In order for ut to be a solution, we need
mt(m2 + am + b) = 0or, if m ≠ 0,
m2 + am + b = 0.This is the characteristic equation of the difference equation. Its solutions are
−(1/2)a ± √((1/4)a2 − b).We can distinguish three cases:
Am1t + Bm2t,where m1 and m2 are the two roots.
(A + Bt)mt,where m = −(1/2)a is the root.
Art cos(θt + ω),where A and ω are constants, r = √b, and cos θ = −a/(2√b), or, alternatively,
C1rt cos(θt) + C2rt sin(θt),where C1 = A cos ω and C2 = −A sin ω (using the formula that cos(x+y) = (cos x)(cos y) − (sin x)(sin y).
In each case the solutions are linearly independent:
u0 v0 u1 v1 =
1 1 m1 m2 = m2 − m1 ≠ 0
1 0 m m = m ≠ 0
1 0 r cos θ r sin θ = r sin θ = √b√(1 − cos2θ) = √b√(1 − a2/4b) = √(b − (1/4)a2) > 0.
In the third case, when the characteristic equation has complex root, the solution oscillates. Art is the amplitude (which depends on the initial conditions) at time t, and r is growth factor. θ/2π is the frequency of the oscillations and ω is the phase (which depends on the initial conditions).
If |r| < 1 then the oscillations are damped; if |r| > 1 then they are explosive.
|
|
|
xt+2 + axt+1 + bxt = ctwe need to find one of its solutions. Suppose that b ≠ 0.
The form of a solution depends on ct.
Suppose that ct = c for all t. Then xt = C is a solution if C = c/(1 + a + b) and if 1 + a + b ≠ 0. (If 1 + a + b = 0 then try xt = Ct; if that doesn't work try xt = Ct2.)
More generally, if ct is a linear combination of terms of the form qt, tm, cos(pt), and sin(pt) (for some constants q, p, and m), and products of such terms, then the method of undetermined coefficients can be used, with a trial solution of the form suggested by ct, as illustrated in the following examples. If ct happens to satisfy the homogeneous equation---and hence is part of the general solution already---then a different approach must be taken, which I do not discuss.
|
Stability
As for differential equations, we say that a system is stable if its long-run behavior is not sensitive to the initial conditions.
Consider the second-order equation
xt+2 + axt+1 + bxt = ct.Write the general solution as
xt = Aut + Bvt + ut*,where A and B are determined by the initial conditions. This solution is globally asymptotically stable (or simply stable) if the first two terms approach 0 as t → ∞, for all values of A and B. In this case, for any initial conditions, the solution of the equation approaches the particular solution ut*.
If the first two terms approach zero for all A and B, then ut and vt must approach zero. (To see that ut must approach zero, take A = 1 and B = 0; to see that vt must approach 0, take A = 0 and B = 1.) A necessary and sufficient condition for this to be so is that the moduli of the roots of the characteristic equation be both less than 1. (The modulus of a complex number α + βi is +√(α2 + β2), which is the absolute value of number if the number is real.)
There are two cases:
We can show (see the argument in Sysdaeter and Hammond (1995) on page 756, and problem 10 on page 758) that these conditions are equivalent to the conditions |a| < 1 + b and b < 1. Thus in summary we have:
The solution is stable if and only if modulus of each root of characteristic equation is less than 1. In terms of the coefficients of the terms in the equation, the solution is stable if and only if |a| < 1 + b and b < 1.