Scientific Computing

This module illustrates the shooting method for numerically solving
boundary value problems for ordinary differential equations. A general
boundary value problem (BVP) consists of an ordinary differential
*u*″ = *f*(*t*,
*u*, *u*′)*a*,
*b*]*u*(*a*) =
*α**u*(*b*) =
*β**shooting method* replaces the given
BVP by a sequence of initial value problems (IVPs) for the same ODE
with initial conditions *u*(*a*) =
*α**u*′(*a*) =
*x**x* is a guessed initial slope that is
successively refined until the desired boundary condition at *b*
is satisfied. Let *u*(*b*; *x*)*b* of the solution produced by a given IVP solver for
initial conditions *u*(*a*) = *α**u*′(*a*) = *x**x** such that *u*(*b*; *x**) =
*β*

The user begins by selecting from the menu provided an ODE and a
specific solution to be sought (if there is more than one). Boundary
values *u*(*a*) = *α**u*(*b*) = *β**a*, *b*]*Initialize* to begin the process of solving the BVP. As part of
initialization, predetermined starting guesses *x*_{0} and
*x*_{1} for the nonlinear equation solver are used to
bracket the solution to the BVP so that *β* is between
*u*(*b*; *x*_{0})*u*(*b*; *x*_{1})*x** of the nonlinear equation
is maintained throughout the solution process. Each iteration is
performed by clicking *Take Shot*, which plots the IVP solution
for the chosen initial slope and updates the bracketing interval. The
default initial slope (shown by an arrow in the graph) for each
iteration is determined by the selected nonlinear equation solver, but
the user can adjust the slope within the bracketing interval, if
desired, using the slider provided. Progress toward convergence of the
iterations can be observed from the IVP solutions plotted in the graph
(which go from blue to red as the solution to the BVP is approached) as
well as from the printed residual. The meaning of the residual depends
on the nonlinear equation solver selected: for the bisection method it
is the width of the current bracketing interval, and for the secant
method it is *u*(*b*; *x*) −
*β**x* is the initial slope for the most
recent iteration. The initial slope *x* and the value of
*u*(*b*; *x*)

To compare approximate solutions obtained using different method orders or different numbers of steps, see the alternative Shooting Method module.

**Reference:** Michael T. Heath, *Scientific Computing,
An Introductory Survey*, 2nd edition, McGraw-Hill, New York,
2002. See Section 10.3.

**Developers:** Evan VanderZee and Michael Heath