1. Numerical Integration
3. Romberg Integration
5. Differential Equations (ODEs)
Trapezoidal Rule (Straight lines)
Crush error by cascading Trapezoidal
estimates.
Goal: Find coordinates on a curve when given
I = (h/2) [f(x0) + 2Σf(xi) + f(xn)]
New = [4k(Bottom) − Top] / [4k − 1]
Error: O(h²). Find n: Error ≤ [(b−a)/12] h² max|
f''(x)|
• Col 1 (1st Order, k=1): (4×Bot − Top) / 3
Simpson's 1/3 Rule (Parabolas)
• Col 2 (2nd Order, k=2): (16×Bot − Top) / 15
Condition: n MUST be an even number.
• Col 3 (3rd Order, k=3): (64×Bot − Top) / 63
I = (h/3) [f(x0) + 4Σf(xodd) + 2Σf(xeven) +
f(xn)]
Pattern: 1, 4, 2, 4, 2, 4, 1. Error: O(h⁴)
Simpson's 3/8 Rule (Cubics)
Condition: n MUST be a multiple of 3.
I = (3h/8) [f(x0) + 3f(x1) + 3f(x2) + 2f(x3) +
&dots;]
Pattern: 1, 3, 3, 2, 3, 3, 1. Error: O(h⁴)
Hybrid Strategy (e.g., n = 5)
Use 1/3 Rule for the first 2 segments (3 points).
Use 3/8 Rule for the last 3 segments (4 points).
the equation for its slope (dy/dx = f(x, y)).
Euler's Method (1st Order)
Look at slope, walk in a straight line blindly.
yi+1 = yi + f(xi, yi) ċ h
2. Double Integration
4. Numerical Differentiation
6. Runge-Kutta 4th Order (RK4)
The Sweep Method (Always Safe)
Forward Difference (Error: O(h))
Scout 4 slopes before moving. Averages them
using the Simpson's 1-2-2-1 weighting pattern.
1. Run 1D rule horizontally across each row to
get a new column of Totals.
f'(xi) = [f(xi+1) − f(xi)] / h
2. Run 1D rule vertically down the Totals
column to get the final volume.
Backward Difference (Error: O(h))
The 1-2-4 Matrix (Double Trapezoidal)
f'(xi) = [f(xi) − f(xi-1)] / h
ONLY if both directions are Trapezoidal AND
uniform step sizes (h, k).
I = (hk/4) [■ + 2★ + 4●]
■ = 4 Corners | ★ = Perimeter Edges | ● = Inner
Grid
Centered Difference (Error: O(h²) → Best)
f'(xi) = [f(xi+1) − f(xi-1)] / 2h
Richardson Extrapolation
Tournament bracket (like Romberg) applied to
derivatives to boost accuracy to O(h⁴).
D = [4 ċ D(h/2) − D(h)] / 3
Unequally Spaced Data
1. Use Newton's Divided Difference to fit a
polynomial equation.
2. Expand algebra to standard form.
3. Take standard analytical derivative
(Calculus I).
4. Plug in your target x.
The 4 Scouts (Calculate in order!):
k1 = h ċ f(x0, y0)
k2 = h ċ f(x0 + h/2, y0 + k1/2)
k3 = h ċ f(x0 + h/2, y0 + k2/2)
k4 = h ċ f(x0 + h, y0 + k3)
The Final Step:
yi+1 = yi + (1/6)[k1 + 2k2 + 2k3 + k4]
Calculator Tips:
• Write down intermediate k values to 4-5
decimal places to avoid snowballing
truncation errors!
• Feed each k directly into the next.
7. Exam Traps
• Newton's Polynomial: A 2nd-degree
polynomial (n=2) requires 3 data points.
Don't confuse degree with number of points!
• Mixed Methods: If a double integration asks
for Trapezoidal on x and Simpson's on y, the
1-2-4 matrix is completely useless. You
MUST sweep.