Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Learn through experiments

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.

1 · Try

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

2 · Predict

What do you expect?

Will a larger time step preserve positivity and decay for every positive rate?

3 · Experiment

Change one thing. Inspect what happens.

  1. At k=2 compare 8,16 and 32 steps while keeping horizon fixed.
  2. Use two steps and explain why the approximation can grow while the exact solution decays.
  3. Find a step count that contracts but alternates sign.
  4. Separate numerical error, a stability condition and uncertainty in whether the differential equation models a real process.
Experiment inputs
Inputs
Your settings
Mechanism
Calculation below
Evidence
Compare outcomes
Step size0.5 s
Euler update multiplier0
Euler final value0
Exact final value0.000335463
Final absolute numerical error0.000335463

Exact continuous decay and Euler steps

Horizontal: Time (s). Vertical: State.

0-9020490Euler 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)
  • 1. Exact y(t) (solid line)
  • 2. Euler approximation (dashed line)

Axes use the displayed ranges.

Read plotted values as a table
SeriesTime (s)State
Exact y(t)01
Exact y(t)0.033330.9355
Exact y(t)0.066670.8752
Exact y(t)0.10.8187
Exact y(t)0.13330.7659
Exact y(t)0.16670.7165
Exact y(t)0.20.6703
Exact y(t)0.23330.6271
Exact y(t)0.26670.5866
Exact y(t)0.30.5488
Exact y(t)0.33330.5134
Exact y(t)0.36670.4803
Exact y(t)0.40.4493
Exact y(t)0.43330.4204
Exact y(t)0.46670.3932
Exact y(t)0.50.3679
Exact y(t)0.53330.3442
Exact y(t)0.56670.322
Exact y(t)0.60.3012
Exact y(t)0.63330.2818
Exact y(t)0.66670.2636
Exact y(t)0.70.2466
Exact y(t)0.73330.2307
Exact y(t)0.76670.2158
Exact y(t)0.80.2019
Exact y(t)0.83330.1889
Exact y(t)0.86670.1767
Exact y(t)0.90.1653
Exact y(t)0.93330.1546
Exact y(t)0.96670.1447
Exact y(t)10.1353
Exact y(t)1.0330.1266
Exact y(t)1.0670.1184
Exact y(t)1.10.1108
Exact y(t)1.1330.1037
Exact y(t)1.1670.09697
Exact y(t)1.20.09072
Exact y(t)1.2330.08487
Exact y(t)1.2670.07939
Exact y(t)1.30.07427
Exact y(t)1.3330.06948
Exact y(t)1.3670.065
Exact y(t)1.40.06081
Exact y(t)1.4330.05689
Exact y(t)1.4670.05322
Exact y(t)1.50.04979
Exact y(t)1.5330.04658
Exact y(t)1.5670.04357
Exact y(t)1.60.04076
Exact y(t)1.6330.03813
Exact y(t)1.6670.03567
Exact y(t)1.70.03337
Exact y(t)1.7330.03122
Exact y(t)1.7670.02921
Exact y(t)1.80.02732
Exact y(t)1.8330.02556
Exact y(t)1.8670.02391
Exact y(t)1.90.02237
Exact y(t)1.9330.02093
Exact y(t)1.9670.01958
Exact y(t)20.01832
Exact y(t)2.0330.01713
Exact y(t)2.0670.01603
Exact y(t)2.10.015
Exact y(t)2.1330.01403
Exact y(t)2.1670.01312
Exact y(t)2.20.01228
Exact y(t)2.2330.01149
Exact y(t)2.2670.01074
Exact y(t)2.30.01005
Exact y(t)2.3330.009404
Exact y(t)2.3670.008797
Exact y(t)2.40.00823
Exact y(t)2.4330.007699
Exact y(t)2.4670.007202
Exact y(t)2.50.006738
Exact y(t)2.5330.006303
Exact y(t)2.5670.005897
Exact y(t)2.60.005517
Exact y(t)2.6330.005161
Exact y(t)2.6670.004828
Exact y(t)2.70.004517
Exact y(t)2.7330.004225
Exact y(t)2.7670.003953
Exact y(t)2.80.003698
Exact y(t)2.8330.003459
Exact y(t)2.8670.003236
Exact y(t)2.90.003028
Exact y(t)2.9330.002832
Exact y(t)2.9670.00265
Exact y(t)30.002479
Exact y(t)3.0330.002319
Exact y(t)3.0670.002169
Exact y(t)3.10.002029
Exact y(t)3.1330.001899
Exact y(t)3.1670.001776
Exact y(t)3.20.001662
Exact y(t)3.2330.001554
Exact y(t)3.2670.001454
Exact y(t)3.30.00136
Exact y(t)3.3330.001273
Exact y(t)3.3670.001191
Exact y(t)3.40.001114
Exact y(t)3.4330.001042
Exact y(t)3.4670.0009747
Exact y(t)3.50.0009119
Exact y(t)3.5330.0008531
Exact y(t)3.5670.0007981
Exact y(t)3.60.0007466
Exact y(t)3.6330.0006984
Exact y(t)3.6670.0006534
Exact y(t)3.70.0006113
Exact y(t)3.7330.0005718
Exact y(t)3.7670.000535
Exact y(t)3.80.0005005
Exact y(t)3.8330.0004682
Exact y(t)3.8670.000438
Exact y(t)3.90.0004097
Exact y(t)3.9330.0003833
Exact y(t)3.9670.0003586
Exact y(t)40.0003355
Euler approximation01
Euler approximation0.50
Euler approximation10
Euler approximation1.50
Euler approximation20
Euler approximation2.50
Euler approximation30
Euler approximation3.50
Euler approximation40

Follow the calculation

  1. Step 1: y=1.00000, slope −k y=-2.00000, h=0.5; next=0.00000.
  2. Step 2: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  3. Step 3: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  4. Step 4: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  5. Step 5: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  6. Step 6: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  7. Step 7: y=0.00000, slope −k y=0.00000, h=0.5; next=0.00000.
  8. 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.

4 · Understand

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.

Return to the course and cumulative project

5 · Apply

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.

6 · Continue

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.