Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

ODE Methods Euler & Runge-Kutta Reference cheat sheet - grade college

Click image to open full size

Calculus Grade college

ODE Methods Euler & Runge-Kutta Reference Cheat Sheet

A printable reference covering Euler's method, improved Euler, RK4, local error, global error, and step-size control for college.

Download PNG

This cheat sheet covers one-step numerical methods for initial value problems of the form y=f(t,y)y' = f(t,y) with y(t0)=y0y(t_0)=y_0. Euler and Runge-Kutta methods approximate solutions when an exact formula is difficult or impossible to find. Students need these methods to compute solution values, compare accuracy, and understand how step size affects numerical error. The reference emphasizes formulas, update rules, and practical checks for college calculus and differential equations work. The main idea is to move from a known point (tn,yn)(t_n,y_n) to a new point (tn+1,yn+1)(t_{n+1},y_{n+1}) using slopes from the differential equation. Euler's method uses one slope, improved Euler uses an average of two slopes, and classical fourth-order Runge-Kutta uses a weighted average of four slopes. The step size is h=tn+1tnh=t_{n+1}-t_n, so smaller values of hh usually improve accuracy but require more computations. Error behavior is summarized by local truncation error and global error orders.

Key Facts

  • An initial value problem has the form y=f(t,y)y'=f(t,y) with y(t0)=y0y(t_0)=y_0, and a numerical method estimates values yny(tn)y_n \approx y(t_n).
  • The time grid is defined by tn=t0+nht_n=t_0+nh, where hh is the step size and nn is a nonnegative integer.
  • Euler's method updates by yn+1=yn+hf(tn,yn)y_{n+1}=y_n+h f(t_n,y_n), using the slope at the beginning of the interval.
  • Improved Euler's method uses k1=f(tn,yn)k_1=f(t_n,y_n), k2=f(tn+h,yn+hk1)k_2=f(t_n+h,y_n+h k_1), and yn+1=yn+h2(k1+k2)y_{n+1}=y_n+\frac{h}{2}(k_1+k_2).
  • The midpoint RK2 method uses k1=f(tn,yn)k_1=f(t_n,y_n), k2=f(tn+h2,yn+h2k1)k_2=f(t_n+\frac{h}{2},y_n+\frac{h}{2}k_1), and yn+1=yn+hk2y_{n+1}=y_n+h k_2.
  • Classical RK4 uses k1=f(tn,yn)k_1=f(t_n,y_n), k2=f(tn+h2,yn+h2k1)k_2=f(t_n+\frac{h}{2},y_n+\frac{h}{2}k_1), k3=f(tn+h2,yn+h2k2)k_3=f(t_n+\frac{h}{2},y_n+\frac{h}{2}k_2), k4=f(tn+h,yn+hk3)k_4=f(t_n+h,y_n+h k_3), and yn+1=yn+h6(k1+2k2+2k3+k4)y_{n+1}=y_n+\frac{h}{6}(k_1+2k_2+2k_3+k_4).
  • Euler's method has global error O(h)O(h), RK2 methods have global error O(h2)O(h^2), and classical RK4 has global error O(h4)O(h^4) under standard smoothness assumptions.
  • Halving hh approximately halves Euler global error, divides RK2 global error by 44, and divides RK4 global error by 1616 when the asymptotic error model applies.

Vocabulary

Initial value problem
A differential equation with a starting condition, usually written as y=f(t,y)y'=f(t,y) and y(t0)=y0y(t_0)=y_0.
Step size
The fixed or variable spacing h=tn+1tnh=t_{n+1}-t_n between consecutive numerical time values.
Euler's method
A first-order one-step method that estimates the next value using yn+1=yn+hf(tn,yn)y_{n+1}=y_n+h f(t_n,y_n).
Runge-Kutta method
A one-step method that combines several slope estimates from f(t,y)f(t,y) to produce a more accurate update.
Local truncation error
The error made in one step when the method starts from the exact value, often described as a power of hh.
Global error
The accumulated difference between the numerical value yny_n and the exact value y(tn)y(t_n) after many steps.

Common Mistakes to Avoid

  • Using yn+1=yn+f(tn,yn)y_{n+1}=y_n+f(t_n,y_n) instead of yn+1=yn+hf(tn,yn)y_{n+1}=y_n+h f(t_n,y_n) is wrong because the slope must be multiplied by the step size hh.
  • Substituting tn+1t_{n+1} into Euler's slope is wrong for standard Euler's method because the formula uses the beginning slope f(tn,yn)f(t_n,y_n).
  • Forgetting that k2k_2, k3k_3, and k4k_4 are slopes is wrong because the RK4 update multiplies their weighted average by hh.
  • Mixing midpoint RK2 with improved Euler is wrong because midpoint uses yn+1=yn+hk2y_{n+1}=y_n+h k_2, while improved Euler uses yn+1=yn+h2(k1+k2)y_{n+1}=y_n+\frac{h}{2}(k_1+k_2).
  • Assuming a smaller hh always fixes every problem is wrong because stiffness, roundoff error, and discontinuities in f(t,y)f(t,y) can still cause inaccurate or unstable results.

Practice Questions

  1. 1 Use Euler's method with h=0.1h=0.1 to estimate y(0.2)y(0.2) for y=t+yy'=t+y, y(0)=1y(0)=1.
  2. 2 For y=yt2+1y'=y-t^2+1, y(0)=0.5y(0)=0.5, compute one improved Euler step with h=0.2h=0.2.
  3. 3 For y=tyy'=t-y, y(0)=2y(0)=2, compute one classical RK4 step with h=0.1h=0.1 and give the estimate for y(0.1)y(0.1).
  4. 4 Explain why RK4 is usually more accurate than Euler's method for the same step size, even though both are one-step methods.