Shampine, Allen, Pruess - Fundamentals of Numerical Computing (523185), страница 43
Текст из файла (страница 43)
Fora proof, see [3].Let f(x,y) be continuous for all x in the finite interval [a,b] andTheorem 6.1.all y and satisfy (6.3). Then for any number A, the initial value problem y´ = f(x,y),y(a) = A has a unique solution y(x) that is defined for all x in [a,b].So far we have spoken of a single equation in a single unknown y(x). More commonly there are several unknowns. By a system of m first order differential equationsin m unknowns is meant(6.4)6.1 SOME ELEMENTS OF THE THEORY213Along with the equations (6.4) there are initial conditionsY1(a) = A1Y2(a) = A2(6.5)Ym(a) = Am.This can be written in tidy fashion using vector notation.
If we let(6.6)then (6.4) and (6.5) becomeY´ = F(x, Y)(6.7)Y(a) = A.We again refer to the combination of (6.4) and (6.5) as an initial value problem. Usingvector notation makes the case of m unknowns look like the case of one unknown. Oneof the fortunate aspects of the theory of the initial value problem is that the theory fora system of m first order equations is essentially the same as for a single one. Proofsfor systems just introduce vectors and their norms where there are scalars and absolutevalues in the proofs for a single equation. For the vector function F( x,Y) to satisfya Lipschitz condition, it is sufficient that each Fi ( x, Y1, Y2,.
. . , Ym) satisfy a Lipschitzcondition with respect to each variable Yj; that is, there are constants Lij such thatfor each i, j. With this, the natural analog of Theorem 6.1 holds. Since the theory ofnumerical methods for a system of equations is also essentially the same as for a singleequation, we content ourselves with treating the case of a single equation in detail andjust state the analog for systems.Most computer codes require the problem to be provided in the standard form(6.4) and (6.5), but equations arise in a great variety of forms. For example, secondorder equations, that is, equations of the formy´´ = g(x,y,y´),are quite common in the context of dynamical systems.
The definition of a solution is the obvious extension of the first order case and suitable initial conditions arey(a) = A1, y´(a) = A2. This is a second order equation for one unknown quantity, y(x).An equivalent problem in the standard form (6.4) can be found by introducing twounknown quantities and finding two first order equations satisfied by them. One of thenew unknowns has to provide us with the original unknown, so we take Y1(x) = y(x).214CHAPTER 6ORDINARY DIFFERENTIAL EQUATIONSWe take the other unknown to be the derivative of the original unknown, Y2(x) = y´(x).Differentiating the new unknown quantities, we find thatY´1 = y´(x) = Y2(x),Y´2 = y´´(x) = g(x,y(x),y´(x)) = g(x,Y1 (x),Y2 (x)).In this way we come to the system of two first order equations in two unknowns:Y´1 = Y2Y´2 = g(x,Y1,Y2).This is in standard form and the theory may be applied to it to conclude the existenceof unique functions Y1(x) and Y2(x) that satisfy initial conditionsY1(a) = A1Y2(a) = A2.The solution of the original problem is obtained from y(x) = Y1(x).
To verify this, firstnotice that one of the equations states that y´(x) = Y´1(x) = Y2(x), and the other thaty´´(x) = Y´2 (x) = g(x,Y1 (x),Y2 (x)) = g(x,y(x),y´(x)).Similarly it is found that the initial conditions are satisfied.The general mth order equation in one unknown,y(m) = g(x, y, y´, .
. . , y(m-1)y(a) = A1 ,y´(a) = A2 ,. . . , y(m-1) = Am ,can be put into standard form via the m unknowns Y1(x) = y(x), Y2(x) = y´(x), . . .,Ym(x) = y(m-l)(x) andExample 6.4.To convert the initial value problemy´´ + (y2- l)y´ + y = 0, y(0) = 1, y´(0) = 4into a system of first order equations, letY1(x) = y(x), Y2(x) = y´(x)ThenY´1 = y´ = Y2Y´2 = y´´ = -(Y21 - l)Y2 - Y16.1 SOME ELEMENTS OF THE THEORY215andY1(0) = 1, Y2(0) = 4.This can be put into the form (6.7) by definingExample 6.5.Consider the system of second order equationsLet Y1(x) = u(x), Y2(x) = u´(x), Y3(x) = v(x), and Y4(x) = v´(x). Then the equationsareY´2 + 5Y4 + 7Y1 = sinx,Y´4 + 6Y4 + 4Y2 + 3Y1 + Y3 = cosx,which is rearranged aswith initial conditionsY 1 (0) = 1, Y2 (0) = 2, Y3 (0) = 3, Y4 (0) = 4.To put this into the form (6.7) defineandNotice that for each unknown in the original set of equations, new unknowns are introduced for the original unknown and each of its derivatives up to an order one lessthan the highest appearing in the original set of equations.nThe procedure we have illustrated is the usual way to convert a system of higherorder equations to a system of first order equations.
There are, however, other ways todo it. For some examples, see Exercise 6.6.216CHAPTER 6ORDINARY DIFFERENTIAL EQUATIONSEXERCISES6.1 As an example of nonuniqueness of solutions, verifythat for any constant c, 0 < c < b, the function y(x)defined byis a solution of the initial value problem(d) y´ = 100(sinx - y) , y(0) = 0;y(x) = [102(e-100xcosx) + 104 sin x]/(104 + 1)-6.5 Do the following functions satisfy a Lipschitz condition? If so, give suitable constants.(a) f(x,y) = 1 + y2 for 0 < x π/ 2(b) f(x,y) = 1 - 2xy for 0 < x < b(c) f(x,y) = y/x for 1 < x < 26.2 Consider the problem(d) f(x,y) = y/x for -1 < x < 1(e) f(x,y) = cosx siny for -106 < x < 1066.6 Verify for each of the following systems of equationsVerify that(a) y(x) = 1 is a solution on any interval containingx = 0,(b) y(x) = coshx is a solution on [0,b] for any b > 0,and(c) y(x) = cosx is a solution on a suitable interval.What is the largest interval containing x = 0 on whichcosx is a solution?6.3 Verify the statement in the text that Dawson’s integralis a solution of the initial value problemy´ = l - 2x yy (0) = 0.6.4 For each initial value problem, verify that the giveny(x) is a solution.(a) Y´1 = Y2, Y´2 = -x2Y1 - xY2(b) Y´1 =(c) Y´1 = -(x/ 2 )Y1 + Y2, Y´2 = (1/2 - 3x 2/4)Y1 ( x / 2 )Y 2that Y1(x) = y(x), where y(x) satisfies the second orderequationy´´(x) + xy´(x) + x2y(x) = 0.6.7 Put the following problems in standard form.
Differentiation is with respect to t.(a) u(4) + etu´ - tu = cos αt(b) u´´ + v´ cost + u = t,v´ + u´ + v = et(c) u´´ + 3v´ + 4u + v = 8t,u´´ - v´ + u + v = cost(d) mx´´ = X(t, x, y, z, x´, y´, z´),my´´ = Y(t, x, y, z, x´, y´, z´),mz´´ = Z(t, x, y, z, x´, y´, z´)(e) u(6) + uu´ = et6.2 A SIMPLE NUMERICAL SCHEMELet us again consider the initial value problem (6.1) and (6.2),y´ = f(X,Y)y(a) = A,on the interval [a,b]. The numerical methods we consider generate a table of approximate values for y(x).
For the moment we suppose that the entries are for equally6.2 A SIMPLE NUMERICAL SCHEME217spaced arguments in x. That is, we choose an integer N and for h = ( b - a) /N, weconstruct approximations at the points xn = a + nh for n = 0, 1, . . . , N. The notationy(xn) is used for the solution of (6.1) and (6.2) evaluated at x = xn, and yn is used foran approximation to y(xn).A differential equation has no “memory.” If we know the value y(xn), Theorem 6.1applies to the problemu´ = f(x,u)u(xn) = y(xn)and says that the solution of this initial value problem on the interval [xn,b] is justy(x). [After all, y(x) is a solution and the theorem says there is only one.] That is, thevalues of y(x) for x prior to x = xn, do not directly affect the solution of the differentialequation for x after xn.
Some numerical methods have memory and some do not. Theclass of methods known as one-step methods have no memory—given yn, there is arecipe for the value yn + 1 that depends only on xn, yn, f, and h. Starting with the obviousinitial value y0 = A, a one-step method generates a table for y(x) by repeatedly takingone step in x of length h to generate successively y1, x2, .
. . .The simplest example of a one-step method is Euler’s method. We study it becausethe details do not obscure the ideas and the general case is much the same. A Taylorseries expansion of y(x) about x = x, giveswith xn < ξn < xn+1, provided that y(x)(6.1), this isUsing the fact that y(x) satisfies(6.8)For small h,This relation suggestsEuler’s method:y0 = Ayn+l = yn + hf(xn,yn), n = 0, 1, . . . , N - 1.(6.9)Example 6.6. Tabulate Dawson’s integral on [0, 0.5] using Euler’s scheme with h =0.1. Recall from Example 6.3 that Dawson’s integral is the solution of the initial valueproblemy´ = 1 - 2x yy(0) = 0.218CHAPTER 6ORDINARY DIFFERENTIAL EQUATIONSTaking y0 = 0, we see thaty1 = 0 + 0.1 × (1 - 2 × 0 × 0) = 0.l;similarly,y2 = 0.1 + 0.l × (1 - 2 × 0.1 × 0.1) = 0.198.Continuing in this manner, the following table results.