In this report, we discuss the implementation and numerical aspects of
the MATLAB solver sbvp designed for the solution of two-point boundary value
problems, which may include a singularity of the first kind,
The code is based on collocation at either
equidistant or Gaussian collocation points. For singular problems,
the choice of equidistant nodes does not imply a loss of
efficiency since no convergence order higher than the stage order
can be expected in general.
An estimate of the global error of the approximate solution
is also provided. This estimate is obtained by a modification of
the Defect Correction idea originally proposed by Zadunaisky in
1976. This estimate has been proven to be asymptotically correct
and provides the basis for an adaptive mesh selection strategy.
Here the grid is modified with the aim to equidistribute the
global error. Most importantly, we observe that the grid is
refined in a way reflecting merely the smoothness of the solution,
unaffected by the singularity in f.
We discuss details of the efficient implementation in MATLAB 6 and
illustrate the performance of the code by comparing it with the
standard MATLAB solver bvp4c and the Fortran 90 code COLNEW.
The sbvp package is available from
http://www.math.tuwien.ac.at/~ewa.