• No se han encontrado resultados

Recall from your course in basic differential equations that, for constant-coefficient ODEs, we typically seek exponential solutions of the form eλt, where λ is a constant that must be solved for. Substituting exponential functions into a linear, homoge-neous, constant-coefficient ODE yields a polynomial equation involving λ: the so-called characteristic equation. By finding the roots of the characteristic polynomial, one may then build the general solution of the ODE by taking linear combinations of exponential functions.

The same idea can be used to solve constant-coefficient difference equations such as the Fibonacci equation above. The only difference is that instead of seeking exponential solutions, one seeks power function solutions of the form xn = λn. The

“characteristic equation approach” to solving difference equations is developed in the

exercises at the end of this chapter. Now, we shall introduce a more elegant method which recycles all of the techniques we learned when solving constant-coefficient systems of ODEs.

First, we remark that kth-order difference equations, like kth order ODEs, can always be written as systems of k first-order equations. The idea is to introduce new variables to represent any iterate other than the immediately preceding iterate. Let us clarify this vague remark via an example: consider the second-order difference equation xn+1 = f (xn, xn−1). If we replace xn−1 with a new variable yn, then note that yn+1 = xn. Thus, the second-order equation we started with may be written as a system

xn+1 = f (xn, yn) and yn+1 = xn.

The vector (xn+1, yn+1) of iterates at the (n + 1)st time step is expressed in terms of the vector (xn, yn) of iterates at the nth time step—a system of two first-order equations. Similarly, the third-order equation

xn+1 = f (xn, xn−1, xn−2)

can be written as a system by introducing yn= xn−1 and zn= xn−2. It follows that yn+1 = xn and zn+1 = xn−1 = yn. Thus, our third-order equation can be written as a system of three first-order difference equations:

xn+1 = f (xn, yn, zn) yn+1 = xn

zn+1 = yn.

In this Section, we will learn to solve kth-order, homogeneous, constant-coefficient difference equations; i.e., equations of the form

xn+1 = a0xn+ a1xn−1+ · · · + ak−1xn−k+1

where a0, a1, . . . ak−1 are constants and are independent of n. Some brief remarks about the special cases k = 1 and k = 2 will illuminate the solution process. If k = 1, then our constant-coefficient difference equation can be written as xn+1 = axn, where a is a constant. Obtaining a closed formula for the solution is easy, because each iterate is a constant multiple of the previous iterate. The solution is xn= anx0.

Now suppose that k = 2. Based upon our above remarks, any second-order constant-coefficient difference equation can be written as a system

xn+1 = a11xn+ a12yn yn+1 = a21xn+ a22yn.

Letting

Notice that each vector of iterates is updated by multiplying the previous vector of iterates by the coefficient matrix A. Thus,

· xn

which means that the closed form solution of such a system is obtained by first computing powers An of the coefficient matrix, and then multiplying by the vector of initial conditions.

Observation: If we can find the appropriate canonical form for A, it is easy to compute powers of A. For example,

• If A is diagonalizable, then we may write A = P DP−1 where P is an invertible matrix and D is diagonal. In this case, An= P DnP−1.

• If A is not diagonalizable but has real eigenvalues, then we may write A = S+N where S is diagonalizable, N is nilpotent, and SN = NS. If we then write S = P DP−1 where D is diagonal, then powers of S can be computed from Sk = P DkP−1. Since S and N commute, then we may use the binomial

The fact that N is nilpotent implies that many of the terms in this sum will likely vanish, because large powers of N will always be 0. In principle, this sum could be computed to obtain a closed formula for the solution, although doing so would be tedious.

• If A has complex conjugate eigenvalues, then finding the real canonical form for A would facilitate computing large powers of A.

We now illustrate these ideas via examples.

Example. Solve the system

Solution: Let A denote the coefficient matrix. The characteristic equation is λ2− 5λ + 6 = 0 and, by factoring, we find that the eigenvalues are λ = 2 and λ = 3.

You should check that ·

−1 The powers of A are given by

An = P DnP−1 = P Multiplying by the vector of initial conditions, the solution of the initial value prob-lem is given by

Notice that the solution involves powers of the eigenvalues. By contrast, we know that solutions of systems of ODEs involve exponential functions with eigenvalues appearing in the exponents.

Example. Solve the Fibonacci equation xn+1 = xn+ xn−1 with x0 = x1 = 1.

Solution: First, we write the equation as a system by introducing yn = xn−1. The initial condition for y would be y0 = x−1, which requires us to generate the iterate that precedes x0, taking one step “backwards in time”. From Fibonacci’s equation, it must be the case that x−1 + x0 = x1, from which we conclude that x−1 = 0. The

As before, we let A denote the coefficient matrix. The characteristic equation is given by λ2− λ − 1 = 0, which has roots

λ = 1 ±√ 5.

To find an eigenvector for the positive eigenvalue λ+, note that A − λ+I =

· 1 − λ+ 1

1 −λ+

¸

has reduced row-echelon form ·

1 −λ+

is an eigenvector for λ+. Recycling the same computations, it follows that

· λ Multiplying An by the vector of initial conditions,

· xn

Notice that the second row of the solution vector is identical to the first row, with (n+1) replaced by n. This is not at all surprising if we recall that the variable ynwas introduced to substitute for xn−1. Only the first component of the solution vector is important for our purposes, as it provides a closed formula for xn, the solution of the Fibonacci equation:

You may find it mildly surprising that the closed formula involves powers of the irrational numbers λ+ and λ even though the Fibonacci sequence consists only of

positive integer values.

Example. Solve the initial value problem

· xn+1

Solution: The coefficient matrix A has a repeated real eigenvalue λ = 2. By itself, this is not enough to conclude that A is non-diagonalizable. However, if you try to compute eigenvectors for A, you will find that the eigenvalue only has geometric multiplicity 1. Hence, A is not diagonalizable, and we must write A = S + N where S is diagonalizable and N is nilpotent. This could be accomplished by finding a generalized eigenvector for λ = 2; however, in this case we may exploit the relatively simple form of A in order to write A = 2I + N where I is the identity matrix and

N =

· 0 1 0 0

¸

is nilpotent of order 2. Clearly 2I and N commute since I is the identity matrix.

Now, using the binomial theorem, we may compute powers of A:

An = (2I + N)n =

Since N is nilpotent of order 2, we know that N2 (and all higher powers of N) will be the zero matrix. Thus, only the first two terms of this summation survive. The relevant binomial coefficients are¡n

0

¢= 1 and ¡n

1

¢= n, and the summation simplifies to An = 2nN0+ n2n−1N1. In other words,

Finally, multiplying by the vector or initial conditions yields the closed formula

· xn

Example. Solve the initial value problem

xn+1 = 3xn− 18yn x0 = 1 yn+1 = 2xn− 9yn y0 = 1.

Solution: The characteristic equation associated with the coefficient matrix v satisfy (A − λI)v = 0. The reduced row-echelon form of

A − λI = A + 3I =

is an eigenvector, and the eigenspace for λ = −3 is only one-dimensional. We con-clude that A is non-diagonalizable, which suggests that we seek generalized eigen-vectors by solving (A − λI)2w = 0. However, because (A + 3I)2 = 0, the matrix

N = A + 3I =

· 6 −18 2 −6

¸

is nilpotent of order 2. This observation provides a useful decomposition for the matrix A, namely A = −3I + N. Since the matrix −3I clearly commutes with N, we are allowed to use the binomial theorem to calculate powers of A:

An = (−3I + N)n =

Since N is nilpotent of order 2, only the first two terms in this sum survive:

An =

Here, the binomial coefficients are¡n

0

and the solution to the initial value problem is

If the coefficient matrix associated with a constant-coefficient system of difference equations has complex conjugate eigenvalues, writing the closed-form solution can be messy. For example, consider the initial value problem

xn+1 = −yn x0 = 1

is in real canonical form. If this had been a system of ODEs, we would expect periodic solutions involving sin t and cos t. In some sense, the behavior of this discrete system is similar, as we can see by computing the first few iterates:

· x1

Evidently, this pattern will repeat, and the iterates will cycle through the four differ-ent vectors shown here. Writing a closed formula for the solution is straightforward, but doing so is a bit awkward because there are four cases to consider.

In general, if the coefficient matrix A has a pair of complex conjugate eigenvalues α ± βi, it is useful to transform A into real canonical form:

A = P

· α −β

β α

¸ P−1,

where P is a suitably-chosen invertible matrix. Letting M denote the real canonical form for A, powers of A can be computed using An= P MnP−1. To calculate powers of M, it is helpful to split M as

M =

· α −β ¸

= αI + B,

where

B =

· 0 −β

β 0

¸ .

Certainly αI commutes with B, which allows us to use the binomial theorem when computing Mn = (αI + B)n. Moreover, since B2 = −β2I, we may calculate that B3 = −β2B and B4 = β4I. Since B4 is a constant multiple of the identity matrix, we might expect the same sorts of cyclic oscillations that we saw in the example above.

Finally, we remark that solving inhomogeneous constant-coefficient difference equations is straightforward, but we shall not discuss the techniques here. Indeed, for the inhomogeneous equation

xn+1 = a1xn+ a2xn−1+ · · · + akxn−k+1+ g(n),

it is possible to state an analogue of the variation of parameters formula (2.18) for ODEs. Due to the discrete nature of difference equations, the solution contains a summation involving g(n), as opposed to the integral in (2.18).