Picture: walking along the gradient in tiny straight steps: A differential equation dy/dx = f(x, y) tells you the gradient at every point, but not the curve itself. Imagine standing on the solution curve at a known point (x₀, y₀).
You cannot see the whole curve, so you walk forward in a tiny straight step of width h, following the gradient you can measure right now. Then you re-measure the gradient at the new point and step again.
Each step is a short straight line, so the path is only approximate — but with small enough steps it hugs the true curve closely. That is Euler's method.
Count the steps — this is where marks are lost: To reach a target x-value from x₀ in steps of width h you need
number of steps = (target − x₀) ÷ h.
For example, going from x = 1 to x = 2 with h = 0.25 is (2 − 1)/0.25 = 4 steps, not one. Always work this out first, then build a table with that many rows after the starting row.
IB-style question — cooling metal block
A metal block cools so that its temperature T (°C) satisfies dT/dx = −0.4(T − 25), where x is the time in minutes. At x = 1 minute the block is at 85 °C.
Use Euler's method with step length h = 0.25 to estimate the temperature at x = 2 minutes.
Step by step
- First count the steps: from x = 1 to x = 2 with h = 0.25.
- Write the recurrence for this DE, where f(x, T) = −0.4(T − 25).
- Step 1, from (1, 85). Gradient = −0.4(85 − 25) = −24.
- Step 2, from (1.25, 79). Gradient = −0.4(79 − 25) = −21.6.
- Step 3, from (1.5, 73.6). Gradient = −0.4(73.6 − 25) = −19.44.
- Step 4, from (1.75, 68.74). Gradient = −0.4(68.74 − 25) = −17.496.
Final answer
After 4 steps we reach x = 2, giving T ≈ 64.4 °C. The block is approximately 64.4 °C after 2 minutes. This is an estimate — Euler treats each step as a straight line, so it slightly misses the true cooling curve.
Lay it out as a table: Set out columns n, xₙ, yₙ and f(xₙ, yₙ). Fill the gradient column first, then use it to get the next yₙ. The number of rows below the starting row equals your step count — re-count at the end as a check.
One gradient, one step, repeat: Every Euler step is the same three moves: read the gradient f(xₙ, yₙ) at where you are, take a step yₙ₊₁ = yₙ + h·(that gradient), and advance x by h.
On the GDC you can store this as a recursive sequence (or just type each line into a table), so the calculator grinds out the rows — a GDC is allowed on every AI paper, and this is the intended method.
Because each step follows the starting gradient of the step (not the average), Euler under- or over-estimates depending on how the curve bends: for a curve that is concave up it tends to undershoot, for concave down it tends to overshoot.
IB-style question — charging a capacitor
A capacitor charges so that the charge Q (coulombs) satisfies dQ/dt = (6 − Q)/2, where t is the time in seconds. At t = 0 the capacitor is uncharged, so Q = 0.
Use Euler's method with step length h = 0.5 to estimate the charge at t = 2 seconds.
Step by step
- Count the steps: from t = 0 to t = 2 with h = 0.5.
- The recurrence, with f(t, Q) = (6 − Q)/2.
- Step 1, from (0, 0). Gradient = (6 − 0)/2 = 3.
- Step 2, from (0.5, 1.5). Gradient = (6 − 1.5)/2 = 2.25.
- Step 3, from (1, 2.625). Gradient = (6 − 2.625)/2 = 1.6875.
- Step 4, from (1.5, 3.46875). Gradient = (6 − 3.46875)/2 = 1.265625.
Final answer
After 4 steps, Q ≈ 4.10 coulombs at t = 2 seconds. The true charge curve flattens towards 6 C; because it is concave down, Euler slightly OVERSHOOTS, so 4.10 C is an over-estimate of the real value.
Use the previous row's value, not the rounded one: Carry full accuracy between rows — feed the unrounded yₙ into the next step and only round the FINAL answer. Rounding every row makes the error grow. On the GDC the stored sequence value already keeps full precision for you.