Euler's method is the sentence “the next value is this value plus the rate times the step”, written as yₙ₊₁ = yₙ + h·f(tₙ, yₙ) and applied over and over. On y′ = y from y(0) = 1 with h = 1/4 the first step is 1 + (1/4)·1 = 5/4, the second 5/4 + (1/4)·(5/4) = 25/16, and after four steps the lab prints 625/256, which is (5/4)⁴ exactly and is about 2.44.
Definition · Euler's methodGiven y′ = f(t, y), a start (t₀, y₀) and a step h, Euler's method produces tₙ₊₁ = tₙ + h and yₙ₊₁ = yₙ + h·f(tₙ, yₙ). The values y₁, y₂, … are joined by straight segments to form Euler's polygon.
Each segment has the slope the equation gives at its left end. The polygon is a recipe's output, and it is near the solution for reasons the next lesson measures; it is not the solution.
y′ = y, y(0) = 1, h = 1/4
n tₙ yₙ f(tₙ, yₙ) = yₙ rule
0 0 1 1 start
1 1/4 5/4 5/4 1 + (1/4)·1
2 1/2 25/16 25/16 5/4 + (1/4)·(5/4)
3 3/4 125/64 125/64 25/16 + (1/4)·(25/16)
4 1 625/256 625/256 125/64 + (1/4)·(125/64)
Read the table. Because f(t, y) = y, the slope at each point is the value itself, and each step multiplies the value by 1 + h = 5/4. So every row is a power of 5/4, and y₄ = (5/4)⁴ = 625/256. That is a fact about the recipe: it is the geometric sequence of Algebra's Sequences and Series, with ratio 5/4.
How far off it is
The true solution of y′ = y with y(0) = 1 is e^t, and its value at t = 1 is e ≈ 2.71828, which is rounded: e is not a fraction, and the lab prints it with ≈. Beside it the lab prints 625/256 ≈ 2.44141, also rounded for reading, but the fraction is the exact value of the method. The error it prints, ≈ 0.276876, is rounded too, because it is a fraction subtracted from an irrational number.
None of that error comes from a slip in the arithmetic. Every step used the slope at its left end, while the real slope was climbing as y grew, so every step fell a little short and the shortfalls piled up. The polygon lies below the curve for exactly that reason.
Example · A rate that depends on t aloneTake y′ = 2t from y(0) = 0 with h = 1/4. The slopes read at t = 0, 1/4, 1/2, 3/4 are 0, 1/2, 1, 3/2, so the values are 0, 0, 1/8, 3/8, 3/4, and y₄ = 3/4. The true solution is t², which is 1 at t = 1, so the error is exactly 1/4.
This is the left sum from Accumulation and the Integral: (1/4)·(0 + 1/2 + 1 + 3/2) = 3/4. Euler's method on an equation that does not mention y is exactly a left sum, and its shortfall is the left sum's shortfall on a rising rate.
A rate that falls, then rises
Now y′ = t − y from y(0) = 2 with h = 1/2. The first slope is 0 − 2 = −2, so y₁ = 2 + (1/2)·(−2) = 1. The next slope is 1/2 − 1 = −1/2, so y₂ = 1 + (1/2)·(−1/2) = 3/4. The slope at (1, 3/4) is 1/4, so y₃ = 3/4 + (1/2)·(1/4) = 7/8, and the fourth step gives y₄ = 19/16. The path falls and turns upward, as the true solution t − 1 + 3e^(−t) does, and the true value at t = 2 is 1 + 3e^(−2) ≈ 1.40601, rounded.
More steps, or a smaller step
The tempting remedy is more steps, and it needs care in what it means. Four steps of h = 1/4 end at t = 1. Eight steps of the same size end at t = 2, a different place, and the error there is not comparable. What reduces the error at t = 1 is a smaller step with more of them: eight steps of h = 1/8 give (9/8)⁸ = 43046721/16777216 ≈ 2.56578, an error of ≈ 0.152497, which is better than ≈ 0.276876 and still not zero. No step size makes the polygon the solution, and the next lesson measures how the error falls as h does.