Docsity

The Shooting Method for Two-Point Boundary Value Problems, Study notes of Numerical Methods in Engineering

Toggle sidebar
bg1
Jim Lambers
MAT 461/561
Spring Semester 2009-10
Lecture 25 Notes
These notes correspond to Sections 11.1 and 11.2 in the text.
The Shooting Method for Two-Point Boundary Value Problems
We now consider the two-point boundary value problem (BVP)
๐‘ฆโ€ฒโ€ฒ =๐‘“(๐‘ฅ, ๐‘ฆ, ๐‘ฆโ€ฒ), ๐‘Ž < ๐‘ฅ < ๐‘,
a second-order ODE, with boundary conditions
๐‘ฆ(๐‘Ž) = ๐›ผ, ๐‘ฆ(๐‘) = ๐›ฝ.
This problem is guaranteed to have a unique solution if the following conditions hold:
โˆ™๐‘“,๐‘“๐‘ฆ, and ๐‘“๐‘ฆโ€ฒare continuous on the domain
๐ท={(๐‘ฅ, ๐‘ฆ, ๐‘ฆโ€ฒ)โˆฃ๐‘Žโ‰ค๐‘ฅโ‰ค๐‘, โˆ’โˆž < ๐‘ฆ < โˆž,โˆ’โˆž < ๐‘ฆโ€ฒ<โˆž}.
โˆ™๐‘“๐‘ฆ>0 on ๐ท
โˆ™๐‘“๐‘ฆโ€ฒis bounded on ๐ท.
There are several approaches to solving this type of problem. The ๏ฌrst method that we will
examine is called the shooting method. It treats the two-point boundary value problem as an initial
value problem (IVP), in which ๐‘ฅplays the role of the time variable, with ๐‘Žbeing the โ€œinitial timeโ€
and ๐‘being the โ€œ๏ฌnal timeโ€. Speci๏ฌcally, the shooting method solves the initial value problem
๐‘ฆโ€ฒโ€ฒ =๐‘“(๐‘ฅ, ๐‘ฆ, ๐‘ฆโ€ฒ), ๐‘Ž < ๐‘ฅ < ๐‘,
with initial conditions
๐‘ฆ(๐‘Ž) = ๐›ผ, ๐‘ฆโ€ฒ(๐‘Ž) = ๐‘ก,
where ๐‘กmust be chosen so that the solution satis๏ฌes the remaining boundary condition, ๐‘ฆ(๐‘) = ๐›ฝ.
Since ๐‘ก, being the ๏ฌrst derivative of ๐‘ฆ(๐‘ฅ) at ๐‘ฅ=๐‘Ž, is the โ€œinitial slopeโ€ of the solution, this
approach requires selecting the proper slope, or โ€œtrajectoryโ€, so that the solution will โ€œhit the
targetโ€ of ๐‘ฆ(๐‘ฅ) = ๐›ฝat ๐‘ฅ=๐‘. This viewpoint indicates how the shooting method earned its name.
Note that since the ODE associated with the IVP is of second-order, it must normally be rewritten
1
pf3

Partial preview of the text

Download The Shooting Method for Two-Point Boundary Value Problems and more Study notes Numerical Methods in Engineering in PDF only on Docsity!

Jim Lambers MAT 461/ Spring Semester 2009- Lecture 25 Notes

These notes correspond to Sections 11.1 and 11.2 in the text.

The Shooting Method for Two-Point Boundary Value Problems

We now consider the two-point boundary value problem (BVP)

ํ‘ฆโ€ฒโ€ฒ^ = ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ), ํ‘Ž < ํ‘ฅ < ํ‘,

a second-order ODE, with boundary conditions

ํ‘ฆ(ํ‘Ž) = ํ›ผ, ํ‘ฆ(ํ‘) = ํ›ฝ.

This problem is guaranteed to have a unique solution if the following conditions hold:

โˆ™ ํ‘“ , ํ‘“ํ‘ฆ, and ํ‘“ํ‘ฆโ€ฒ are continuous on the domain

ํท = {(ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ) โˆฃ ํ‘Ž โ‰ค ํ‘ฅ โ‰ค ํ‘, โˆ’โˆž < ํ‘ฆ < โˆž, โˆ’โˆž < ํ‘ฆโ€ฒ^ < โˆž}.

โˆ™ ํ‘“ํ‘ฆ > 0 on ํท

โˆ™ ํ‘“ํ‘ฆโ€ฒ is bounded on ํท.

There are several approaches to solving this type of problem. The first method that we will examine is called the shooting method. It treats the two-point boundary value problem as an initial value problem (IVP), in which ํ‘ฅ plays the role of the time variable, with ํ‘Ž being the โ€œinitial timeโ€ and ํ‘ being the โ€œfinal timeโ€. Specifically, the shooting method solves the initial value problem

ํ‘ฆโ€ฒโ€ฒ^ = ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ), ํ‘Ž < ํ‘ฅ < ํ‘,

with initial conditions ํ‘ฆ(ํ‘Ž) = ํ›ผ, ํ‘ฆโ€ฒ(ํ‘Ž) = ํ‘ก,

where ํ‘ก must be chosen so that the solution satisfies the remaining boundary condition, ํ‘ฆ(ํ‘) = ํ›ฝ. Since ํ‘ก, being the first derivative of ํ‘ฆ(ํ‘ฅ) at ํ‘ฅ = ํ‘Ž, is the โ€œinitial slopeโ€ of the solution, this approach requires selecting the proper slope, or โ€œtrajectoryโ€, so that the solution will โ€œhit the targetโ€ of ํ‘ฆ(ํ‘ฅ) = ํ›ฝ at ํ‘ฅ = ํ‘. This viewpoint indicates how the shooting method earned its name. Note that since the ODE associated with the IVP is of second-order, it must normally be rewritten

as a system of first-order equations before it can be solved by standard numerical methods such as Runge-Kutta or multistep methods. In the case where ํ‘ฆโ€ฒโ€ฒ^ = ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ) is a linear ODE, selecting the slope ํ‘ก is relatively simple. Let ํ‘ฆ 1 (ํ‘ฅ) be the solution of the IVP

ํ‘ฆโ€ฒโ€ฒ^ = ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ), ํ‘Ž < ํ‘ฅ < ํ‘, ํ‘ฆ(ํ‘Ž) = ํ›ผ, ํ‘ฆโ€ฒ(ํ‘Ž) = 0,

and let ํ‘ฆ 2 (ํ‘ฅ) be the solution of the IVP

ํ‘ฆโ€ฒโ€ฒ^ = ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ), ํ‘Ž < ํ‘ฅ < ํ‘, ํ‘ฆ(ํ‘Ž) = 0, ํ‘ฆโ€ฒ(ํ‘Ž) = 1.

These can be computed using any analytical or numerical method. Then, the solution of the original BVP has the form ํ‘ฆ(ํ‘ฅ) = ํ‘ฆ 1 (ํ‘ฅ) + ํ‘กํ‘ฆ 2 (ํ‘ฅ)

where ํ‘ก is the correct slope, since any linear combination of solutions of the ODE also satisfies the ODE, and the initial values are linearly combined in the same manner as the solutions themselves. To find the proper value of ํ‘ก, we evaluate ํ‘ฆ(ํ‘), which yields

ํ‘ฆ(ํ‘) = ํ‘ฆ 1 (ํ‘) + ํ‘กํ‘ฆ 2 (ํ‘) = ํ›ฝ,

and therefore ํ‘ก = (ํ›ฝ โˆ’ ํ‘ฆ 1 (ํ‘))/ํ‘ฆ 2 (ํ‘). It follows that as long as ํ‘ฆ 2 (ํ‘) โˆ•= 0, then ํ‘ฆ(ํ‘ฅ) is the unique solution of the original BVP. This condition is guaranteed to be satisfied due to the previously stated assumptions about ํ‘“ (ํ‘ฅ, ํ‘ฆ, ํ‘ฆโ€ฒ) that guarantee the existence and uniqueness of the solution. If the ODE is nonlinear, however, then ํ‘ก satisfies a nonlinear equation of the form

ํ‘ฆ(ํ‘, ํ‘ก) = 0,

where ํ‘ฆ(ํ‘, ํ‘ก) is the value of the solution, at ํ‘ฅ = ํ‘, of the IVP specified by the shooting method, with initial sope ํ‘ก. This nonlinear equation can be solved using an iterative method such as the bisection method, fixed-point iteration, Newtonโ€™s Method, or the Secant Method. The only difference is that each evaluation of the function ํ‘ฆ(ํ‘, ํ‘ก), at a new value of ํ‘ก, is relatively expensive, since it requires the solution of an IVP over the interval [ํ‘Ž, ํ‘], for which ํ‘ฆโ€ฒ(ํ‘Ž) = ํ‘ก. The value of that solution at ํ‘ฅ = ํ‘ is taken to be the value of ํ‘ฆ(ํ‘, ํ‘ก). If Newtonโ€™s Method is used, then an additional complication arises, because it requires the derivative of ํ‘ฆ(ํ‘, ํ‘ก), with respect to ํ‘ก, during each iteration. This can be computed using the fact that ํ‘ง(ํ‘ฅ, ํ‘ก) = โˆ‚ํ‘ฆ(ํ‘ฅ, ํ‘ก)/โˆ‚ํ‘ก satisfies the ODE

ํ‘งโ€ฒโ€ฒ^ = ํ‘“ํ‘ฆํ‘ง + ํ‘“ํ‘ฆโ€ฒ ํ‘งโ€ฒ, ํ‘Ž < ํ‘ฅ < ํ‘, ํ‘ง(ํ‘Ž, ํ‘ก) = 0, ํ‘งโ€ฒ(ํ‘Ž, ํ‘ก) = 1,

which can be obtained by differentiating the original BVP and its boundary conditions with respect to ํ‘ก. Therefore, each iteration of Newtonโ€™s Method requires two IVPs to be solved, but this extra effort can be offset by the rapid convergence of Newtonโ€™s Method.