Skip to main content
Examonaut

Topic 6

Further numerical methods

Most differential equations met in real models cannot be solved exactly, and most integrals have no formula. Numerical methods replace calculus with arithmetic: a derivative becomes a difference between nearby values, and a curve becomes a chain of short straight lines or parabolas. The answers are approximate, but you can make them as accurate as you need by taking smaller steps.

What you need to know

  • Solve first order differential equations numerically with yr+1≈yr+h(dydx)ry_{r+1} \approx y_r + h\left(\frac{dy}{dx}\right)_r (Euler's method) and yr+1≈yr−1+2h(dydx)ry_{r+1} \approx y_{r-1} + 2h\left(\frac{dy}{dx}\right)_r (the midpoint formula).
  • Solve second order differential equations numerically with the approximations (dydx)r≈yr+1−yr−12h\left(\frac{dy}{dx}\right)_r \approx \frac{y_{r+1} - y_{r-1}}{2h} and (d2ydx2)r≈yr+1−2yr+yr−1h2\left(\frac{d^2y}{dx^2}\right)_r \approx \frac{y_{r+1} - 2y_r + y_{r-1}}{h^2}.
  • Use Simpson's rule to estimate integrals, including from a table of data.
  • Comment on accuracy, and compare with exact answers using percentage errors.

Key points

  • Euler: yr+1≈yr+h(dydx)ry_{r+1} \approx y_r + h\left(\frac{dy}{dx}\right)_r.
  • Midpoint: yr+1≈yr−1+2h(dydx)ry_{r+1} \approx y_{r-1} + 2h\left(\frac{dy}{dx}\right)_r; it needs y1y_1 first, usually from one Euler step.
  • Second order: (d2ydx2)r≈yr+1−2yr+yr−1h2\left(\frac{d^2y}{dx^2}\right)_r \approx \frac{y_{r+1} - 2y_r + y_{r-1}}{h^2} and (dydx)r≈yr+1−yr−12h\left(\frac{dy}{dx}\right)_r \approx \frac{y_{r+1} - y_{r-1}}{2h}; use the second at x0x_0 to find y1y_1.
  • Simpson's rule: h3[ends+4(odds)+2(evens)]\frac{h}{3}\left[\text{ends} + 4(\text{odds}) + 2(\text{evens})\right] with an even number of strips.
  • Smaller steps give better accuracy; errors build up with each step.

Practise this topic

Both are part of Premium.

Next lesson1. First order differential equations