Euler approximation
From Wikipedia, the free encyclopedia
The Euler approximation is a numerical method of solving differential equations, mostly useful when the solution to a differential equation cannot be found analytically. Euler approximations are found using a recursive formula that uses slope information, given by the derivative, to approximate a value on a solution close to an initial point. It is named after the mathematician Leonhard Euler.
If the function is concave, the approximation will be an overestimate, and if the function is convex ("concave up-wards"), the approximation will be an underestimate. These approximations are more accurate with smaller step sizes.
Contents |
[edit] Formulae
Given a differential equation in the form
and an initial point (x0,y0) of the solution y(x), an approximate discrete solution is given as a pair of sequences
where
, is the step size
[edit] Reasoning
Near any given xn, the function y(x) may be approximated by a line tangent to that point. Since the derivative at that point, y'(xn) = fn, is the value of the tangent line slope, we have that
using this to determine the value at xn + 1 = xn + h yields the result above.
Further insight comes from evaluating the Taylor series expansion of y(x) at xn + 1, centred in xn, at xn + 1, as above.
The first two terms are the same as above, yet now we have an estimate of the order of magnitude of the approximation error at each step, which is of h2 for each step.
[edit] Uses
One common use is in video games simulating physics. The above equations would give:
- newposition = oldposition + velocity * timestep
which is certainly the most intuitive method for iteration, especially if your time step is 1.
More commonly used, however, is the verlet integration method, which is considerably more stable.