Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Differential Equations / Higher order and systems

Numerical Methods for ODEs

Approximating solutions when no closed form exists — Euler's method and Runge–Kutta.

3 min read · 6 sections · 1 checks

Contents 7 sections
  1. §1Introduction
  2. §2Euler's Method
  3. §3Runge–Kutta
  4. §4Worked Example
  5. §5Common Mistakes
  6. §6Summary
  7. ?Check yourself

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…
Fig. 1 Compare Euler steps with the accurate solution.

§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 h=0.1h = 0.1 to approximate y(0.2)y(0.2) for y′=y,y(0)=1y' = y, y(0) = 1.

Example 1Solution

  1. y1=1+0.1⋅1=1.1y_{1} = 1 + 0.1 \cdot 1 = 1.1.

§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

  1. Numerical methods step forward using the slope.
  2. Euler is simple but first-order accurate.
  3. RK4 is the standard for accuracy.

Check yourself

  1. Q1
    Euler’s method uses which update?