next up previous
Next: Physical systems described by Up: Finite difference methods for Previous: Transformation of a second

Solution by forward differences (Euler Method).

Consider a single differential equation of the type tex2html_wrap263

Replace the derivative by a finite difference:

displaymath265

displaymath266

where tex2html_wrap_inline273 is a term of order tex2html_wrap_inline275 which is neglected for sufficiently small step size h.

Now if we have a coupled system of first order differential equations of the form:

displaymath267

Then the set tex2html_wrap_inline279 can be computed from the set tex2html_wrap_inline281 by:

displaymath268

The basic algorithm then is:

Get the initial values of tex2html_wrap_inline283 at t = 0

Start the loop:

Calculate the tex2html_wrap_inline285 (the derivatives)

Project the tex2html_wrap_inline283 forward one time step

Go back round the loop till the final time is reached.

The forward difference method is not very accurate because the derivative is assumed to hold over the next h seconds. You should be able to see that in oscillatory problems this will cause the calculation to overshoot the correct answer and the oscillation may grow when it should be damped. The method may also be unstable and small errors may grow rather than be damped out. These problems can often be overcome by choosing a sufficiently small step size h but this makes computation relatively slow.



Keith Jones
Sun Jan 23 14:17:38 EST 2000