#!/usr/local/bin/php Interactive Educational Modules in Scientific Computing

Interactive Educational Modules in
Scientific Computing

Shooting Method for Boundary Value Problems

This module enables the user to compare different approximate solutions computed using the shooting method for boundary value problems for ordinary differential equations. A general boundary value problem (BVP) consists of an ordinary differential equation (ODE) with side conditions specified at more than one point. This module illustrates the solution of second-order scalar ODEs of the form u″ = f(t, u, u′) on an interval [a, b] with boundary conditions u(a) = α and u(b) = β. The shooting method replaces the given BVP by a sequence of initial value problems (IVPs) for the same ODE with initial conditions u(a) = α and u′(a) = x, where x is a guessed initial slope that is successively refined until the desired boundary condition at b is satisfied. Let u(b; x) be the value at b of the solution produced by a given IVP solver for initial conditions u(a) = α and u′(a) = x. The shooting method employs an iterative method for solving nonlinear equations to find an initial slope x* such that u(b; x*) = β. The solution to this final IVP then coincides with the solution to the original BVP.

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) = α and u(b) = β are indicated by black dots on the graph. Next the user specifies the order of the Runge-Kutta method to be used as the IVP solver and the number of steps to take in traversing the interval [a, b]. When the user clicks Solve the resulting approximate solution to the BVP is drawn on the graph. To compare this solution with other approximate solutions, the user can make additional choices of method order and number of steps, then click Solve to add each new approximate solution to the graph. The solutions for different parameters are color coded so that the color changes from blue to red as the number of steps increases and from light to dark as the method order increases. To clear all of the solutions from the graph, click Reset.

To illustrate the details of the individual steps of the shooting method for a particular choice of parameters, 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