An Euler Step for a Differential Equation

Explicit Euler approximates the next value by adding the current slope times a chosen step.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two advances
  2. Check how the step changes behavior
  3. Evaluate the slope at the old state
  4. Inspect stability and accumulated error

Trace two advances

For \(y'=-y\) with \(y(0)=1\) and step 0.1, Euler gives 0.9 then 0.81. Each slope is based on the latest computed state. State tracing can record both slope and value.

Check how the step changes behavior

An inappropriate step can make a decaying solution grow or oscillate in the discrete model. Record step size when comparing with the expected curve. See reproducible computations.[1][2]

Evaluate the slope at the old state

For \(y'=-2y\), initial \(y=3\) and a step of 0.1, Euler's rule gives \(3+0.1(-6)=2.4\). At the next step the slope uses 2.4, yielding 1.92. The exact solution after two steps is \(3e^{-0.4}\), about 2.011. See intermediate rounding.

t=0, y=3, slope -6
t=.1, y≈2.4, slope -4.8
t=.2, y≈1.92
Exact at .2 ≈ 2.011

Inspect stability and accumulated error

The model's numerical multiplier for each step is \(1-2h\). Large steps can make its magnitude exceed one despite decay in the exact solution. Test several step sizes and compare with the known solution.

References

  1. MIT OpenCourseWare, Differential Equations: Numerical Methods ↩
  2. Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation ↩