# Thoughts on Numerical Integration (Part 22): Comparison to theorems about magnitudes of errors

Numerical integration is a standard topic in first-semester calculus. From time to time, I have received questions from students on various aspects of this topic, including:

• Why is numerical integration necessary in the first place?
• Where do these formulas come from (especially Simpson’s Rule)?
• How can I do all of these formulas quickly?
• Is there a reason why the Midpoint Rule is better than the Trapezoid Rule?
• Is there a reason why both the Midpoint Rule and the Trapezoid Rule converge quadratically?
• Is there a reason why Simpson’s Rule converges like the fourth power of the number of subintervals?

In this series, I hope to answer these questions. While these are standard questions in a introductory college course in numerical analysis, and full and rigorous proofs can be found on Wikipedia and Mathworld, I will approach these questions from the point of view of a bright student who is currently enrolled in calculus and hasn’t yet taken real analysis or numerical analysis.

In this series, we have shown the following approximations of errors when using various numerical approximations for $\int_a^b x^k \, dx$. We obtained these approximations using only techniques within the reach of a talented high school student who has mastered Precalculus — especially the Binomial Theorem — and elementary techniques of integration.

As we now present, the formulas that we derived are (of course) easily connected to known theorems for the convergence of these techniques. These proofs, however, require some fairly advanced techniques from calculus. So, while the formulas derived in this series of posts only apply to $f(x) = x^k$ (and, by an easy extension, any polynomial), the formulas that we do obtain easily foreshadow the actual formulas found on Wikipedia or Mathworld or calculus textbooks, thus (hopefully) taking some of the mystery out of these formulas.

Left and right endpoints: Our formula was

$E \approx \displaystyle \frac{k}{2} x_*^{k-1} (b-a)h$,

where $x_*$ is some number between $a$ and $b$. By comparison, the actual formula for the error is

$E = \displaystyle \frac{f'(x_*) (b-a)^2}{2n} = \frac{f'(x_*)}{2} (b-a)h$.

This reduces to the formula that we derived since $f'(x) = kx^{k-1}$.

Midpoint Rule: Our formula was

$E \approx \displaystyle \frac{k(k-1)}{24} x_*^{k-1} (b-a)h$,

where $x_*$ is some number between $a$ and $b$. By comparison, the actual formula for the error is

This reduces to the formula that we derived since $f''(x) = k(k-1)x^{k-2}$.

Trapezoid Rule: Our formula was

$E \approx \displaystyle \frac{k(k-1)}{12} x_*^{k-1} (b-a)h$,

where $x_*$ is some number between $a$ and $b$. By comparison, the actual formula for the error is

$E = \displaystyle \frac{f''(x_*) (b-a)^3}{12n^2} = \frac{f''(x_*)}{12} (b-a)h^2$.

This reduces to the formula that we derived since $f''(x) = k(k-1)x^{k-2}$.

This reduces to the formula that we derived since $f''(x) = k(k-1)x^{k-2}$.

Simpson’s Rule: Our formula was

$E \approx \displaystyle \frac{k(k-1)(k-2)(k-3)}{180} x_*^{k-4} (b-a)h^4$,

where $x_*$ is some number between $a$ and $b$. By comparison, the actual formula for the error is

$E = \displaystyle \frac{f^{(4)}(x_*)}{180} (b-a)h^4$.

This reduces to the formula that we derived since $f^{(4)}(x) = k(k-1)(k-2)(k-3)x^{k-4}$.

This site uses Akismet to reduce spam. Learn how your comment data is processed.