8.4 ODE algorithms
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §8.4. Original wording — not a paste of
rk4.py/rk45.py/ABM.py. Continues 8.2–8.3. Labs: 8.4b ODE algorithm labs.
Fixed steps
We march with a uniform step (Fig. 8.5). Adaptive and multistep methods appear only as structure sketches in 8.7.
Euler and midpoint RK2
Euler follows the left-endpoint tangent; midpoint RK2 samples a half-step slope. Walk both updates among lookalike formulas (RK4 stages are separate below).
Classic RK4 (structure)
Four slopes with weights , , , . Pick the stage definitions and the weighted update among lookalikes.
Labs implement RK2 carefully and may use this RK4 structure; do not paste VPython textbook listings.
What we leave for sketches
- RK45 (adaptive): two embedded formulas estimate the local error and adjust .
- Adams–Bashforth–Moulton (ABM): multistep predictor–corrector using a history of values.
Both are outlined in 8.7 without dumping publisher code.
ODE algorithms
1 / 4Euler’s update is…
Pick an answer to see if you are right.
Next: 8.4b ODE algorithm labs.