Ordinary Differential Equations

From Uni Study Guides
Jump to: navigation, search

Ordinary differential equations are able to be solved numerically to find their corresponding function value at a certain point.

Contents

Euler's Method

Euler's method approximates the function value using the ordinary differential equation at x + h. An initial value for the function is given, x0 and y0. Applying Euler's method once gives the value of the function at the next point, which h from the last point. It may be required that multiple steps are required given the step size, h, to get to the require function value.

To solve a ODE, rearrange the differential as follows:

Rearrange Euler.PNG

Then substitute the initial conditions into the following formula:

Eulers Method.PNG

where y1 = y(x+h).

To find y(x+h+h), use the new values, where x0 = x+h and y0 = y(x+h). This can be repeated to find the require y(x) value at the required x.

Euler's method is a first order method, therefore its error is O(h).

Huen's Method

Huen's method is an improvement to the Euler's method. It calculates the slope at two different points and averages them to get a more accurate result.

Huens Method.PNG

It is recommended that you calculate parts of this formula separately to avoid making mistakes during substitution.

Huen's method is a second order method, therefore its error is O(h2).

Runge-Kutta Method

Runge-Kutta method is a more accurate method of solving ODEs. The error of a Runge-Kutta is dependent on the order of the Runge-Kutta chosen. The second order Runge Kutta is equal to Huen's method.

The following is the formula for the fourth order Runge-Kutta method, with error O(h4):

RungeKutta.PNG

where:

RungeKutta Method.PNG

End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox