Differential Equations / Higher order and systems
Numerical Methods for ODEs
Approximating solutions when no closed form exists — Euler's method and Runge–Kutta.
Contents 7 sections
By the end you can
- Apply Euler's method to approximate a solution
- Understand the Runge–Kutta improvement
- Assess the error and step size tradeoff
Helps to know: First Order ODEs, Linear Approximation
§1Introduction
Most ODEs cannot be solved in closed form. Numerical methods approximate the solution by stepping forward in small increments, using the slope at each point.
§2Euler's Method
Preparing the instrument…
§3Runge–Kutta
RK4 improves accuracy by sampling the slope four times per step and taking a weighted average. It is the workhorse of scientific computing.
§4Worked Example
Use Euler's method with to approximate for .
Example 1Solution
- .
§5Common Mistakes
- Using too large a step size, producing drift.
- Reusing the old slope instead of recomputing at each step.
- Expecting Euler's method to match the exact solution closely.
§6Summary
- Numerical methods step forward using the slope.
- Euler is simple but first-order accurate.
- RK4 is the standard for accuracy.
Check yourself
- Q1Euler’s method uses which update?