midpoint.RdBulirsch-Stoer algorithm for solving Ordinary Differential Equations (ODEs) very accurately.
bulirsch_stoer(f, t, y0, tol = 1e-08, ...)
midpoint(f, t0, tfinal, y0, tol = 1e-08, kmax = 101, ...)function describing the differential equation \(y' = f(t, y)\).
vector of x-values where the values of the ODE function
will be computed; needs to be increasingly sorted.
starting values as (row or column) vector.
additional parameters to be passed to the function.
relative tolerance (in the Ricardson extrapolation).
start and end point of the interval.
number of grid pounts.
The Bulirsch-Stoer algorithm is a well-known method to obtain high-accuracy solutions to ordinary differential equations with reasonable computational efforts. It exploits the midpoint method to get good accuracy in each step.
The (modified) midpoint method computes the values of the dependent
variable y(t) from t0 to tfinal by a sequence of
substeps, applying Richardson extrapolation in each step.
Bulirsch-Stoer and midpoint shall not be used with non-smooth functions or
singularities inside the interval. The best way to get intermediate points
t = (t[1], ..., t[n]) may be to call ode23 or ode23s
first and use the x-values returned to start bulirsch_stoer
on.
bulirsch_stoer returns a list with x the grid points input, and
y a vector of function values at the se points.
J. Stoer and R. Bulirsch (2002). Introduction to Numerical Analysis. Third Edition, Texts in Applied Mathematics 12, Springer Science + Business, LCC, New York.
Will be extended to become a full-blown Bulirsch-Stoer implementation.