Mistake Master
Approximating Solutions Using Euler's Method
Tangent Lines, Chained
You'll learnto run Euler's method one row at a time, to size and count and point the steps correctly, and to say which side of the true value your estimate lands on before you know the true value.
Euler's method solves a differential equation the way you would cross a dark room: take the direction you have, move a short distance, ask again, repeat. The whole method is one tangent-line step, and the whole difficulty is remembering to ask again. Twelve short steps; press Next for each one.
Read all 12 steps as text
The equation knows the slope here
Start at \((0,\,1)\). Without solving anything, \(\frac{dy}{dx} = x + y\) already says the slope there is \(0 + 1 = 1\).
One step follows it
Go along that direction for a short run of \(h = 0.5\): the height rises by \(0.5 \times 1 = 0.5\), landing at \((0.5,\, 1.5)\).
Ask again where you land
At \((0.5,\, 1.5)\) the equation gives a fresh slope, \(0.5 + 1.5 = 2\) — twice as steep as the one you started with.
Two steps, and a turn
The second step is twice as steep, so the walk visibly turns and arrives at \((1,\, 2.5)\).
The true curve, and the gap
This problem happens to be solvable exactly, \(y = 2e^{x} - x - 1\), so the estimate can be measured rather than trusted.
Which side, with no solving
Differentiating the differential equation gives \(\frac{d^{2}y}{dx^{2}} = 1 + x + y\), which is positive here, so the curve bends upward and every tangent step lands under it.
How wide, and how many
Either the step size is handed to you, or you are given a number of equal steps and \(h = \frac{b - a}{n}\).
Smaller steps, smaller gap
The same problem at \(h = 1\), \(h = 0.5\) and \(h = 0.25\) gives errors of \(1.437\), \(0.937\) and \(0.554\): each halving of \(h\) roughly halves the gap.
Walking backwards
If the initial condition sits at \(x = 1\) and you want \(y(0.5)\), then \(h = \frac{0.5 - 1}{2} = -0.25\) and the recursion runs unchanged.
A bowl and a dome
Both panels start at \((0,\,1)\) with the same two steps; only the equation differs, and the walks end up on opposite sides of their curves.
One slope reused
Reusing the first slope for both steps gives \(1 + 0.5(1) + 0.5(1) = 2\), which is the tangent line at the start stretched across the whole interval.
The routine
Size the step, count the rows, get the sign of \(h\) right, and re-ask the equation at every new point.