ENG 303 · Engineering Mathematics V (Numerical Methods and Computer Application)
Our notes
1 min readWhy integrate numerically
Areas under measured curves (a river cross-section from depth soundings, work from a force-distance record), and integrals with no closed form (e^(−x²)).
Trapezoidal rule
Split [a, b] into n equal strips of width h:
T = (h/2)[f₀ + 2(f₁ + f₂ + ... + fₙ₋₁) + fₙ]. Error ∝ h² (second order).
Simpson's 1/3 rule
n must be even:
S = (h/3)[f₀ + 4(f₁ + f₃ + ...) + 2(f₂ + f₄ + ...) + fₙ]. Error ∝ h⁴ (fourth order), and it is exact for cubics.
Simpson's 3/8 rule: for three strips, (3h/8)[f₀ + 3f₁ + 3f₂ + f₃]; used when the number of strips is odd (combine with 1/3 rule on the rest).
Worked example
∫₁² (1/x) dx = ln 2 = 0.693147. With n = 4, h = 0.25: f values at 1, 1.25, 1.5, 1.75, 2 are 1, 0.8, 0.666667, 0.571429, 0.5.
- Trapezoidal: 0.125 × [1 + 2(0.8 + 0.666667 + 0.571429) + 0.5] = 0.125 × 5.576191 = 0.697024 (error 0.003877).
- Simpson's 1/3: (0.25/3) × [1 + 4(0.8 + 0.571429) + 2(0.666667) + 0.5] = 0.083333 × 8.319049 = 0.693254 (error 0.000107).
Simpson's rule is about 36 times more accurate here with the same five points.
Romberg integration
Apply Richardson extrapolation to trapezoidal results with h, h/2, h/4, ...: R = T(h/2) + [T(h/2) − T(h)]/3 removes the h² error, and repeating removes higher terms. (The first extrapolation equals Simpson's rule.)
Gaussian quadrature
Choose both the points and the weights to get the highest accuracy. Two-point Gauss-Legendre on [−1, 1]: ∫f ≈ f(−1/√3) + f(1/√3), exact for cubics with only two function evaluations. Change variables to use it on [a, b].
Practical notes
Uneven data spacing: use the trapezoidal rule strip by strip. Check convergence by halving h and comparing. Infinite ranges and singular integrands need special treatment.
Exams usually ask: apply the trapezoidal and Simpson rules to a function or table; state their error orders; explain why Simpson needs an even number of strips; do one Romberg step; use two-point Gauss quadrature.
Common mistake: using an odd number of strips with Simpson's 1/3 rule. Check that n is even, or use the 3/8 rule for one block.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Kaw, Numerical Methods with Applications: Trapezoidal rule of integration
Textbook chapter (PDF, about 0.9 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Trapezoidal rule of integration, CC BY-NC-ND 4.0 · licence
-
Kaw, Numerical Methods with Applications: Simpson's 1/3 rule of integration
Textbook chapter (PDF, about 0.3 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Simpson's 1/3 rule of integration, CC BY-NC-ND 4.0 · licence
-
Simpson's rule
(opens en.wikipedia.org in a new tab)
Wikipedia, Simpson's rule, CC BY-SA 4.0 · licence
-
Trapezoidal rule
(opens en.wikipedia.org in a new tab)
Wikipedia, Trapezoidal rule, CC BY-SA 4.0 · licence
-
Kaw, Numerical Methods with Applications (the whole free textbook)
Every chapter as a separate PDF (0.2 to 1.5 MB each), with videos and quizzes for each method.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications (the whole free textbook), CC BY-NC-ND 4.0 · licence
Watch
-
Trapezoidal Rule: Derivation
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Chapter 07.03: Lesson: Simpson's One Third Rule: Derivation
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Trapezoidal Rule
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
Simpson's Rule & Numerical Integration
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
Numerical Integration - Trapezoidal Rule & Simpson's Rule
54 min · ≈ 243 MB · about ₦136
(opens youtube.com in a new tab)
-
HOW TO USE SIMPSON'S 1/3 AND 3/8 RULES FOR NUMERICAL INTEGRATION.
22 min · ≈ 99 MB · about ₦56
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.