6.5. Stiff Equations

advertisement
6.5. Stiff Equations
The term stiffness refers to a situation where there are 2 or more very different scales
for the independent variable. It can happen only in nonlinear systems equivalent to
more than one 1st order ODEs. The prototype is a spring and mass system with very
large spring constant, i.e., a stiff spring. Another example is a harmonic oscillator
with sufficiently large damping to put it in the overdamped regime.
To be more concrete, consider the following strongly over-damped harmonic
oscillator
x  20 x 
1
x0
100
(6.40)
with initial conditions x(0)  0 and x  0  10 .
The Mathematica solution is in
Example 6-5: LogLog Plot of Stiff Equation Solution
06-5.nb
and the loglog plot of the exact analytic solution is reproduced in Fig.6.10.
Consider then what happens if one starts with the exact solution at t  10 and
integrates numerically forward in time using, say, the Euler method with h  0.2.
The initial values accurate to 6 digits are x(0)  0.497531 and x  0  0.000248772 .
As can be seen in Fig.6.11, the numerical solution follows the analytic one for a short
while, but then becomes unstable and oscillates wildly. It can be shown that an
accurate and stable solution requires h to be smaller than the shortest time scale,
which is  2
1
 0.05 for the present problem.
20
This is rather surprising since our
integration began at a point well past the initial transient rapid rise phase near 2 so
that one may expect (incorrectly) the solution to be dominated by the long time scale
 1 100 . Thus, the property that the step size is determined by the shortest “time”
scale may serve as an operational definition of stiff equations.
Obviously, the Euler method is by no means a standard bearer. However, detailed
investigations showed that a similar limit on the step size holds for all methods. The
possibility that quite small step sizes are required at certain intervals means that
explicit algorithms with fixed time step are not suited for this kind of problem.
Better methods include ones with an adaptive step size, or based on an implicit or
semi-implicit scheme.
Application of the adaptive step size scheme can be found in
Example 6-5: RKF Method Applied to Stiff Equation
The result is plotted in Fig.6.12.
Fig.6.10.
06-6.nb
LogLog plot of the analytic solution to the stiff equation.
Fig.6.11. Euler method applied to stiff equation for h  0.2.
Fig.6.12. RKF 45 method successfully applied to stiff equation.
Download