On a recommendation from Mathematica.SE, I am posting this on Computational Science.SE:
I am trying to quantify stiffness of an ODE by relating it to the fine-ness with which NDSolve treats it's time step.
BACKGROUND
For the uninitiated:
Essentially, when an ordinary differential equation is stiff and we attempt to solve it with NDSolve in Mathematica, it would employ a stiff solver to detect and reconcile stiffness.
I use the stiff equation shown on wikipedia to demonstrate this. This equation is solved using BDF (backward difference formulation/formula) which is a recognized method to solve stiff equations.
Equation and solution using NDSolve with BDF
tMax=100;
rSol=
r/.NDSolve[
r'[t]==-15 r[t]&&r[0]==1,r,
{t,0,tMax},Method->{"BDF","MaxDifferenceOrder"->5}][[1]]
Plots of solution r vs t
{Plot[
rSol[t],
{t,0,100},
PlotRange->{{0,tMax},Automatic}
],
LogPlot[
rSol[t],
{t,0,100},
PlotRange->{{0,tMax},Automatic}
]}
Fig 1
Fig 2
Fig 1 shows that up to t=29.9 or so, there is considerable stiffness (unstable oscillations) that is reconciled by ensuring that the time step is sufficiently small.
THE REAL QUESTION:
What would be a good plot to quantify this stiffness and internal reconciliation/changing of time step? How can I best quantify stiffness graphically in Mathematica?