# Stiff Equations - What to plot as a qualitative or quantitative measure of stiffness

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==1,r,
{t,0,tMax},Method->{"BDF","MaxDifferenceOrder"->5}][]


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?

• Welcome to SciComp! Please include the ODE (and its initial conditions) using LaTeX syntax so that non-Mathematica users can better understand your example. – Geoff Oxberry Apr 4 '14 at 4:42
• This might be helpful: blogs.mathworks.com/cleve/2014/06/09/… – Rhei Jan 20 '15 at 13:44
• Someone (Gustaf Soderlind) has finally proposed a quantitative measure of stiffness that experts are beginning to agree on. See this paper. – David Ketcheson Jan 15 '17 at 8:07