Course
Unguided
500 XP6–8 hours

ODE Solver Suite

Roll your own Euler and RK4, then validate against SciPy.

Build a small ODE integration library from scratch — explicit Euler and classical RK4 — and validate it against scipy.integrate.solve_ivp on problems with known solutions.

Explicit EulerRunge–Kutta 4Local vs global errorValidation against a reference
Objective

Implement euler(f, y0, t) and rk4(f, y0, t) for systems. Validate on y′=−y (exact e^{−t}) and a harmonic oscillator, reporting global error and comparing to solve_ivp.

Acceptance criteria
0/4
Workspace
Deliverables
  • •euler + rk4 in a module.
  • •An error-vs-step-size study.
  • •A validation plot against solve_ivp.
Stretch goals
  • •Add an adaptive step (RK45-style) and compare step counts.
  • •Show energy drift of Euler vs RK4 on the oscillator.