This was made for MA331 class Differential Equations in Washburn University. No login required.
Euler's method uses the slope at the current point to step forward: yn+1 = yn + h Β· f(xn, yn). Improved Euler (Heun's method) uses the average of two slopes for better accuracy: kβ = f(xn, yn), kβ = f(xn + h, yn + hΒ·kβ), and yn+1 = yn + (h/2)(kβ + kβ).
Note: Trig is in radians. Use β for square root (symbol, not "sqrt"). Use a/b for fractions (numerator over denominator).
| n | x | yβ | f(xβ,yβ) | yβββ |
|---|
| n | x | yβ | f(xβ,yβ) | kβ | kβ | yβββ |
|---|
Both methods on the same plot. Drag to pan, scroll to zoom.