Previous Up Next

10.3.7  Approximating solutions of nonlinear second-order boundary value problems: bvpsolve

The bvpsolve command finds an approximate solution of a boundary value problem

y″=f(x,y,y′),   y(a)=α, y(b)=β 

on an interval [a,b]. The procedure uses the method of nonlinear shooting which is based on Newton and Runge-Kutta methods. Values of y and its first derivative y′ are approximated at points xk=a+k δ, where δ=ba/N and k=0,1,…,N. For the numeric tolerance (precision) threshold, the algorithm uses epsilon specified in the session settings in Xcas (see secrefssec:confcomp, item 9).

Note that the shooting method is sensitive to roundoff errors and may fail to converge in some cases, especially when y is a rapidly increasing function. In the absence of convergence or if the maximum number of iterations is exceeded, bvpsolve returns undef. However, if the output type is list or piecewise and if N>2, a slower but more stable finite-difference method (which approximates only the function y) is tried first.

Sometimes setting an initial guess A for y′(a) to a suitable value may help the shooting algorithm to converge or to converge faster.


Examples.


Previous Up Next