Numerical Methods · Numerical Methods
Numerical Methods for ODEs
Explanation
Initial Value Problem (IVP)
Given an ordinary differential equation (ODE):
Goal: approximate at points with equal steps .
Euler's Method — First Order
Idea: follow the tangent line at :
Local truncation error: per step. Global error: .
Disadvantage: error accumulates fast. For reasonable accuracy, must be very small.
**Runge-Kutta Order 4 ()**
Idea: average four slope estimates at sub-points of the step:
Global error: — times more accurate than Euler's method.
Stiff Equations
A stiff ODE contains components with very different time scales (e.g., ). Explicit methods (Euler, ) require extremely small for stability — very inefficient.
Solution: implicit methods — e.g., backward Euler:
Requires solving an equation each step, but much more stable for stiff problems.
Predictor-Corrector
Step 1 — Predict (crude estimate, e.g., via Euler):
Step 2 — Correct (improve via trapezoid rule):
Global error: , with only 2 function evaluations per step.
Basic PDE: Heat Equation
For the heat equation , apply finite differences in both directions:
Stability condition (CFL criterion):
Given an ordinary differential equation (ODE):
Goal: approximate at points with equal steps .
Euler's Method — First Order
Idea: follow the tangent line at :
Local truncation error: per step. Global error: .
Disadvantage: error accumulates fast. For reasonable accuracy, must be very small.
**Runge-Kutta Order 4 ()**
Idea: average four slope estimates at sub-points of the step:
Global error: — times more accurate than Euler's method.
Stiff Equations
A stiff ODE contains components with very different time scales (e.g., ). Explicit methods (Euler, ) require extremely small for stability — very inefficient.
Solution: implicit methods — e.g., backward Euler:
Requires solving an equation each step, but much more stable for stiff problems.
Predictor-Corrector
Step 1 — Predict (crude estimate, e.g., via Euler):
Step 2 — Correct (improve via trapezoid rule):
Global error: , with only 2 function evaluations per step.
Basic PDE: Heat Equation
For the heat equation , apply finite differences in both directions:
Stability condition (CFL criterion):
Interactive Visualization
Loading visualization
Worked Examples
Practice
Exercise 1 of 6
1
Euler's method for , with . What is ?
★Quiz
Test your knowledge from this lesson
A mix of questions from the lesson — each attempt varies slightly
Answer at least 4 out of 5 questions correctly to pass (70%)