Information Technology Reference
In-Depth Information
Note that the analytical solution e 100t is equal to one initially and decreases rapidly
and monotonically toward zero. Let us set N D 10 in our numerical scheme. Then
we have
y 0
D 1;
D 1
D 9;
100
10
y 1
D 1
2 D 18;
100
10
y 2
D 1
3 D 729;
100
10
y 3
and so on. We note that the values oscillates between positive and negative values
and that their absolute values increase very quickly. Now, these values have nothing
whatsoever to do with the correct solution. The approximation fails completely. This
phenomenon is a very unfortunate and common problem in the numerical solution of
differential equations. It is referred to as numerical instability and leads to erroneous
solutions. This example is very simple and therefore we are able to fully understand
what is going on and how to deal with it. But for complicated models, stability
problems can be very difficult.
Let us reconsider the scheme (2.31) and require that the solution be positive. For
agivenn; we assume that y n >0and we want to derive a condition on t that also
ensures that y nC1 is positive. It follows from scheme (2.31) that we must have
1 100t > 0
or
1
100 ;
t <
(2.32)
which means that the number of time steps N must satisfy
N
>
101:
If we now choose N D 101; we get
D 1
n D
100
101
1
101 n
y n
;
where we note that all the values are strictly positive, and in particular we get
1
101 101
y.1/ y 101
D
0:
 
Search WWH ::




Custom Search