Topic 14.6: Stiff Differential Equations (Examples)

Contents Previous Chapter Start of Chapter Previous Topic Introduction Notes Theory HOWTO Examples Engineering Error Questions Matlab Maple Next Topic Next Chapter

The following are not stiff differential equations, however, the techniques may still be applied.

Example 1

Given the IVP y(1)(t) = 1 - t y(t) with y(0) = 1, approximate y(1) with one step.

First, let t0 = 0, y0 = 1, and h = 1. Thus, we write down the equation

-υ + y0 + h*f(t1, υ) = 0

and, after substituting the appropriate values, we get

-υ + 1 + 1*f(1, υ) = -2 υ + 2 = 0

Solving this equation yields υ = 1, and therefore we set y1 = 1. The absolute error is 0.33.

Example 2

Given the same IVP shown in Example 1, approximate y(0.5).

First, let t0 = 0, t1 = 0.5, y0 = 1, and h = 0.5. Thus, we write down the equation

-υ + y0 + h*f(t1, υ) = 0

and, after substituting the appropriate values, we get

-υ + 1 + 0.5*f(0.5, υ) = -1.25 υ + 1.5 = 0

Solving this equation yields υ = 1.2, and therefore we set y1 = 1.2. The absolute error is 0.14 which is approximately the absolute error in Example 1.

Example 3

Repeat Examples 1 and 2 but with with the initial value y(0.5) = 2.5 and approximating y(1.5) and y(1.0).

To find y(1.5), let t0 = 0.0, t1 = 1.5, y0 = 2.5, and h = 1. Thus, the equation

-υ + 2.5 + 1*f(1.5, υ) = -2.5 υ + 3.5 = 0

Solving this equation yields υ = 1.4, and therefore we set y1 = 1.4. The actual value is y(1.5) = 1.502483616, and therefore the absolute error is 0.102.

To find y(1.0), let t0 = 0.0, t1 = 1.0, y0 = 2.5, and h = 0.5. Thus, the equation is

-υ + 2.5 + 0.5*f(1.0, υ) = -1.5 υ + 3.0 = 0

Solving this equation yields υ = 2, and therefore we set y1 = 2. The actual value is y(1) = 2.126611964 and therefore the absolute error is 0.127.

This absolute error is larger than it was when h = 1.0, and thus, to show that the error is O(h2), we must use smaller values of h. These are shown in Table 1.

Table 1. Errors when approximating y(t0 + h) for decreasing values of h.

hApproximation
of y(0.5 + h)
Error
1.1.40.102
0.52.0.127
0.252.3157894740.0528
0.1252.4347826090.0160
0.06252.4754716980.00434
0.031252.4899135460.00112
0.0156252.4955194950.000285
0.00781252.4979026080.0000719
0.003906252.4989872830.0000181
0.0019531252.4995026700.00000452
0.00097656252.4997535950.00000113

The quadratic behaviour becomes obvious with the last step, being smaller by almost exactly 4.

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.