Conte, de Boor - Elementary Numerical Analysis. An Algorithmic Approach (523140), страница 59
Текст из файла (страница 59)
Linear differential equations possess the importantproperty that if y1(x), y2(x), . . . , ym(x) are any solutions of (8.l), then so isC1y1(x) + C2y2(x) + · · · + Cmym(x) for arbitrary constants Ci . A simplesecond-order equation is y´´ = y. It is easily verified that ex and e-x aresolutions of this equation, and hence by linearity the following sum is alsoa solution:y(x) = C 1 e x + C 2 e - x(8.2)Two solutions y1, y2 of a second-order linear differential equation are saidto be linearly independent if the Wronskian of the solution does not vanish,the Wronskian being defined by(8.3)The concept of linear independence can be extended to the solutions ofequations of higher order.
If y1(x), y(2(x), . . . , yn(x) are n linearly independent solutions of a homogeneous differential equation of order n, theny(x) = C 1 y 1 (x) + C 2 y 2 (x)is called the general solution.Among linear equations, those withlarly useful since they lend themselves ton th-order linear differential equation with+ · · · + C n y n (x)constant coefficients are particua simple treatment.
We write theconstant coefficients in the formLy = y (n) + a n-1 y (n-1) + · · · + a 0 y(0) = 0(8.4)348THE SOLUTION OF DIFFERENTIAL EQUATIONSwhere the ai are assumed to be real. If we seek solutions of (8.4) in theform eβ x, then direct substitution shows that β must satisfy the polynomialequationβ n + an-1 β n-1 + · · · + a0 = 0(8.5)This is called the characteristic equation of the nth-order differentialequation (8.4). If the equation (8.5) has n distinct roots β i (i = 1, .
. . , n),then it can be shown that(8.6)where the Ci are arbitrary constants, is the general solution of (8.4). Ifβ 1 = α + iβ is a complex root of (8.5), so is its conjugate, β 2 = α - i β.Corresponding to such a pair of conjugate-complex roots are two solutionsy1 = e α x cos βx and y2 = eα x sin βx, which are linearly independent.When (8.5) has multiple roots, special techniques are available for obtaining linearly independent solutions.
In particular, if β 1 is a double root of(8.5), then y1 =and y2 =are linearly independent solutions of(8.4). For the special equation y´´ + a2y = 0, the characteristic equation isβ 2 = -a2; its roots are β 1,2 = ± ia, and its general solution is y(x) =C1 cos ax + C2 sin ax.Finally, if Eq. (8.1) is linear but nonhomogeneous, i.e., ifLY = g(x)and if ζ(x) is a particular solution of (8.7), i.e., ifLζ = g(x)then the general solution of (8.7), assuming that the roots of (8.5) aredistinct, is(8.8)Example Find the solution of the equation(a) y´´ -4y´ + 3y = xsatisfying the initial conditions( b ) y(0) = 4/9y´(0) = 7/31.
To find a particular solution ζ(x) of (a), we try ζ(x) = aX + b, since the right side isa polynomial of degree < 1 and the left side is such a polynomial whenever y = y(x)is. Substituting into (a), we find that a = 1/3, b = 4/9. Hence2. To find solutions of the homogeneous equationy´´ - 4y´ + 3y = 0we examine the characteristic equationβ 2 - 4β + 3 = 0Its roots are β1 = 3, β 2 = 1. Hence the two linearly independent solutions of the8.2SIMPLE DIFFERENCE EQUATIONS349homogeneous system arey 1 (x) = e 3 xy 2 (x) = e x3.
The general solution of equation (a) is44. To find the solution satisfying conditions (b), we must havey (0) = 4/9 + C1 + C1 = 4/9y ´(0) = 1/3 + 3C1 + C2 = 7/3The solution of this system is C1 = 1, C2 = -1. Hence the desired solution isEXERCISES8.1-l Find the general solution of the equations(a) y´ = -2y(c) y´´´ - 2y´´ - y´ + 2y = 0(e) y´ - xy = ex(b) y´´ - 4y´ + 4y = 0(d) y´ - ay = x(f) y´´ - 2y´ + 2y = 08.1-2 Find the solution of the following initial-value problems:(a) y´ + 2y = 1(b) y´´ - a2y = 0(c) y´´ - 4y´ + 4y = xy (0) = 1y (0) = 0y (0) = 0y ´(0) = 1y ´(0) = 18.2 SIMPLE DIFFERENCE EQUATIONSTo analyze numerical methods for the solution of differential equations, itis necessary to understand some simple theory of difference equations.
Adifference equation of order N is a relation between the differencesy n = ∆0 yn, ∆1 yn ∆2 yn, . . . , ∆Nyn of a number sequence, i.e.,∆ Nyn = f(n, yn, ∆yn, . . . , ∆N-1 y n )(8.9)A solution of such a difference equation is a sequence ym, ym+1, ym+2, . . .of numbers such that (8.9) holds for n = m, m + 1, m + 2, . . . . Hence,whereas a differential equation involves functions defined on some intervalof real numbers, and their derivatives, a difference equation involvesfunctions defined on some “interval” of integers, and their differences.If (8.9) is a linear difference equation, so that the right side of (8.9)depends linearly on yn, . .
. , ∆ N-1yn, then it is possible and customary towrite (8.9) explicitly in terms of the yj’s asyn+N + an,N-1yn+N-1 + an,N-2yn+N-2 + · · · + an,0yn = bn350THE SOLUTION OF DIFFERENTIAL EQUATIONSEvidently, a linear difference equation of order N can be viewed as a(finite or infinite) system of linear equations whose coefficient matrix is abanded matrix of bandwidth N + 1.Simple examples of linear difference equations areall n(8.10 a)yn+1 - yn = nall n > 0(8.10b)y n + l - (n + 1)yn = 0all n > 0(8.10c)yn+1 - yn = lall n(8.10d)yn+2 - (2 cos γ)yn+1 + yn = 0By direct substitution, these equations can be shown to have the solutionsyn = n + cyn = cn!yn = c cos γnall n(8.11 a)all n > 0(8.11b)all n > 0all n(8.11c)(8.11d)with c an arbitrary constant.We consider in detail a homogeneous linear difference equation oforder N with constant coefficients(8.12)yn+N + aN-1yn+N-1 + · · · + a0yn = 0As with homogeneous linear differential equations with constantcoefficients, we seek solutions of the form yn = β n, all n.
Substituting into(8.12) yieldsDividing by β n, we obtain the characteristic equation(8.13)The characteristic polynomial is of degree N. We assume, first, that its zerosβ 1, β 2, . . . , β N are distinct. Thenare all solutions of(8.12), and by linearity it follows thatall n(8.14)for arbitrary constants ci is also a solution of (8.12). Moreover, in this caseit can be shown that (8.14) is the general solution of (8.12).As an example, the difference equationy n + 3 - 2yn+2 - yn+1 + 2yn = 0(8.15)is of third order, and its characteristic equation isβ 3 - 2β 2 - β + 2 = 0The roots of this polynomial equation are +1, -1, 2, and the general8.2SIMPLE DIFFERENCE EQUATIONS351solution of (8.15) isyn = c1 (1) n + c2(-1) n + c3 (2) n= c 1 + (-l)nc2 + 2n c 3(8.16)If the first N - 1 values of yn are given, the resulting initial-value difference equation can be solved explicitly for all succeeding values of n.Thus in (8.15), if y0 = 0, y1 = 1, y2 = 1, then y3 as computed from (8.15) isy3 = 2(l) + 1 - 0 = 3Continuing to use (8.15), we find that y4 = 5, y5 = 11, etc.
This does notyield a closed formula for yn . However, using (8.16) and imposing theinitial conditions for n = 0, 1, 2, we obtain the following system of equations for c1, c2, c3:0 = c1 + c2 + c31 = c1 - c2 + 2c 31 = c1 + c2 + 4c 3Its solution is c1 = 0, c2 = - 1/3, c3 = 1/3, so that the closed-form solution ofthe initial-value problem isIf the characteristic polynomial in (8.13) has a pair of conjugate-complex zeros, the solution can still be expressed in real form.
Thus, ifβ 1 = α + iβ and β 2 = α - iβ, we first express β 1,2 in polar form,where rand θ = arctan (β/α). Then the solution of (8.12)corresponding to this pair of zeros iswhere C1 = c1 + c2 and C2 = i(c1 - c2 ). As a simple example, we considerthe difference equation(8.17)y n + 2 - 2yn+1 + 2yn = 02Its characteristic equation is β - 2β + 2 = 0, and the roots of thisequation are β 1,2 = 1 ± i. Hence r =a n d θ = π/4, so that thegeneral solution of (8.17) is352THE SOLUTION OF DIFFERENTIAL EQUATIONSIf β 1 is a double root ofsecond solution of (8.13) isdouble zero of p(β), then p(β 1)in (8.12) andstituting yn =the characteristic equation (8.13), then aTo verify this, we note first that if β 1 is a= 0 and also p´(β 1) = 0. Now on subrearranging, we find thatsince p(β 1) = p´(β 1) = 0. It can, moreover, be shown that these twosolutionsandare linearly independent.As an illustration, for the difference equationy n + 3 - 5yn+2 + 8yn+l - 4yn = 0the roots of the characteristic equation are 2, 2, 1, and the general solutionisyn = 2n (c1 + nc2 ) + c3We consider, finally, the solution of the nonhomogeneous linear difference equation with constant coefficients.
The general solution of theequationyn+N + aN-1yn+N-1 + · · · + a0yn = bncan be written in the form(8.18)yn = ynG + ynPwhere yn is the general solution of the homogeneous system (8.12), and ynPis a particular solution of (8.18). In the special case when b n = b is aconstant, a particular solution can easily be obtained by setting ynP = A (aconstant) in (8.18). Substitution of yn = A in (8.18) leads to the determinationGprovided that the sum of the coefficients does not vanish.For example, the general solution of the nonhomogeneous equationy n + 2 - 2yn+l + 2yn = 1isThe simple properties of difference equations considered here will besufficient for the applications in the remainder of this chapter.Example Show that the general solution of the difference equation(a) y n+2 - (2 + h 2 ) yn+1 + yn = h28.2SIMPLE DIFFERENCE EQUATIONS353can be expressed in the formSOLUTION1.