Deturck, Wilf - Lecture Notes on Numerical Analysis (523142), страница 2
Текст из файла (страница 2)
We can write it in the form(D n + a1 D n−1 + a2 D n−2 + · · · + an )y = 0 ,(1.2.9)in which D is the differential operator d/dx. In the parentheses in (1.2.9) we see thepolynomial ϕ(D), where ϕ is exactly the characteristic polynomial in (1.2.8).Since ϕ(α) has the factor (α − α∗ )p , it follows that ϕ(D) has the factor (D − α∗ )p , sothe left side of (1.2.9) can be written in the formg(D)(D − α∗ )p y = 0 ,(1.2.10)∗where g is a polynomial of degree n − p. Now it’s quite easy to see that y = xk eα x satisfies(1.2.10) (and therefore (1.2.7) also) for each k = 0, 1, .
. . , p − 1. Indeed, if we substitute thisfunction y into (1.2.10), we see that it is enough to show that∗(D − α∗ )p (xk eα x ) = 0k = 0, 1, . . . , p − 1 .(1.2.11)10Differential and Difference Equations∗∗However, (D − α∗ )(xk e−α x ) = kxk−1 eα x , and if we apply (D − α∗ ) again,∗∗(D − α∗ )2 (xk e−α x ) = k(k − 1)xk−2 eα x ,∗etc. Now since k < p it is clear that (D − α∗ )p (xk e−α x ) = 0, as claimed.To summarize, then, if we encounter a root α∗ of the characteristic equation, of multiplicity p, then corresponding to α∗ we can find exactly p linearly independent solutions ofthe differential equation, namely∗∗∗∗eα x , xeα x , x2 eα x , .
. . , xp−1 eα x .(1.2.12)Another way to state it is to say that the portion of the general solution of the givendifferential equation that corresponds to a root α∗ of the characteristic polynomial equation∗is Q(x)eα x , where Q(x) is an arbitrary polynomial whose degree is one less than themultiplicity of the root α∗ .One last mild complication may arise from roots of the characteristic equation that arenot real numbers. These don’t really require any special attention, but they do present a fewoptions. For instance, to solve y 00 + 4y = 0, we find the characteristic equation α2 + 4 = 0,and the complex roots ±2i.
Hence the general solution is obtained by the usual rule asy(x) = c1 e2ix + c2 e−2ix .(1.2.13)This is a perfectly acceptable form of the solution, but we could make it look a bit prettierby using deMoivre’s theorem, which says thate2ix = cos 2x + i sin 2xe−2ix = cos 2x − i sin 2x.(1.2.14)Then our general solution would look likey(x) = (c1 + c2 ) cos 2x + (ic1 − ic2 ) sin 2x.(1.2.15)But c1 and c2 are just arbitrary constants, hence so are c1 + c2 and ic1 − ic2 , so we mightas well rename them c1 and c2 , in which case the solution would take the formy(x) = c1 cos 2x + c2 sin 2x.(1.2.16)Here’s an example that shows the various possibilities:y (8) − 5y (7) + 17y (6) − 997y (5) + 110y (4) − 531y (3) + 765y (2) − 567y 0 + 162y = 0.
(1.2.17)The equation was cooked up to have a characteristic polynomial that can be factored as(α − 2)(α2 + 9)2 (α − 1)3 .(1.2.18)Hence the roots of the characteristic equation are 2 (simple), 3i (multiplicity 2), −3i (multiplicity 2), and 1 (multiplicity 3).1.3 Difference equations11Corresponding to the root 2, the general solution will contain the term c1 e2x . Corresponding to the double root at 3i we have terms (c2 + c3 x)e3ix in the solution. From thedouble root at −3i we get a contribution (c4 + c5 x)e−3ix , and finally from the triple rootat 1 we get (c6 + c7 x + c8 x2 )ex . The general solution is the sum of these eight terms.Alternatively, we might have taken the four terms that come from 3i in the form(c2 + c3 x) cos 3x + (c4 + c5 x) sin 3x.(1.2.19)Exercises 1.21.
Obtain the general solutions of each of the following differential equations:(a) y 00 + 5y 0 + 6y = 0(b) y 00 − 8y 0 + 7y = 0(c) (D + 3)2 y = 0(d) (D2 + 16)2 y = 0(e) (D + 3)3 (D 2 − 25)2 (D + 2)3 y = 02. Find a curve y = f (x) that passes through the origin with unit slope, and whichsatisfies (D + 4)(D − 1)y = 0.1.3Difference equationsWhereas a differential equation is an equation in an unknown function, a difference equationis an equation in an unknown sequence. For example, suppose we know that a certainsequence of numbers y0 , y1 , y2 , . . . satisfies the following conditions:yn+2 + 5yn+1 + 6yn = 0n = 0, 1, 2, .
. .(1.3.1)and furthermore that y0 = 1 and y1 = 3.Evidently, we can compute as many of the yn ’s as we need from (1.3.1), thus we wouldget y2 = −21, y3 = 87, y4 = −309 so forth. The entire sequence of yn ’s is determined bythe difference equation (1.3.1) together with the two starting values.Such equations are encountered when differential equations are solved on computers.Naturally, the computer can provide the values of the unknown function only at a discreteset of points.
These values are computed by replacing the given differential equations bya difference equation that approximates it, and then calculating successive approximatevalues of the desired function from the difference equation.Can we somehow “solve” a difference equation by obtaining a formula for the valuesof the solution sequence? The answer is that we can, as long as the difference equation islinear and has constant coefficients, as in (1.3.1). Just as in the case of differential equationswith constant coefficients, the correct strategy for solving them is to try a solution of the12Differential and Difference Equationsright form. In the previous section, the right form to try was y(x) = eαx . Now the winningcombination is y = αn , where α is a constant.In fact, let’s substitute αn for yn in (1.3.1) to see what happens.
The left side becomesαn+2 + 5αn+1 + 6αn = αn (α2 + 5α + 6) = 0.(1.3.2)Just as we were able to cancel the common factor eαx in the differential equation case, sohere we can cancel the αn , and we’re left with the quadratic equationα2 + 5α + 6 = 0.(1.3.3)The two roots of this characteristic equation are α = −2 and α = −3. Therefore thesequence (−2)n satisfies (1.3.1) and so does (−3)n . Since the difference equation is linear,it follows thatyn = c1 (−2)n + c2 (−3)n(1.3.4)is also a solution, whatever the values of the constants c1 and c2 .Now it is evident from (1.3.1) itself that the numbers yn are uniquely determined if weprescribe the values of just two of them.
Hence, it is very clear that when we have a solutionthat contains two arbitrary constants we have the most general solution.When we take account of the given data y0 = 1 and y1 = 3, we get the two equations(1 = c1 + c23 = (−2)c1 + (−3)c2(1.3.5)from which c1 = 6 and c2 = −5.
Finally, we use these values of c1 and c2 in (1.3.4) to getyn = 6(−2)n − 5(−3)nn = 0, 1, 2, . . . .(1.3.6)Equation (1.3.6) is the desired formula that represents the unique solution of the givendifference equation together with the prescribed starting values.Let’s step back a few paces to get a better view of the solution. Notice that the formula(1.3.6) expresses the solution as a linear combination of nth powers of the roots of theassociated characteristic equation (1.3.3). When n is very large, is the number yn a largenumber or a small one? Evidently the powers of −3 overwhelm those of −2, so the sequencewill behave roughly like a constant times powers of −3. This means that we should expectthe members of the sequence to alternate in sign and to grow rapidly in magnitude.So much for the equation (1.3.1).
Now let’s look at the general case, in the form of alinear difference equation of order p:yn+p + a1 yn+p−1 + a2 yn+p−2 + · · · + ap yn = 0.(1.3.7)We try a solution of the form yn = αn , and after substituting and canceling, we get thecharacteristic equationαp + a1 αp−1 + a2 αp−2 + · · · + ap = 0.(1.3.8)1.3 Difference equations13This is a polynomial equation of degree p, so it has p roots, counting multiplicities, somewhere in the complex plane.Let α∗ be one of these p roots. If α∗ is simple (i.e., has multiplicity 1) then the partof the general solution that corresponds to α∗ is c(α∗ )n . If, however, α∗ is a root ofmultiplicity k > 1 then we must multiply the solution c(α∗ )n by an arbitrary polynomialin n, of degree k − 1, just as in the corresponding case for differential equations we used anarbitrary polynomial in x of degree k − 1.We illustrate this, as well as the case of complex roots, by considering the followingdifference equation of order five:yn+5 − 5yn+4 + 9yn+3 − 9yn+2 + 8yn+1 − 4yn = 0.(1.3.9)This example is rigged so that the characteristic equation can be factored as(α2 + 1)(α − 2)2 (α − 1) = 0(1.3.10)from which the roots are obviously i, −i, 2 (multiplicity 2), 1.Corresponding to the roots i, −i, the portion of the general solution is c1 in + c2 (−i)n .Sincenπnπin = einπ/2 = cos+ i sin(1.3.11)22and similarly for (−i)n , we can also take this part of the general solution in the formnπc1 cos2nπ+ c2 sin.2(1.3.12)The double root α = 2 contributes (c3 + c4 n)2n , and the simple root α = 1 adds c5 tothe general solution, which in its full glory isyn = c1 cosnπ2+ c2 sinnπ2+ (c3 + c4 n)2n + c5 .(1.3.13)The five constants would be determined by prescribing five initial values, say y0 , y1 , y2 , y3and y4 , as we would expect for the equation (1.3.9).Exercises 1.31.
Obtain the general solution of each of the following difference equations:(a) yn+1 = 3yn(b) yn+1 = 3yn + 2(c) yn+2 − 2yn+1 + yn = 0(d) yn+2 − 8yn+1 + 12yn = 0(e) yn+2 − 6yn+1 + 9yn = 1(f) yn+2 + yn = 014Differential and Difference Equations2. Find the solution of the given difference equation that takes the prescribed initialvalues:(a)(b)(c)(d)yn+2 = 2yn+1 + yn ; y0 = 0; y1 = 1yn+1 = αyn + β; y0 = 1yn+4 + yn = 0; y0 = 1; y1 = −1; y2 = 1; y3 = −1yn+2 − 5yn+1 + 6yn = 0; y0 = 1; y1 = 23. (a) For each of the difference equations in problems 1 and 2, evaluateyn+1limn→∞ yn(1.3.14)if it exists.(b) Formulate and prove a general theorem about the existence of, and value of thelimit in part (a) for a linear difference equation with constant coefficients.(c) Reverse the process: given a polynomial equation, find its root of largest absolutevalue by computing from a certain difference equation and evaluating the ratiosof consecutive terms.(d) Write a computer program to implement the method in part (c).