Euler's Method
Illustration of Euler's Method for approximating the solution to a differential equation. See also:
MontessoriMuddle.org: Euler's Method
Analytical Solution
If you know the equation for the slope of a curve (the red line for example),
you can integrate to find the general equation of the curve:
then you can substitute in the x and y values from the given point
, that the curve passes through to solve for the coefficient of integration (c):
to get the specific solution:
Numerical Solution (using Euler's Method)
Taking the starting point,
and substitute the x value into the slope equation (Equation (1)), to get:
Now we use the "step size" parameter we set in the graph. The step size is the horizontal distance that we offset from the original slope, so it is the change in x (dx). Specifically:
Using dx to solve for dy (in equation (8)) we get:
Thus, our total offset in x and y is:
If we add the offset to our starting location we get the position of a new point (x
1, y
1):