Class Lecture and Tutorial-14 (Boundary Value Shooting Method) - 2
Class Lecture and Tutorial-14 (Boundary Value Shooting Method) - 2
Introduction
A common problem in civil engineering concerns the deflection of a beam of rectangular
cross section subject to uniform loading while the ends of the beam are supported so that
they undergo no deflection.
S S
0 l x
w(x)
Suppose that l, q, E, S, and I represent, respectively, the length of the beam, the intensity
of the uniform load, the modulus of elasticity, the stress at the endpoints, and the central
moment of inertia. The differential equation approximating the physical situation is of the
form
d2w S qx
(x) = w(x) + (x − l),
dx 2 EI 2EI
where w(x) is the deflection a distance x from the left end of the beam. Since no deflection
occurs at the ends of the beam, there are two boundary conditions
When the beam is of uniform thickness, the product EI is constant. In this case the
exact solution is easily obtained. When the thickness is not uniform, the moment of inertia
I is a function of x, and approximation techniques are required. Problems of this type are
considered in Exercises 7 of Section 11.3 and 6 of Section 11.4.
The differential equations in Chapter 5 are of first order and have one initial condition
to satisfy. Later in the chapter we saw that the techniques could be extended to systems of
equations and then to higher-order equations, but all the specified conditions are on the same
endpoint. These are initial-value problems. In this chapter we show how to approximate
the solution to boundary-value problems, differential equations with conditions imposed
at different points. For first-order differential equations, only one condition is specified,
so there is no distinction between initial-value and boundary-value problems. We will be
considering second-order equations with two boundary values.
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.
671
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
672 C H A P T E R 11 Boundary-Value Problems for Ordinary Differential Equations
and that the partial derivatives fy and fy are also continuous on D. If
Solution We have
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
11.1 The Linear Shooting Method 673
To approximate the unique solution to this linear problem, we first consider the initial-
value problems
y = p(x)y + q(x)y + r(x), with a ≤ x ≤ b, y(a) = α, and y (a) = 0, (11.3)
and
y = p(x)y + q(x)y, with a ≤ x ≤ b, y(a) = 0, and y (a) = 1. (11.4)
Theorem 5.17 in Section 5.9 (see page 329) ensures that under the hypotheses in
Corollary 11.2, both problems have a unique solution.
Let y1 (x) denote the solution to (11.3), and let y2 (x) denote the solution to (11.4).
Assume that y2 (b) = 0. (That y2 (b) = 0 is in conflict with the hypotheses of Corollary 11.2
is considered in Exercise 8.) Define
β − y1 (b)
y(x) = y1 (x) + y2 (x). (11.5)
y2 (b)
Then y(x) is the solution to the linear boundary problem (11.3). To see this, first note that
β − y1 (b)
y (x) = y1 (x) + y (x)
y2 (b) 2
and
β − y1 (b)
y (x) = y1 (x) + y (x).
y2 (b) 2
Substituting for y1 (x) and y2 (x) in this equation gives
β − y1 (b)
y = p(x)y1 + q(x)y1 + r(x) + p(x)y2 + q(x)y2
y2 (b)
β − y1 (b) β − y1 (b)
= p(x) y1 + y + q(x) y1 + y2 + r(x)
y2 (b) 2 y2 (b)
= p(x)y (x) + q(x)y(x) + r(x).
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
674 C H A P T E R 11 Boundary-Value Problems for Ordinary Differential Equations
Moreover,
β − y1 (b) β − y1 (b)
y(a) = y1 (a) + y2 (a) = α + ·0=α
y2 (b) y2 (b)
and
β − y1 (b)
y(b) = y1 (b) + y2 (b) = y1 (b) + β − y1 (b) = β.
y2 (b)
Linear Shooting
This “shooting” hits the target The Shooting method for linear equations is based on the replacement of the linear boundary-
after one trial shot. In the next value problem by the two initial-value problems (11.3) and (11.4). Numerous methods are
section we see that nonlinear available from Chapter 5 for approximating the solutions y1 (x) and y2 (x), and once these
problems require multiple shots. approximations are available, the solution to the boundary-value problem is approximated
using Eq. (11.5). Graphically, the method has the appearance shown in Figure 11.1.
Figure 11.1
y
y 2(x)
β
β y1(b)
y(x) y1(x) y 2(x)
y 2(b)
α y 1(x)
a b x
Algorithm 11.1 uses the fourth-order Runge-Kutta technique to find the approximations
to y1 (x) and y2 (x), but other techniques 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 which the hypotheses
of Corollary 11.2 can be verified; it will work for many problems that do not satisfy these
hypotheses. One such example can be found in Exercise 4.
(Note: Equations (11.3) and (11.4) are written as first-order systems and solved.)
INPUT endpoints a, b; boundary conditions α, β; number of subintervals N.
OUTPUT approximations w1,i to y(xi ); w2,i to y (xi ) for each i = 0, 1, . . . , N.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
11.1 The Linear Shooting Method 675
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
676 C H A P T E R 11 Boundary-Value Problems for Ordinary Differential Equations
Example 2 Apply the Linear Shooting technique with N = 10 to the boundary-value problem
2 2 sin(ln x)
y = − y + 2 y + , for 1 ≤ x ≤ 2, with y(1) = 1 and y(2) = 2,
x x x2
and compare the results to those of the exact solution
c2 3 1
y = c1 x + 2
− sin(ln x) − cos(ln x),
x 10 10
where
1
c2 = [8 − 12 sin(ln 2) − 4 cos(ln 2)] ≈ −0.03920701320
70
and
11
c1 = − c2 ≈ 1.1392070132.
10
Solution Applying Algorithm 11.1 to this problem requires approximating the solutions to
the initial-value problems
2 2 sin(ln x)
y1 = − y1 + 2 y1 + , for 1 ≤ x ≤ 2, with y1 (1) = 1 and y1 (1) = 0,
x x x2
and
2 2
y2 = − y2 + 2 y2 , for 1 ≤ x ≤ 2, with y2 (1) = 0 and y2 (1) = 1.
x x
The results of the calculations, using Algorithm 11.1 with N = 10 and h = 0.1, are
given in Table 11.1. The value listed as u1,i approximates y1 (xi ), the value v1,i approximates
y2 (xi ), and wi approximates
2 − y1 (2)
y(xi ) = y1 (xi ) + y2 (xi ).
y2 (2)
The accurate results in this example are due to the fact that the fourth-order Runge-
Kutta method gives O(h4 ) approximations to the solutions of the initial-value problems.
Unfortunately, because of roundoff errors, there can be problems hidden in this technique.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
11.1 The Linear Shooting Method 677
and
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. Some of these are
presented later in this chapter. In general, however, if u1,i and v1,i are O(hn ) approximations
to y1 (xi ) and y2 (xi ), respectively, for each i = 0, 1, . . . , N, then w1,i will be an O(hn )
approximation to y(xi ). In particular,
n v1,i
|w1,i − y(xi )| ≤ Kh 1 + ,
v1,N
for some constant K (see [IK], p. 426).
E X E R C I S E S E T 11.1
1. The boundary-value problem
has the solution y(x) = e2 (e4 − 1)−1 (e2x − e−2x ) + x. Use the Linear Shooting method to approximate
the solution, and compare the results to the actual solution.
a. With h = 21 ; b. With h = 41 .
2. The boundary-value problem
π
y = y + 2y + cos x, 0≤x≤ π
2
, y(0) = −0.3, y 2
= −0.1
has the solution y(x) = − 101 (sin x + 3 cos x). Use the Linear Shooting method to approximate the
solution, and compare the results to the actual solution.
a. With h = π4 ; b. With h = π8 .
3. Use the Linear Shooting method to approximate the solution to the following boundary-value
problems.
a. y = −3y + 2y + 2x + 3, 0 ≤ x ≤ 1, y(0) = 2, y(1) = 1; use h = 0.1.
b. y = −4x −1 y − 2x −2 y + 2x −2 ln x, 1 ≤ x ≤ 2, y(1) = − 21 , y(2) = ln 2; use h = 0.05.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
678 C H A P T E R 11 Boundary-Value Problems for Ordinary Differential Equations
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.