Error Analysis in Numerical Integration: Fresh Take

  • Calculate how far off your numerical approximation might be from the true value
  • Use error-bound formulas to estimate the accuracy of your approximation

Absolute and Relative Error

The Main Idea 

When using numerical integration methods, you need to assess the quality of your approximation. Absolute and relative error give you different but complementary perspectives on accuracy, helping you understand both the size and significance of your approximation error.

The Two Error Types:

Absolute Error = [latex]|A - B|[/latex] (where [latex]A[/latex] = true value, [latex]B[/latex] = approximation)

  • Tells you the actual difference between your estimate and the true value
  • Same units as your original measurement
  • Doesn’t account for the scale of the true value

Relative Error = [latex]\left|\frac{A - B}{A}\right| \times 100%[/latex]

  • Expresses error as a percentage of the true value
  • Shows how significant the error is in context
  • Better for comparing accuracy across different problems

When comparing numerical methods (midpoint rule vs. trapezoidal rule), relative error often provides better insight into which method performs better overall. A method might have higher absolute error but lower relative error, making it more reliable for practical purposes.

Relative error helps you answer the crucial question: “Is this approximation good enough for my purposes?” An absolute error of [latex]0.001[/latex] might be terrible for measuring microscopic distances but excellent for measuring building heights. Consider two scenarios:

  • Error of [latex]0.01[/latex] when true value is [latex]0.02[/latex] ([latex]50 \%[/latex] relative error – very bad!)
  • Error of [latex]0.01[/latex] when true value is [latex]100[/latex] ([latex]0.01 \%[/latex] relative error – excellent!)

The same absolute error can have vastly different meanings depending on context.

In an previous example, we estimated [latex]{\displaystyle\int }_{1}^{2}\frac{1}{x}dx[/latex] to be [latex]\frac{24}{35}[/latex] using [latex]{T}_{2}[/latex]. The actual value of this integral is [latex]\text{ln}2[/latex]. Using [latex]\frac{24}{35}\approx 0.6857[/latex] and [latex]\text{ln}2\approx 0.6931[/latex], calculate the absolute error and the relative error.

Error Bounds for the Midpoint and Trapezoidal Rules

The Main Idea 

Error bounds give you mathematical guarantees about the worst-case scenario for your numerical approximation. Instead of hoping your estimate is accurate, you can determine exactly how many subintervals you need to achieve a specific level of precision.

The error bound formulas:

Midpoint Rule: [latex]\text{Error in } M_n \leq \frac{M(b-a)^3}{24n^2}[/latex]

Trapezoidal Rule: [latex]\text{Error in } T_n \leq \frac{M(b-a)^3}{12n^2}[/latex]

Where [latex]M[/latex] = maximum value of [latex]|f''(x)|[/latex] on [latex][a,b][/latex]

Key insights from the formulas:

  • Midpoint rule is twice as accurate as trapezoidal rule (note the 24 vs 12 in denominators)
  • Error decreases as [latex]n^2[/latex]: doubling subintervals cuts error by factor of 4
  • Second derivative matters: functions with large [latex]|f''(x)|[/latex] need more subintervals
  • Interval length impacts error: longer intervals [latex](b-a)[/latex] increase error bounds

Problem-Solving Strategy:

  1. Find [latex]f''(x)[/latex] and determine its maximum absolute value [latex]M[/latex] on your interval
  2. Set up the inequality: [latex]\frac{M(b-a)^3}{24n^2} \leq \text{desired accuracy}[/latex] (for midpoint rule)
  3. Solve for [latex]n[/latex]: [latex]n \geq \sqrt{\frac{M(b-a)^3}{24 \times \text{desired accuracy}}}[/latex]
  4. Round up to the next integer: error bounds require [latex]n[/latex] to be at least your calculated value

These formulas give you upper bounds—your actual error might be much smaller, but it’s guaranteed to be no larger than the bound specifies.

Find an upper bound for the error in using [latex]{M}_{4}[/latex] to estimate [latex]{\displaystyle\int }_{0}^{1}{x}^{2}dx[/latex].