Main Content

Solve boundary value problem — fifth-order method

integrates a system of differential equations of the form `sol`

= bvp5c(`odefun`

,`bcfun`

,`solinit`

)*y*′ =
*f*(*x*,*y*) specified by `odefun`

, subject to the boundary conditions
described by `bcfun`

and the initial solution guess
`solinit`

. Use the `bvpinit`

function to create the initial guess `solinit`

, which
also defines the points at which the boundary conditions in `bcfun`

are
enforced.

also uses the integration settings defined by `sol`

= bvp5c(`odefun`

,`bcfun`

,`solinit`

,`options`

)`options`

, which is an
argument created using the `bvpset`

function. For example, use the
`AbsTol`

and `RelTol`

options to specify absolute and
relative error tolerances, or the `FJacobian`

option to provide the
analytical partial derivatives of `odefun`

.

`bvp5c`

is a finite difference code that implements the four-stage
Lobatto IIIa formula [1]. This is a collocation formula and the collocation polynomial
provides a *C*^{1}-continuous solution that is
fifth-order accurate uniformly in `[a,b]`

. The formula is implemented as an
implicit Runge-Kutta formula. Some of the differences between `bvp5c`

and
`bvp4c`

are:

`bvp5c`

solves the algebraic equations directly.`bvp4c`

uses analytical condensation.`bvp4c`

handles unknown parameters directly.`bvp5c`

augments the system with trivial differential equations for the unknown parameters.

[1] Shampine, L.F., and J. Kierzenka.
"A BVP Solver that Controls Residual and Error." *J. Numer. Anal. Ind. Appl.
Math.* Vol. 3(1-2), 2008, pp. 27–41.