Download presentation
Presentation is loading. Please wait.
Published byGeorgiana Johnson Modified over 8 years ago
1
Numerical Methods for Solving ODEs Euler Method
2
Ordinary Differential Equations A differential equation is an equation in which includes derivatives of a function. e.g. An “Ordinary” Differential Equation is one that does not involve partial derivatives. or
3
The “order” of a differential equation is the order of the highest derivative present. e.g. A linear ODE is one in which the derivative terms are only to the 1 st power. 2 nd order, linear 1st order, linear 1st order, non-linear
4
Solving ODEs “Solving” an ODE means finding a function f(x) that satisfies the ODE. For example, if we measure the acceleration, a, of a body undergoing SHM as a function of its displacement from its equilibrium position with time, y(t), we find that As acceleration is the second derivative of displacement with time. Either sin(ct) or cos(ct) will satisfy this ODE, provided the correct choice of the constant c is made.
5
Euler’s Method for Solving ODEs To use Euler’s method to solve an ODE we need to know the rate of change of the function, f ’(x), (i.e. the first derivative), at any point, and The value of the function f(x) at an initial point.
6
We assume that over a small interval (h = dx) close to the known value for f(x 0 ) that both f(x) and f ’(x) are almost the same. y x Y = f(x) x0x0 y0y0 unknown yf ’(x 0 )
7
y x Y = f(x) x0x0 f(x 0 ) unknown f(x)f’(x 0 ) x1x1 f(x 1 ) h To find the next value of y, knowing y 0, we assume that y 1 will be
8
If h is small enough this will be true. Provided the steps h are small c.f. the curvature of the function we are trying to find and we can evaluate f ’(x) at any point, then Euler’s method gives us a good numerical approximation to y. where
9
Taylor Series Derivation The Taylor series allows us to make a numerical (rather than geometrical) approximation to find successive values of y. n.b. h = x-a, where x-a is the step interval, and E is the error term
10
writing We can express the simple Euler method as the first two terms of the expansion to get The error will be of the order h 2.
11
Runge-Kutta Methods For a better approximation to y(n+1) we can use the slope of the mid-point of the interval h, rather than using the slope at x itself.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.