You are on page 1of 6
11.1 The Linear Shooting Method 625 ‘When the beam is of uniform thickness, the product £1 is constant, and the exact solution is easily obtained. In many applications, however, the thickness is not uniform, so the moment of inertia 7 is a function of x, and approximation techniques are required. Problems of this type are considered in Exercises 7 of: ion 11.3 and 6 of Section 11.4. ‘Methods for finding approximate solutions to differential equations, studied in Chapter 5, require that all conditions imposed on the differential equation occur at an initial point For a second-order equation, we need to know both w(0) and w/(0), whieh is not the case in this problem. New techniques are required for handling problems when the conditions imposed are of a boundary-value rather than an initial-value type. Physical problems that are position-dependent rather than time-dependent are often described in terms of differential equations with conditions imposed at more than one point. The two-point boundary-value problems in this chapter involve a second-order differential equation of the form any y"=fayy asxb, together with the boundary conditions (11.2) ya) w and yb) = 8 11.1 The Linear Shooting Method Theorem 11.1 The following theorem gives general conditions that ensure that the solution to a second- order boundary value problem exists and is unique. The proof of this theorem can be found in (KH Suppose the function / in the boundary-value problem "=fayy), asxsh y= 3b) = B. is continuous on the set D={ayylasxSbh, wc y O forall (x, y, »") © D, and (ii) A constant M exists, with Hesyyo] SM, forall (yyy €D, ay then the boundary-value problem has a unique solution, . 626 EXAMPLE 1 Corollary 11.2 CHAPTER 11 * Bowndary-Value Problems for Ordinary Differential Equations ‘The boundary-value problem yl +e! + siny! = 1=x=2, y()=)Q)=0, has f@yy) = -e = siny’, Since Lony9' =xe" >0 and Se vy) this problem has a unique solution. . When f(s», 9) has the form fe y') = pOdy! + gay + rx), the differential equation y= fay) is linear. Problems of this type frequently occur, and in this situation Theorem 11.1 can be simplified. If the linear boundary-value problem y" = ply’ +qQ)y tr), asx=b, yla) wb) = B satisfies i) p(x), g(4), and r(x) are continuous on [a, b], Gi) ga) > Oona, b], then the problem has a unique solution. . ‘To approximate the unique solution guaranteed by the satisfaction of the hypotheses of Corollary 11.2, let us first consider the initial-value problems (13) y" = pty! +qQ)y tr), a=x=b yla=a y@=0, and ata) = pWy'+q@y asxsb, yla)=0, yal Theorem 5.16 in Section 5.9 ensures that under the hypotheses in Corollary 11.2, both problems have a unique solution. If y;(x) denotes the solution to (11.3) and y3(x) denotes gure 11.1 ALooniram U1 LLL The Linear Shooting Method ~ 627 the solution to (11.4), it is not difficult to verify that B= vib) ans) yey = 1) + (x) is the unique solution to our boundary-value problem, provided, of course that ya(b) # 0. (That y3(b) = Oisin conflict with the hypotheses of Corollary | 1.2 is considered in Exercise 8) The Shooting method for linear equations is based on the replacement of the linear boundary-value problem by the two initial-value problems (11.3) and (1.4). Numerous methods are available from Chapter 5 for approximating the solutions y)(x) and y2(x), and once these approximations are available, the solution to the boundary-valve problem is approximated using Eq. (11.5). Graphically, the method has the appearance shown in Figure 11.1 Algorithm 11.1 uses the fourth-order Runge-Kutta technique to find the approximations to yi(x) and yo(x), but any other technique for approximating the solutions to initial-value problems can be substituted into Step 4. The algorithm has the additional feature of obtaining approximations for the derivative of the solution to the boundary-value problem as well as to the solution of the problem itself. The use of the algorithm is not restricted to those problems for whieh the hypotheses ‘of Corollary 11.2 can be verified; it gives satisfactory results for many problems that do not satisfy these hypotheses. Linear Shooting To approximate the solution of the boundary-value problem y+ play! + giny +r) =O, a ya) =a, y)=B: (Note: Equations (11.3) and (11.4) are written as first-order systems and solved.) 628 CHAPTER 11 = Boundary-Valwe Problems for Ordinary Differential Equations INPUT endpoints a, J; boundary conditions a, 8; number of subintervals N. OUTPUT approximations w,, to y(2); Wa; toy") for each 7 = 0, 1... W. Step 1 Seth = (b— aN Step 2 Fori = 0, = 1 do Steps 3. and 4. (The Runge- Raa method for systems is used in Steps 3 and 4.) Step 3 Setx = a+ ih. Step 4 Sethi) = hres ky = h [puns + gaara + FD]; hy = befits + shia] koa = h [por + h/2) (way + bhi) tale + h/2) (mig + dks) + ree + h/2)]s kyr = he [tas + dea]: ks = he [pe + h/2) (urs + $ko2) +(x + h/ Mure + Hay) + ret h/2]; kay =f [uaa + ksa]s kaa = he [poe + WNGrns + koa) + gle + WN + hea) + re + A]: tycy = Mai +B [Ria + ko + kar + kaa] taser = Woy +E [kya + Qkoo + kaa + hy mye Rly = dass Kia = [pon + anu): Hy = Alves + teal By = he [plow + h/2)(v25 + HRfg) + abe + W/2) (nus + RL) kh, = he [vos + Seda] Kh = [pox + 4/2) (vay + Heda) + abe + 4/2) (rns # Da) Aga = [var + kha) Kha = ht [ple + Wins + Wa) + ge + My + AV]: ver = vie + Eki + 2kgy + 2, + Gs varer = vor + § [kha + 2ki2 + 2K 2 + kia Step 5 Set wo 7 HN vin” OUTPUT (a, 110,120): wr EXAMPLE 2 11.1 The Linear Shooting Method 629 Step 6 Fori=1,....N set W1 = wy, + w20¥15 W2 = un; + wrova;s x=atth; OUTPUT (x, W1, W2). (Ouuput is x, wi W20) Step 7 STOP. (Process is complete.) l=x=2, yD=1L yQ) has the exact solution gre 1 year+ jp sind) ~ 55 costinx), where = at ~ 12sin(in2) ~ 4 cos(In 2)] = —0.03920701320 and u 61 = Fg 7 ee = 11392070132 Applying Algorithm 11.1 to this problem requires approxi value problems ating the solutions to the initial- 14 2. sin(inx) i l=x=2 nQ=L yO=0 2,2 ee 2 pe ys) ‘The results of the calculations, using Algorithm 11.1 with V = 10 and h = 0.1, are given in Table 11.1. The value listed as u,; approximates y:(1), v1 approximates y2(1), and w; approximates 2-2) 2(2) yx) = nie) + ya). . The accuracy found in Table 11.1 is expected because the fourth-order Runge-Kutta method gives O(/i#) accuracy to the solutions of the initial-value problems. Unfortunately, 630 Table 11.1 CHAPTER 11 + Boundary-Value Problems for Ordinary Differential Equations % a vu i yon) be) — vil 10 1.00000000 0,00000000 100000000 1,00000000, Lt 100896058 0.091 17986 1.09262917 1,09262930_ 1.43 x 1077 1.2 1,03245472 O.16851175 118708471 1,18708484 1.34 x 107 13: 106674375, 0.23608704 1.28338227 1.28338236 9.78 x 10% 14 110928795, 0.29659067 1.38144589 138144595 6.02 x 10% 1s 1.15830000, 0.35184379 148115939 148115942 3.06 x 10°% 16 121248372 0.40311695 158239245, 158239246 1.08 x 10-8 7 1.27087454 OASI31840 1.68501396 1,68501396 5.43 x 10°" 18 133273851 049711137 178889854 178889853, 5.05 x 10-9 19 139750618 0.54098928 1.89392951 1,8939295 1 4.41 x 10% 2.0 146472815 0.58332538 2.00000000 2.000000 because of roundoff errors, there can be problems hidden in this technique. If yy(x) rapidly increases as x goes from a to b, then wy ~ y,(b) will be large. Should B be small in magnitude compared to 14,y, the term w>9 ~ (B — 1,y)/v1,v Will be approximately =1n,/0s,y. The compntations in Step 6 then become « WL = any + worn ani ~ 3) ve which allows a possibility of a loss of significant digits due to cancellation. However, since 1; is an approximation to y,(1), the behavior of y, can easily be monitored, and if uy, increases rapidly from a to , the shooting technique can be employed backward, that is, solving instead the initial-value problems Pay + q@ytr@), asxsbh y)=B y=, and y" = pQ)y’ + q@)y, asxsb, yb) y= If this reverse shooting technique still gives cancellation of significant digits and if) increased precision does not yield greater accuracy, other techniques must be used, such’ as those presented later in this chapter. In general, however, if uy; and vy; are OU) approximations to y, (xj) and yy(x;), respectively, for each i = 0, 1,...,.N, then w),, will be an O(h") approximation to y(x;). In particular, | bo — (al < Ka" |1 + *H4), vial for some constant K (see (IK, p. 426)).

You might also like