






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The general form of ordinary differential equations and introduces euler's method and the midpoint method as numerical integration techniques. Euler's method is the simplest method that converts differential equations into differences and calculates the value of δy by multiplying the right-hand side of each differential equation by the step size δx. The midpoint method, on the other hand, evaluates the derivatives at the midpoint of the δx interval and uses euler's method to estimate δy. The document also compares the results of these methods with the analytical solutions for specific examples.
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Robert F. Murphy
For a set of n unknown functions yi (for i = to n ) we are given a set of n functions fi that specify the derivatives of each yi with respect to some independent variable x
We can rewrite this as a recursion formula that allows us to calculate values of the functions yi at a series of x values. We introduce a second subscript j to indicate which x value we refer to (note that yi,j now refers to a value not a function). yi , j 1 yi , j x f (^) i ( x (^) j , y 1, j , ..., yn , j ) x (^) j 1 x (^) j x
Note the asymmetry of this method: the derivative ( fi ) that is used to span the x is calculated only for the x value at the beginning of the interval. In regions where fi is increasing with x, this leads to underestimation of y, and, in regions where fi is decreasing with x, to overestimation of y.
A better estimate would come from evaluating the fi at the midpoint of the x interval. The problem: we know x at the midpoint but we don’t know the yi at the midpoint (yet). The solution is to use Euler’s method to estimate y and then re- estimate y using the derivatives evaluated halfway along the line segment encompassing the original y.
This is called the midpoint method or the second-order Runge-Kutte method.
y (^) j x f (^) ( x (^) j , y (^) j )
y (^) j 0.5 x f ( x (^) j
x 2
, y (^) j
y (^) j 2
y (^) j 1 y (^) j y (^) j 0.
Now consider dy/dx =3 y. The analytical solution is y =e^3 x. The graph shows the Euler, Midpoint and analytical solutions (along with derivatives). Three methods for dy/dx =3 y
(^100) 2030
4050
6070
8090
100
0 0.5 (^) x 1 1.
y
0
50
100
150
200
250 y (2°RK)^300 y (Analy t)y (Euler) dy /dx(x)dy /dx(x+Dx/2)
Note that the midpoint method is better than Euler’s method but it does not give results identical to the analytical solution since dy/dx now depends on y.
The midpoint method can be extended by considering other intermediate estimates. The most frequently used variation is the fourth-order Runge-Kutta method which considers one estimate at the initial point, two estimates at the midpoint, and one estimate at a trial endpoint.