bvp_shooting


bvp_shooting, a MATLAB code which uses the shooting method to solve a second order two-point boundary value problem (BVP) with left and right Dirichlet boundary conditions.

The strategy is to use an ODE solver, for which we use the given left Dirichlet boundary condition y(a) = ya, and an artificial Neumann boundary condition y'(a) = alpha. We solve the ODE, and compare the computed value y(b) to the desired value yb. The difference is a residual which we wish to drive to zero. We do this by employing a secant method approach.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

bvp_shooting is available in a MATLAB version and an Octave version.

Related Data and Programs:

bvp_shooting_test

bvp_fd, a MATLAB code which demonstrates the use of the finite difference method (FDM) to solve a boundary value problem (BVP).

bvp4c_test, a MATLAB code which calls bvp4c(), which solves boundary value problems (BVP) in one spatial dimension.

fd1d_bvp, a MATLAB code which applies the finite difference method (FDM) to a two point boundary value problem (BVP) in one spatial dimension.

fem1d, a MATLAB code which applies the finite element method (FEM) to a 1D linear two point boundary value problem (BVP).

fem1d_bvp_linear, a MATLAB code which applies the finite element method (FEM), with piecewise linear elements, to a two point boundary value problem (BVP) in one spatial dimension, and compares the computed and exact solutions with the L2 and seminorm errors.

fem1d_bvp_quadratic, a MATLAB code which applies the finite element method (FEM), with piecewise quadratic elements, to a two point boundary value problem (BVP) in one spatial dimension, and compares the computed and exact solutions with the L2 and seminorm errors.

fem1d_lagrange, a MATLAB code which sets up the matrices and vectors associated with the finite element method (FEM) solution of a boundary value problem (BVP) -u''+u=f(x), using Lagrange basis polynomials.

pdepe_test, a MATLAB code which illustrates how the pdepe() function can be used to solve a partial differential equation (PDE) that represents an initial boundary value problem (IBVP) in one space and one time dimension.

Source Code:


Last modified on 26 March 2026.