Chapter 7 3 min read
Save

Ordinary Differential Equations

Numerical Methods · BCA · Updated Apr 15, 2026

Table of Contents

Ordinary Differential Equations

Ordinary differential equations (ODEs) describe phenomena from planetary motion to population dynamics to electrical circuits. Closed-form solutions are rare; numerical methods are essential. This chapter treats initial-value problems y' = f(t, y), y(t0) = y0.

Euler's Method

Euler's method is the simplest: yn+1 = yn + h f(tn, yn). It is first-order accurate, meaning error per step is O(h2) and global error is O(h). Simple to implement but requires very small h for accuracy. It is mainly a teaching tool.

Modified Euler and Heun's Method

Heun's method (improved Euler) averages slopes at the beginning and end of the step: yn+1 = yn + h/2 × (k1 + k2), where k1 = f(tn, yn) and k2 = f(tn + h, yn + h k1). It is second-order accurate and much better than Euler at little extra cost.

Runge–Kutta Methods

The classical fourth-order Runge–Kutta method (RK4) is the workhorse of ODE integration. Each step uses four function evaluations at different points inside the interval: k1, k2, k3, k4, combined as yn+1 = yn + h/6 (k1 + 2k2 + 2k3 + k4). RK4 is fourth-order accurate, self-starting, and easy to implement.

Adaptive Step Control

Higher-order embedded methods, such as Runge–Kutta–Fehlberg, evaluate two estimates of different orders per step. Their difference estimates the local error, allowing automatic adjustment of step size. Adaptive methods are essential for efficient and accurate solution of stiff or highly varying problems.

Multistep Methods

Multistep methods use past values of y and f to advance the solution. Adams–Bashforth methods are explicit; Adams–Moulton methods are implicit and more stable. Predictor–corrector combinations use an explicit method to predict and an implicit method to correct, achieving both stability and accuracy.

Stability and Stiffness

An ODE is stiff when explicit methods require absurdly small step sizes for stability, not accuracy. Stiff equations—common in chemical kinetics and electronics—are solved with implicit methods such as backward Euler, trapezoidal rule, or BDF methods. These require solving a nonlinear equation at each step but remain stable with reasonable h.

Systems and Higher-Order ODEs

Systems of ODEs y' = f(t, y) are handled by vectorizing the scalar methods. Higher-order ODEs are converted to first-order systems by introducing auxiliary variables. This unified treatment means one implementation of RK4 suffices for a vast range of problems.

Boundary-Value Problems

If conditions are specified at both ends of an interval, we have a boundary-value problem (BVP). Shooting methods convert BVPs to initial-value problems by guessing initial conditions and adjusting them until boundary conditions match. Finite-difference and finite-element methods discretize the equation into a system of algebraic equations.

Summary

ODE numerical methods balance accuracy, stability, and cost. Euler's method illustrates the ideas; Runge–Kutta and adaptive algorithms solve most non-stiff problems; implicit and BDF methods handle stiff systems. Modern scientific libraries make these techniques accessible to everyday users.

Related Notes

Discussion

0 comments

Join the discussion

Log in to share your thoughts and help fellow students.

Log in to comment

No comments yet. Be the first to share your thoughts!