Numerical Solution of ODEs


Ordinary differential equations (ODEs) are differential equations with only one independent variable. The purpose of a numerical method for solving ODEs is to find an approximation to the function x(t) that satisfies the ODE in a region [a,b] with given boundary conditions of x(t) at t=a and/or t=b.

Worksheet on Ordinary Differential Equations

The order of an ODE is the highest derivative in the equation. An n-th order ODE can be reduced to a system of first order ODEs. Hence the solution of ODEs of any order can be seen as the solution of a system of first order ODEs:


Worksheet on converting a higher order ODE into a first degree system of equatons

Boundary Conditions
The nature of the boundary condition is critical in the determination of the numerical method that is to employed in its solution. For example the initial value problem the conditions at t=a are given. At two-point value problems conditions must be applied at both x=a and x=b.

Euler's Method
By using the simple approximation (x(c+h)-x(c))/h for dx(c)/dt for a fixed step length h and starting from t=a and the initial value x(a), the solution at each step ( x(a+h), x(a+2h) etc) can be found through the substitution of this expression in the original ODE. Although this method does work it is found to be very inefficient in comparison with alternative methods and it is seldom used in practice. Worksheet and Examples in Excel

Runge-Kutta Methods
In Runge-Kutta methods the integration interval [c,c+h] is divided into sub-intervals, the derivative is found at each of the subintervals and a weighted average is taken to obtain an accurate solution. Worksheet and Examples in Excel

Predictor Corrector Methods
Predictor-corrector methods are methods in which two formulas are used one to "predict" the solution at each step, the corrector also uses the predicted value in its formula to "correct" the solution.

Two-point BVP
Such problems can be solved by the shooting method in which values for all conditions that are not given at x=a are estimated. A method described above is then employed to find the solution. The results at x=b are then compared with the actual boundary condition. With this knowledge, the conditions at x=a are changed and the solution run again. This continues until a satisfactory result is obtained.

Alternatively, relaxation methods can be used. The ODE is replaced by a difference equation defined throughout the range [a,b]. Starting with a trial solution, an iterative process called relaxation is then employed to bring the numerical solution closer and closer to satisfying the ODE and the boundary conditions. In this method Books on the methods described above are listed in . Click on the topic of interest below.

 [ ] [] [ ] [] [ ] [Fortran ] [ ]

[] [] [] [] []