| MATLAB Function Reference | ![]() |
sol = bvp5c(odefun,bcfun,solinit)
sol = bvp5c(odefun,bcfun,solinit,options)
solinit = bvpinit(x, yinit, params)
A function handle that evaluates
the differential equations
dydx = odefun(x,y) dydx = odefun(x,y,parameters) where x is
a scalar corresponding to
| ||
A function handle that computes
the residual in the boundary conditions. For two-point boundary value conditions
of the form
res = bcfun(ya,yb) res = bcfun(ya,yb,parameters) where ya and yb are
column vectors corresponding to
| ||
A structure containing the initial guess for a solution. You create solinit using the function bvpinit. solinit has the following fields. | ||
Ordered nodes of the initial mesh. Boundary conditions are imposed
at
| ||
Initial guess for the solution such that solinit.y(:,i) is a guess for the solution at the node solinit.x(i). | ||
Optional. A vector that provides an initial guess for unknown parameters. | ||
The structure can have any name, but the fields must be named x, y, and parameters. You can form solinit with the helper function bvpinit. See bvpinit for details. | ||
Optional integration argument. A structure you create using the bvpset function. See bvpset for details. | ||
sol = bvp5c(odefun,bcfun,solinit) integrates a system of ordinary differential equations of the form
![]()
on the interval [a,b] subject to two-point boundary value conditions
![]()
odefun and bcfun are function handles. See Function Handles in the MATLAB Programming documentation for more information.
in the MATLAB mathematics documentation, explains how to provide additional parameters to the function odefun, as well as the boundary condition function bcfun, if necessary. You can use the function bvpinit to specify the boundary points, which are stored in the input argument solinit. See the reference page for bvpinit for more information.
The bvp5c solver can also find unknown parameters
for problems of the form
![]()
where
corresponds to parameters.
You provide bvp5c an initial guess for any unknown parameters
in solinit.parameters. The bvp5c solver
returns the final values of these unknown parameters in sol.parameters.
bvp5c produces a solution that is continuous on [a,b] and has a continuous first derivative there. Use the function deval and the output sol of bvp5c to evaluate the solution at specific points xint in the interval [a,b].
sxint = deval(sol,xint)
The structure sol returned by bvp5c has the following fields:
Mesh selected by bvp5c | |
Approximation to
| |
Values returned by bvp5c for the unknown parameters, if any | |
The structure sol can have any name, and bvp5c creates the fields x, y, parameters, and solver.
sol = bvp5c(odefun,bcfun,solinit,options) solves as above with default integration properties replaced by the values in options, a structure created with the bvpset function. See bvpset for details.
solinit = bvpinit(x, yinit, params) forms the initial guess solinit with the vector params of guesses for the unknown parameters.
Note The bvp5c function is used exactly like bvp4c, with the exception of the meaning of error tolerances between the two solvers. If S(x) approximates the solution y(x), bvp4c controls the residual |S'(x) - f(x,S(x))|. This controls indirectly the true error |y(x) - S(x)|. bvp5c controls the true error directly. bvp5c is more efficient than bvp4c for small error tolerances. |
bvp5c solves a class of singular boundary value problems, including problems with unknown parameters p, of the form
![]()
The interval is required to be [0, b] with b >
0. Often such problems arise when computing a smooth solution of ODEs that
result from partial differential equations (PDEs) due to cylindrical or spherical
symmetry. For singular problems, you specify the (constant) matrix S as
the value of the 'SingularTerm' option of bvpset,
and odefun evaluates only f(x, y, p).
The boundary conditions must be consistent with the necessary condition
and the initial guess should satisfy this
condition.
bvp5c is a finite difference code that implements the four-stage Lobatto IIIa formula. This is a collocation formula and the collocation polynomial provides a C1-continuous solution that is fifth-order accurate uniformly in [a,b]. The formula is implemented as an implicit Runge-Kutta formula. bvp5c solves the algebraic equations directly; bvp4c uses analytical condensation. bvp4c handles unknown parameters directly; while bvp5c augments the system with trivial differential equations for unknown parameters.
[1] Shampine, L.F., M.W. Reichelt, and J. Kierzenka "Solving Boundary Value Problems for Ordinary Differential Equations in MATLAB with bvp4c" http://www.mathworks.com/bvp_tutorial. Note that this tutorial uses the bvp4c function, however in most cases the solvers can be used interchangeably.
function_handle (@), bvp4c, bvpget, bvpinit, bvpset, bvpxtend, deval
![]() | bvp4c | bvpget | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |