dsolve/numeric/BVP  find numerical solution of ODE boundary value problems

Calling Sequence


dsolve(odesys, numeric, vars, options)


Parameters


odesys



set or list; ordinary differential equation(s) and boundary conditions

numeric



name; instruct dsolve to find a numerical solution

vars



(optional) any indeterminate function of one variable, or a set or list of them, representing the unknowns of the ODE problem

options



(optional) equations of the form keyword = value





Description


•

The dsolve command with the numeric or type=numeric option on a realvalued twopoint boundary value problem (BVP), finds a numerical solution for the ODE or ODE system BVP.

•

The type of problem (BVP or IVP) is automatically detected by dsolve, and an applicable algorithm is used. The optional equation method=bvp[submethod] indicates that a specific BVP solver is to be used. The available submethods are traprich, trapdefer, midrich, and middefer. The first two methods, traprich and trapdefer,are trapezoid methods that use Richardson extrapolation enhancement or deferred correction enhancement, respectively. The remaining two methods, midrich and middefer, are midpoint methods with the same enhancement schemes.


There are two major considerations when choosing a submethod for a BVP. The trapezoid submethods are generally more efficient for typical problems, but the midpoint submethods are capable of handling harmless endpoint singularities that the trapezoid submethods cannot. For the enhancement schemes, Richardson extrapolation is generally faster, but deferred corrections uses less memory on difficult problems.

•

The available methods are fairly general, and should work on a variety of BVPs. They are not well suited to solve BVPs that are stiff or have solutions with singularities in their higher order derivatives.

•

The solution method is capable of handling both linear and nonlinear BVPs with fixed, periodic, and even nonlinear boundary conditions. For nonlinear boundary conditions, however, it may be necessary to provide an initial solution profile that approximately satisfies the boundary conditions (see 'approxsoln' below). The method is also capable of handling BVP systems with undetermined parameters, given a sufficient number of boundary conditions to determine their values.

•

Computation can be performed in both hardware precision and arbitrary precision, based on the setting of Digits. If Digits is smaller than the hardware precision for the machine, then computations are performed in hardware precision (see evalhf). If Digits is larger, then computations are performed in Maple floating point. In both cases, many of the more computationally intensive steps are performed in compiled external libraries.

•

The return value of dsolve and the manipulation of the input system is controlled by the following three optional equations, which are discussed in dsolve[numeric].

'output'

=

keyword or array

'known'

=

name or list of names

'optimize'

=

boolean




In addition to the output options available for all numerical ODE problems, the option output=mesh is also available. It specifies that dsolve return an arrayform output where independent variable values are chosen as the discrete mesh used internally by the method. This also has the effect of changing the interpolant default to false because only the discrete solution is required. See interpolant below.


The 'known' option specifies userdefined known functions, and is discussed in dsolve[numeric].



Options


•

The options listed below are specific to BVP and include options to control the solution process, the accuracy of the result, and the initial mesh or solution profile to be used.

'abserr'

=

numeric

'range'

=

numeric..numeric

'adaptive'

=

boolean

'maxmesh'

=

integer

'initmesh'

=

integer

'approxsoln'

=

array, list or procedure

'continuation'

=

name

'mincont'

=

numeric

'interpolant'

=

boolean




Numeric value that gives an absolute error tolerance for the solution. In all but exceptional cases the true solution should be within the error tolerance value of the continuous approximate solution obtained by the method. The default value of abserr is Float(1,6).


Note: This is an absolute error tolerance, so if the scale of the problem is such that the solution values are much smaller/larger than unitary, this parameter requires adjustment.


As for IVPs (see dsolve[numeric,IVP]), the system is converted to a first order system internally before the numerical solution is computed. The absolute error tolerance is applied to all components of the converted system.


'range'= numeric..numeric


Gives the left and right boundary points of the solution interval in the form leftpt..rightpt. This enables the method to be used to compute the solution of an initial value problem over a fixed interval using the absolute global error bound specified by abserr.


Boolean value that determines whether mesh adaptation is used to obtain the solution. By default this is true.


The method applied is based on arclength, with additional rules to prevent adjacent steps from changing their size too rapidly, restrictions on the largest and smallest allowable step sizes as compared with the corresponding fixed step size, and restrictions preventing the mesh points near the boundaries from becoming too widely spaced.


Note: Some problems work better with fixed stepsize meshes.


'approxsoln'= array, list or procedure


Argument that enables specification of an initial approximate discrete solution to be used as a starting point for the problem. There are many forms that this argument can take.


The simplest forms are the output of another dsolve/numeric computation when output is specified as an array (Matrix form output), or as a procedure (procedurelist, listprocedure, or operator output).


Another form is as a twodimensional array where the names of the dependent variables and independent variables are given in the first column, followed by their values at different mesh points in the following columns. All dependent variables in the (converted to first order) system, must be present. This form can also be specified using nested lists.


In the cases with a discrete solution given in array form, the values of the independent variable must always be provided at either boundary, in increasing order over the solution region, and at a minimum of distinct points. In addition, the specification of a discrete approximate solution cannot be used in combination with initmesh.


For systems with free parameters (determined through interaction with the boundary conditions) it is suggested that approximate values for the parameters also be provided.


For best results, the continuation problem should be constructed so that the BVP solutions vary continuously with the parameter, and so that the rate of change of the solution, with respect to the parameter, is very roughly constant over the range .


Argument that provides a minimum value for the allowed change in the continuation parameter when computing the initial solution profile. The value must be positive, and less than or equal to . The default value is . This option is valid only when continuation has also been specified.


Boolean that is true by default, and specifies that the solution should be refined until an interpolation of the solution gives the requested accuracy. When this is false, the solution is improved until only the discrete solution has the requested accuracy. Also see the output=mesh argument.

•

Results can be plotted by using the function odeplot in the plots package.



Examples


Linear boundary value problem:
>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


 (5) 
Nonlinear boundary value problem:
>


 (6) 
>


>


 (7) 
>


 (8) 
>


 (9) 
Using BVP Solver for an IVP:
>


 (10) 
>


 (11) 
>


 (12) 
>


 (13) 
Boundary value problem with an unknown parameter:
>


 (14) 
>


 (15) 
>


 (16) 
>


 (17) 


References



Ascher, U.; Mattheij, R.; and Russell, R. "Numerical Solution of Boundary Value Problems for Ordinary Differential Equations." SIAM Classics in Applied Mathematics. Vol. 13. (1995).


Ascher, U., and Petzold, L. "Computer Methods for Ordinary Differential Equations and DifferentialAlgebraic Equations." SIAM, Philadelphia. 1998.


