When a slope rule is available but a convenient solution formula is not, advance a short time using the current tangent. For y′=f(t,y), Euler’s method uses yₙ₊₁=yₙ+h f(tₙ,yₙ) and tₙ₊₁=tₙ+h. Here h is the time step, and yₙ approximates the true solution at time tₙ. The method freezes the slope during each step.
For y′=t+y with y(0)=1, take h=1/2. Predict whether the slope used in the second step should be recomputed or reused from the first step.
Predict
For exact exponential decay y′=−ky with k positive, the solution remains positive and tends to zero from a positive initial value. Can Euler produce negative values or growing oscillations? Predict what controls this behavior: the number of displayed digits, or the product kh. Then derive its one-step multiplier before experimenting.
Experiment
The live comparison below uses its own stated initial values and equations. They are separate from the two-step worked example. Change one setting, record the coarse and refined errors, and inspect the exact reference rather than judging only whether two approximations look similar.
Live experiment: a smaller step and a stable calculation
Euler uses yₖ₊₁ = yₖ + h·f(tₖ,yₖ). Predict whether halving h improves the result, then compare the two approximations with a known exact solution. All examples start at t=0 and end at t=2 in dimensionless teaching units.
Coarse step h=0.25 uses 8 derivative evaluations; half-step h=0.125 uses 16. These are mathematical work counts, not measured run times. The plotted exact reference is e^(−kt).
Solid: exact. Dashed: n steps. Dotted: 2n steps. Approximate curves join Euler vertices; they do not become exact between vertices. Graph scales stay fixed.
Exact endpoint: 0.135335. Coarse endpoint: 0.100113; signed error -0.035222. Half-step endpoint: 0.118067; signed error -0.017268.
The Euler multiplier is 1−kh = 0.75. Numerical decay requires |1−kh| < 1; nonnegative values also require 1−kh ≥ 0. Try k=4 with n=4 to see a nondecaying sign alternation, then k=6 to see growth while the exact solution decays.
Inspect every coarse step
k
tₖ
yₖ
f(tₖ,yₖ)
Exact y(tₖ)
0
0
1
-1
1
1
0.25
0.75
-0.75
0.778801
2
0.5
0.5625
-0.5625
0.606531
3
0.75
0.421875
-0.421875
0.472367
4
1
0.316406
-0.316406
0.367879
5
1.25
0.237305
-0.237305
0.286505
6
1.5
0.177979
-0.177979
0.22313
7
1.75
0.133484
-0.133484
0.173774
8
2
0.100113
-0.100113
0.135335
The last row’s slope is shown for inspection; no further Euler update uses it. The step counts above count slopes needed for updates, excluding reference and display calculations. Error comparisons use these known exact solutions and rounded browser arithmetic. General equations need their own analysis. Settings are temporary.
For the worked equation y′=t+y, the trace is:
Step
Starting time
Starting state
Slope
New state with h=1/2
1
0
1
1
3/2
2
1/2
3/2
2
5/2
Recomputing the second slope matters. Reusing the first slope would produce two, which is a different algorithm and fails the stated recurrence.
Understand
For decay, Euler gives yₙ₊₁=(1−kh)yₙ. Perturbations and the state are multiplied by the same factor each step. Decay in magnitude requires ∣1−kh∣<1, equivalent to 0<kh<2. Positive monotone decay needs the stronger range 0<kh<1; at kh=1 the method jumps immediately to zero. Between one and two it alternates signs while shrinking. At two it alternates without shrinking, and beyond two its magnitude grows.
For k=2 and h=1/2, the multiplier is zero. This is stable but inaccurate: the true one-step value from y₀=1 is e^(−1), not zero. For h=3/2, the multiplier is −2, producing artificial growing alternation. Stability and accuracy answer different questions.
Taylor’s theorem explains the step error: the exact solution advances as y(t+h)=y(t)+hy′(t)+O(h²) when its second derivative is bounded. Euler omits that curvature term. Over a fixed finite interval, suitable smoothness and a Lipschitz bound on f lead to global error O(h), because many local errors accumulate and propagate. These statements describe an asymptotic regime with controlled constants, not a universal error bound for any chosen step.
Apply
Halve the step while keeping the final time fixed. In a smooth stable regime, expect roughly half the global error, but verify rather than assume this ratio. A very coarse step may not yet show the asymptotic pattern. Agreement between coarse and fine approximations is useful evidence, not proof that either matches an unknown physical system.
Compare numerical error, parameter uncertainty, and model error in a short report. The exact reference in this teaching widget isolates numerical error; real applications often lack such a reference. The Euler stability investigation provides another bounded experiment with explicit settings.
Continue
Next introduce second-order equations, which track position and rate together. The same numerical principles apply after rewriting a higher-order equation as a first-order system, but coupled modes can impose additional stability restrictions.
Apply · explain · revise
Practice and reasoning
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
For y′=−4y, y=3 and step h=1/8, find the next Euler value.
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
For y′=t−y starting at (0,2), take two Euler steps of h=1/2. Find y after the second step.
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
For y′=−k y, k>0, Euler errors decay asymptotically when:
For y′=−2y,y(0)=1, compare Euler with h=1/2 and h=3/2 against the qualitative exact decay.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Under suitable bounded derivatives and Lipschitz dependence on y on a fixed time interval, explain the local and global errors of Euler.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Why can halving h help estimate numerical error but not validate a mixing or population model?
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.