ode23tb
TR-BDF2 solver for stiff differential equations at crude tolerances.
Category: Mathematics > Numerical Integration and Differential Equations
Syntax
[t, y] = ode23tb(odefun, tspan, y0)
Integrates y' = odefun(t, y).
[t, y] = ode23tb(odefun, tspan, y0, options)
Also applies options from odeset.
Description
Each step combines a trapezoidal-rule stage with a second-order backward differentiation stage, using the same iteration matrix for both. The method is implicit and L-stable, so it damps stiff components well.
Like ode23s, it can beat ode15s when the tolerances are loose.
Input arguments
odefun- Handle
dydt = odefun(t, y). tspan[t0 tf]or a vector of output times.y0- Vector of initial values.
Output arguments
t, y- Time points and solution, laid out as for
ode45.
Example
Stiff decay
f = @(t, y) -100*(y - cos(t));
[t, y] = ode23tb(f, [0 1], 0);
fprintf('%.3f\n', y(end))
Output
0.549