A decaying equation can have a growing approximation
When does a time step invent behavior absent from the differential equation?
Entering midway? A differential equation specifies an instantaneous rate. Euler stepping approximates a small change as rate now multiplied by step duration.
Start with a concrete question
Solve y′=−ky for four seconds by forward Euler and compare with exact exponential decay.
Try the initial inputs, then write a prediction before changing one setting. All calculations run locally on your CPU.
Go directly to the experiment · Review prerequisite mathematics and return here
What do you expect?
Will a larger time step preserve positivity and decay for every positive rate?
Change one thing. Inspect what happens.
- At k=2 compare 8,16 and 32 steps while keeping horizon fixed.
- Use two steps and explain why the approximation can grow while the exact solution decays.
- Find a step count that contracts but alternates sign.
- Separate numerical error, a stability condition and uncertainty in whether the differential equation models a real process.
Your settingsMechanism
Calculation belowEvidence
Compare outcomes
Exact continuous decay and Euler steps
Horizontal: Time (s). Vertical: State.
- 1. Exact y(t) (solid line)
- 2. Euler approximation (dashed line)
Axes use the displayed ranges.
Read plotted values as a table
| Series | Time (s) | State |
|---|---|---|
| Exact y(t) | 0 | 1 |
| Exact y(t) | 0.03333 | 0.9355 |
| Exact y(t) | 0.06667 | 0.8752 |
| Exact y(t) | 0.1 | 0.8187 |
| Exact y(t) | 0.1333 | 0.7659 |
| Exact y(t) | 0.1667 | 0.7165 |
| Exact y(t) | 0.2 | 0.6703 |
| Exact y(t) | 0.2333 | 0.6271 |
| Exact y(t) | 0.2667 | 0.5866 |
| Exact y(t) | 0.3 | 0.5488 |
| Exact y(t) | 0.3333 | 0.5134 |
| Exact y(t) | 0.3667 | 0.4803 |
| Exact y(t) | 0.4 | 0.4493 |
| Exact y(t) | 0.4333 | 0.4204 |
| Exact y(t) | 0.4667 | 0.3932 |
| Exact y(t) | 0.5 | 0.3679 |
| Exact y(t) | 0.5333 | 0.3442 |
| Exact y(t) | 0.5667 | 0.322 |
| Exact y(t) | 0.6 | 0.3012 |
| Exact y(t) | 0.6333 | 0.2818 |
| Exact y(t) | 0.6667 | 0.2636 |
| Exact y(t) | 0.7 | 0.2466 |
| Exact y(t) | 0.7333 | 0.2307 |
| Exact y(t) | 0.7667 | 0.2158 |
| Exact y(t) | 0.8 | 0.2019 |
| Exact y(t) | 0.8333 | 0.1889 |
| Exact y(t) | 0.8667 | 0.1767 |
| Exact y(t) | 0.9 | 0.1653 |
| Exact y(t) | 0.9333 | 0.1546 |
| Exact y(t) | 0.9667 | 0.1447 |
| Exact y(t) | 1 | 0.1353 |
| Exact y(t) | 1.033 | 0.1266 |
| Exact y(t) | 1.067 | 0.1184 |
| Exact y(t) | 1.1 | 0.1108 |
| Exact y(t) | 1.133 | 0.1037 |
| Exact y(t) | 1.167 | 0.09697 |
| Exact y(t) | 1.2 | 0.09072 |
| Exact y(t) | 1.233 | 0.08487 |
| Exact y(t) | 1.267 | 0.07939 |
| Exact y(t) | 1.3 | 0.07427 |
| Exact y(t) | 1.333 | 0.06948 |
| Exact y(t) | 1.367 | 0.065 |
| Exact y(t) | 1.4 | 0.06081 |
| Exact y(t) | 1.433 | 0.05689 |
| Exact y(t) | 1.467 | 0.05322 |
| Exact y(t) | 1.5 | 0.04979 |
| Exact y(t) | 1.533 | 0.04658 |
| Exact y(t) | 1.567 | 0.04357 |
| Exact y(t) | 1.6 | 0.04076 |
| Exact y(t) | 1.633 | 0.03813 |
| Exact y(t) | 1.667 | 0.03567 |
| Exact y(t) | 1.7 | 0.03337 |
| Exact y(t) | 1.733 | 0.03122 |
| Exact y(t) | 1.767 | 0.02921 |
| Exact y(t) | 1.8 | 0.02732 |
| Exact y(t) | 1.833 | 0.02556 |
| Exact y(t) | 1.867 | 0.02391 |
| Exact y(t) | 1.9 | 0.02237 |
| Exact y(t) | 1.933 | 0.02093 |
| Exact y(t) | 1.967 | 0.01958 |
| Exact y(t) | 2 | 0.01832 |
| Exact y(t) | 2.033 | 0.01713 |
| Exact y(t) | 2.067 | 0.01603 |
| Exact y(t) | 2.1 | 0.015 |
| Exact y(t) | 2.133 | 0.01403 |
| Exact y(t) | 2.167 | 0.01312 |
| Exact y(t) | 2.2 | 0.01228 |
| Exact y(t) | 2.233 | 0.01149 |
| Exact y(t) | 2.267 | 0.01074 |
| Exact y(t) | 2.3 | 0.01005 |
| Exact y(t) | 2.333 | 0.009404 |
| Exact y(t) | 2.367 | 0.008797 |
| Exact y(t) | 2.4 | 0.00823 |
| Exact y(t) | 2.433 | 0.007699 |
| Exact y(t) | 2.467 | 0.007202 |
| Exact y(t) | 2.5 | 0.006738 |
| Exact y(t) | 2.533 | 0.006303 |
| Exact y(t) | 2.567 | 0.005897 |
| Exact y(t) | 2.6 | 0.005517 |
| Exact y(t) | 2.633 | 0.005161 |
| Exact y(t) | 2.667 | 0.004828 |
| Exact y(t) | 2.7 | 0.004517 |
| Exact y(t) | 2.733 | 0.004225 |
| Exact y(t) | 2.767 | 0.003953 |
| Exact y(t) | 2.8 | 0.003698 |
| Exact y(t) | 2.833 | 0.003459 |
| Exact y(t) | 2.867 | 0.003236 |
| Exact y(t) | 2.9 | 0.003028 |
| Exact y(t) | 2.933 | 0.002832 |
| Exact y(t) | 2.967 | 0.00265 |
| Exact y(t) | 3 | 0.002479 |
| Exact y(t) | 3.033 | 0.002319 |
| Exact y(t) | 3.067 | 0.002169 |
| Exact y(t) | 3.1 | 0.002029 |
| Exact y(t) | 3.133 | 0.001899 |
| Exact y(t) | 3.167 | 0.001776 |
| Exact y(t) | 3.2 | 0.001662 |
| Exact y(t) | 3.233 | 0.001554 |
| Exact y(t) | 3.267 | 0.001454 |
| Exact y(t) | 3.3 | 0.00136 |
| Exact y(t) | 3.333 | 0.001273 |
| Exact y(t) | 3.367 | 0.001191 |
| Exact y(t) | 3.4 | 0.001114 |
| Exact y(t) | 3.433 | 0.001042 |
| Exact y(t) | 3.467 | 0.0009747 |
| Exact y(t) | 3.5 | 0.0009119 |
| Exact y(t) | 3.533 | 0.0008531 |
| Exact y(t) | 3.567 | 0.0007981 |
| Exact y(t) | 3.6 | 0.0007466 |
| Exact y(t) | 3.633 | 0.0006984 |
| Exact y(t) | 3.667 | 0.0006534 |
| Exact y(t) | 3.7 | 0.0006113 |
| Exact y(t) | 3.733 | 0.0005718 |
| Exact y(t) | 3.767 | 0.000535 |
| Exact y(t) | 3.8 | 0.0005005 |
| Exact y(t) | 3.833 | 0.0004682 |
| Exact y(t) | 3.867 | 0.000438 |
| Exact y(t) | 3.9 | 0.0004097 |
| Exact y(t) | 3.933 | 0.0003833 |
| Exact y(t) | 3.967 | 0.0003586 |
| Exact y(t) | 4 | 0.0003355 |
| Euler approximation | 0 | 1 |
| Euler approximation | 0.5 | 0 |
| Euler approximation | 1 | 0 |
| Euler approximation | 1.5 | 0 |
| Euler approximation | 2 | 0 |
| Euler approximation | 2.5 | 0 |
| Euler approximation | 3 | 0 |
| Euler approximation | 3.5 | 0 |
| Euler approximation | 4 | 0 |
Follow the calculation
- Step 1: y=1.00000, slope −k y=-2.00000, h=0.5; next=0.00000.
- Step 2: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 3: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 4: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 5: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 6: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 7: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
- Step 8: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
The Euler approximation contracts without sign alternation. Compare its finite-step error with the exact solution.
Captures keep your inputs, prediction and observation. Results are recalculated from those inputs. Resetting inputs keeps your captures and challenge history.
Explain the mechanism
Start with the meaning
A differential equation specifies an instantaneous rate. Euler stepping approximates a small change as rate now multiplied by step duration.
Solve y′=−ky for four seconds by forward Euler and compare with exact exponential decay.
A worked explanation
The exact solution is y(t)=y₀exp(−kt). For positive k and y₀ it remains positive and decays.
Euler gives y(next)=y+h(−ky)=(1−kh)y. Errors contract when |1−kh| less than 1; positivity additionally needs 1−kh≥0.
At k=2 and h=0.5, Euler jumps to zero in one step although the exact value is exp(−1)≈0.3679. It is stable but inaccurate at that step size. Refinement improves approximation without proving the physical model.
Symbols and relationship
h=T/n; Euler yₙ₊₁=(1−kh)yₙ; exact y(t)=y₀e^(−kt). For k>0, asymptotic Euler stability requires 0 less than kh less than 2.
Use the graph and trace together
The graph and calculations use your current inputs. Read axis labels and units before comparing positions or slopes. Change one input, predict the effect, and use the numerical trace to verify the plotted behavior. A displayed curve is an illustration; the formula and its assumptions determine which conclusions are justified.
Scope and edge cases
- One linear decay equation, at most 32 steps and a fixed four-second horizon.
- Initial zero hides instability because it remains exactly zero; test a nonzero perturbation.
Try a fresh case
For y′=−3y, current y=2 and Euler step h=0.2 s, what is the next value?
This is a public practice check. Retries support learning; matching a number does not certify independent proficiency.
Take the investigation further
Choose any extension. These are project prompts for you to carry out; they are not automatically assessed.
School investigation
Compute exact and Euler values for a few steps and label the approximation.
College investigation
Compare Euler, midpoint and implicit Euler stability regions on the same equation.
Workplace investigation
Document time-step convergence and distinguish numerical failure from real process instability.
Keep the evidence, choose your next step
Completion records your own decision that you have worked through this investigation. Practice checks and independent project evidence are separate.