Euler’s method
Step along a differential equation using the current tangent slope.
Euler’s method is one of 2 numerical methods formulas in the differential equations section of this library, and it is used at ap · university level.
Why euler’s method works
A differential equation hands you the slope at any point you have reached. Pretending the solution runs in a straight line for a short distance h lets you predict the next point, and from there the equation supplies a fresh slope. Chaining these short straight hops traces a rough version of the true curve.
What each symbol means
$h$ is step size and $y'=f(x,y)$.
Euler’s method: when it holds
Smaller $h$ usually improves accuracy but increases work; accumulated error must be monitored.
When it stops applying
Stiff equations blow up unless h is tiny. Take y' = −20y with h = 0.2: each step multiplies y by 1 − 4 = −3, so the numbers swing to −3, 9, −27, and after five steps reach −243, while the true solution is quietly decaying toward zero.
Euler’s method: a worked example
For $y'=y,y(0)=1,h=.1$, $y_1=1+.1(1)=1.1$.
The mistake to avoid
What people do: Students compute the slope once at the starting point and reuse it for every step.
Why it goes wrong: That draws a single straight line and misses the whole idea. The slope has to be recomputed at each new point, because the point is what determines it.
Do this instead: Recalculate f at the current x and y before every hop. For y' = y from y(0) = 1 with h = 0.1, the first step gives 1.1, and the second uses the new slope 1.1 to reach 1.21, not 1.2.
Euler’s method: step by step
- Name the unknown, and the unit the answer has to come out in.
- Match the symbols to your values. $h$ is step size and $y'=f(x,y)$.
- Check the conditions before substituting. Smaller $h$ usually improves accuracy but increases work; accumulated error must be monitored.
- Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most differential equations slips.
Where this formula fits
- Subject
- Differential Equations formulas — 8 entries in this library
- Topic
- Numerical methods
- Level
- AP · University
Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where euler’s method comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.
- Derivative Rules — the lesson behind this formula: differentiate sums, products, quotients, and compositions.
- Calculus Calculator — check your substitution and the value it produces.
- Study differential equations — the subject guide that explains the ideas these formulas compress.
- Differential Equations Practice — questions that make you retrieve the formula instead of recognising it.
- All 8 differential equations formulas — the full grouped reference, or the complete formula library.
Questions about euler’s method
Why is my answer always low for y' = y?
Because that solution curves upward, and each straight-line hop cuts underneath the curve. Ten steps of size 0.1 give 2.5937 against a true value of 2.7183, about 4.6 percent short.
How does the error shrink as I make h smaller?
Roughly in proportion to h, since the method is first order. Halving the step size about halves the error, which is slow going compared with higher-order methods.
Does a smaller step always help?
Up to a point. Past a certain fineness the extra rounding error from millions of additions outweighs the improvement, so accuracy stops improving and eventually gets worse.
If it is so inaccurate, why learn it?
Because it makes the idea visible in one line and it is the foundation every better method builds on. Runge-Kutta and the implicit solvers are all refinements of this same step-and-repeat scheme.