Maths Mathematics

MathematicsUnit 1810 min read

Numerical Integration: Trapezoidal & Simpson’s Rules

Unit 18 of Mathematics explains how to approximate definite integrals using numerical methods—Trapezoidal Rule, Simpson’s 1/3 Rule, and error analysis—with step-by-step examples, comparisons, and exam-focused tips for NEB Class 12.


What is Numerical Integration?

Definite integrals often have no elementary antiderivative. Numerical integration approximates their value by dividing the area under the curve into simple shapes (rectangles, trapezoids, parabolas) and summing their areas.

0.20.40.60.811.21.41.61.820.511.522.533.54xyy = x^2(0, 0)(2, 4)
Graph of f(x)=x^2 over [0,2]

1. Trapezoidal Rule

Definition: Divide into equal subintervals of width . Approximate the area under as the sum of trapezoids: where .

0.10.20.30.40.50.60.70.80.910.511.522.5xyf(x) = e^{-x^2}x-axisf(0)f(0.25)f(0.5)f(0.75)f(1)
Trapezoidal Rule approximation for ∫₀¹ e^{-x²} dx with n=4 (h=0.25)

How it works:

  • Step 1: Choose (number of strips). Larger → better accuracy.
  • Step 2: Calculate .
  • Step 3: Evaluate at .
  • Step 4: Apply the formula.

Worked Example: Approximate using .

Solution:

  1. .
  2. Evaluate at :
  3. Apply the formula: Actual value ≈ 0.7468 (exact to 4 decimal places). Here, gives the exact result by coincidence!

Error Analysis: The error is bounded by: For our example, , so . Thus: The approximation is accurate to 2 decimal places.


2. Simpson’s 1/3 Rule

Definition: Requires an even number of subintervals ( even). Approximates the area using parabolic arcs (quadratic functions) over pairs of subintervals: Pattern: .

0.10.20.30.40.50.60.70.80.910.20.40.60.81xyf(x) = √xx-axisf(0)f(0.25)f(0.5)f(0.75)f(1)
Simpson’s Rule approximation for ∫₀¹ √x dx with n=4 (parabolic segments)

How it works:

  • Step 1: Ensure is even.
  • Step 2: Calculate .
  • Step 3: Evaluate at all .
  • Step 4: Apply the weighted sum.

Worked Example: Use Simpson’s Rule with to approximate .

Solution:

  1. .
  2. Evaluate at :
  3. Apply Simpson’s Rule: Actual value = . The error is due to being small.

Error Analysis: The error is bounded by: For , is large near , so the error grows if is too small.


Comparison: Trapezoidal vs. Simpson’s Rule

Feature Trapezoidal Rule Simpson’s 1/3 Rule
Shape used Trapezoids (linear) Parabolas (quadratic)
Number of strips Any Even (must be divisible by 2)
Accuracy Lower (error ) Higher (error )
Formula
When to use Quick estimates, small intervals Higher precision needed
Example Error
00.190.370.560.75Trapezoidal (n=4)0.7468Simpson’s (n=4)0.611Exact Value0.6667Approximation Value
Comparison of errors for ∫₀¹ √x dx (Trapezoidal overestimates, Simpson’s underestimates with n=4)

3. Composite Rules

For better accuracy, use more strips:

  • Trapezoidal Rule (Composite):
  • Simpson’s Rule (Composite):

Worked Example: Use Simpson’s Rule with to approximate .

Solution:

  1. .
  2. Evaluate at :
  3. Apply Simpson’s Rule: Actual value = . Still an error, but closer than Trapezoidal!

4. Choosing the Right Method

Scenario Recommended Method Why?
Quick estimate, rough answer Trapezoidal Rule Simple, works for any .
High precision needed Simpson’s 1/3 Rule Faster convergence ( error).
Function has sharp peaks Trapezoidal (small ) Simpson’s assumes smooth curves.
Large interval Composite rules Reduce for better accuracy.

5. Real-World Applications

Numerical integration is used in:

  1. Engineering: Calculating work done by a variable force.
  2. Physics: Finding center of mass or probability distributions.
  3. Economics: Computing total revenue from a demand curve.
  4. Computer Graphics: Rendering smooth curves.
0.20.40.60.811.21.41.61.82246810xyF(x) = 5x (Spring Force)x-axisF(0)F(2)
Work done by a spring with force F(x) = 5x from x=0 to x=2 meters

Example in Physics: Find the work done by a spring with force from to meters.

Solution: But if is complex (e.g., ), use Simpson’s Rule with for an approximation.


Exam Tip: How to Score Full Marks

  1. Show all steps:

    • Write the formula clearly.
    • List all values and calculations.
    • Box your final answer.
  2. Label diagrams:

    • Draw the curve and strips (trapezoids/parabolas).
    • Label points.
  3. Error analysis (if asked):

    • State the error formula (e.g., ).
    • Calculate if possible.
  4. Common mistakes to avoid:

    • Forgetting to multiply by or .
    • Misapplying the pattern (e.g., vs. in Simpson’s).
    • Using odd for Simpson’s Rule.
  5. NEB-style questions to practice:

    • "Approximate using Trapezoidal Rule with ."
    • "Use Simpson’s 1/3 Rule to estimate with ."
    • "Compare the errors in Trapezoidal and Simpson’s Rules for with ."

NEB Board-Style Questions

  1. Short Answer:

    • Approximate using the Trapezoidal Rule with .
    • Answer: .
  2. Long Answer:

    • Use Simpson’s 1/3 Rule with to estimate . Find the percentage error if the exact value is .
    • Answer:
  3. Theoretical:

    • Derive the error formula for the Trapezoidal Rule. Why is Simpson’s Rule more accurate?
    • Answer: The Trapezoidal Rule approximates linearly, leading to error. Simpson’s Rule uses quadratics, reducing error to because it fits more points.

Final Note: Numerical integration is about approximation, not exactness. Always check:

  • Is large enough?
  • Does the method match the function’s smoothness?
  • Are the calculations precise?

Practice with both rules and compare results!

Based on the NEB +2 Science syllabus for Mathematics (Maths), unit 18.

Discussion

Loading…