SIMPSON’S RULE IS EXACT FOR CUBICS: A SIMPLE PROOF

Rohan J. Dalpatadu and Elizabeth E. Freeman

Abstract. Simpson’s Rule is an accurate numerically stable method of approximating a definite integral using a quadrature with three points, obtained by integrating the unique quadratic that passes through these points. The error term in the method is a function of the fourth derivative of the integrand. Therefore, it is easy to see that the method is exact for cubics, since the fourth derivative of a cubic is zero, and there is no error. The error analysis uses Taylor series. In our simple proof, we will use ordinary integration techniques.

1. Introduction. Simpson’s Rule is used to approximate the integral ∫_{a}^{b} f(x) dx, using the points (a, f(a)), (a+h, f(a+h)), and (a+2h, f(a+2h)). This method is obtained by evaluating the integral of the quadratic, passing through the three points, over the interval [a, b], where b = a + 2h.

\underline{Simpson’s Rule}. Let f: [a, b] → ℝ be continuous. Then its integral may be evaluated by the quadrature

∫_{a}^{b} f(x) dx ≈ \frac{h}{3}[f(a) + 4f(a + h) + f(b)],

where h = (b − a)/2. If f has a continuous fourth derivative on [a, b], then the error in this approximation is \frac{−h^{5}}{90} f^{(4)}(ξ(x)), for some point ξ(x) ∈ [a, b] [1].

The error term is a linear function of the fourth derivative of the function f that would vanish if it were a cubic. Therefore, the method is exact for cubics. The purpose of this paper is to show that Simpson’s Rule is exact for cubics by using elementary calculus with a simple translation of the axes and a fairly straightforward approach. This proof can be presented to students with a minimal knowledge of elementary calculus.

2. Simpson’s Rule is Exact for Cubics. To make the computations easier, we shall use a translation of the axes.

\underline{Lemma}. Let f: [a, b] → ℝ be continuous. Then the translated function g: [a, b] → ℝ defined by g(x) = f(x + a + h) − f(a + h), x ∈ [−h, h] is obtained by translating the axes, so that the origin is moved to (a + h, f(a + h)). Furthermore,

∫_{a}^{b} f(x) dx = ∫_{−h}^{h} g(t) dt + 2hf(a + h).

\underline{Proof}. It is easily seen that g is the translated function because the argument in f indicates a translation of the x–axis by a+h, and the term −f(a+h) indicates an upward shift of the y–axis by f(a + h). Furthermore,

∫_{a}^{b} f(x) dx = ∫_{a}^{a+2h} f(x) dx

= ∫_{a}^{a+2h}[g(x − a − h) + f(a + h)] dx

= ∫_{−h}^{h} g(t)dt + ∫_{a}^{a+2h} f(a + h) dx, (t = x − a − h)

= ∫_{−h}^{h} g(t)dt + 2hf(a + h).

\underline{Theorem}. Simpson’s Rule is exact for cubics; i.e., if f is a cubic polynomial defined on [a, b], then

∫_{a}^{b} f(x) dx = \frac{h}{3}[f(a) + 4f(a + h) + f(b)].

This is the exact value of the integral of f over the interval [a, b].

\underline{Proof}. Let f be a cubic polynomial whose graph passes through the points (a, f(a)), (a + h, f(a + h)), (a + 2h, f(a + 2h)), and (a + 3h, f(a + 3h)), and let g be the translated cubic obtained by shifting the x–axis by a + h, and the y–axis by f(a + h). Then

g(−h) = f(a) − f(a + h), g(0) = 0, and g(h) = f(b) − f(a + h).

Furthermore, since g is a cubic polynomial it can be written, using [1], as

\begin{aligned}g(t) & = \frac{(t − 0)(t − h)(t − 2h)}{(−h − 0)(−h − h)(−h − 2h)}g(−h) + \frac{(t + h)(t − h)(t − 2h)}{(0 + h)(0 − h)(0 − 2h)}0 \\ & + \frac{(t + h)(t − 0)(t − 2h)}{(h + h)(h − 0)(h − 2h)}g(h) + \frac{(t + h)(t − 0)(t − h)}{(2h + h)(2h − 0)(2h − h)}g(2h). \end{aligned}

This reduces to

g(t) = \frac{−t^{3} + 3ht^{2} − 2h^{2}t}{6h^{3}}g(−h) + \frac{−t^{3} + ht^{2} + 2h^{2}t}{2h^{3}}g(h) + \frac{t^{3} − h^{2}t}{6h^{3}}g(2h).

Since the interval of integration is [−h, h], the computations are a lot simpler:

∫_{−h}^{h} t dt = \frac{t^{2}}{2} |_{−h}^{h}= 0, ∫_{−h}^{h} t^{2} dt = \frac{t^{3}}{3} |_{−h}^{h}= \frac{2h^{3}}{3} , and ∫_{−h}^{h} t^{3} dt = \frac{t^{4}}{4} |_{−h}^{h}= 0.

Thus,

∫_{−h}^{h} g(t) dt = \frac{3h}{6h^{3}} \frac{2h^{3}}{3} g(−h) + \frac{h}{2h^{3}} \frac{2h^{3}}{3} g(h) + 0

= \frac{h}{3}[g(−h) + g(h)]

= \frac{h}{3}[f(a) − f(a + h) + f(b) − f(a + h)]

= \frac{h}{3}[f(a) − 2f(a + h) + f(b)].

Using the above lemma, we obtain

∫_{a}^{b} f(x) dx = ∫_{−h}^{h} g(t) dt + 2hf(a + h)

= \frac{h}{3}[f(a) − 2f(a + h) + f(b)] + 2hf(a + h)

= \frac{h}{3}[f(a) + 4f(a + h) + f(b)].

This is Simpson’s Rule and is the exact value of the integral of the cubic polynomial f over the interval [a, b].

3. Examples and Graphs. In this section, we provide two examples to verify the validity of our result and to illustrate the accuracy of the method. A graph of the unique quadratic and an arbitrary cubic is provided to explain the result graphically.

\underline{Examples}.

(1) Let f(x) = 2x^{3} − 4x^{2} + 3x − 1, x ∈ [−1, 3]. Then

∫_{−1}^{3} f(x) dx = ∫_{−1}^{3}[2x^{3} − 4x^{2} + 3x − 1] dx

= [\frac{x^{4}}{2} − \frac{4x^{3}}{3} + \frac{3x^{2}}{2} − x]_{−1}^{3}

= \frac{32}{3}.

In this example, a = −1, b = 3, and h = 2. Simpson’s Rule gives us

\begin{matrix}\frac{h}{3}[f(a) + 4f(a + h) + f(b)] \\ = \frac{2}{3}(−2 − 4 − 3 − 1) + 4(2 − 4 + 3 − 1) + (54 − 36 + 9 − 1) = \frac{32}{3}. \end{matrix}

This is the exact value of the integral.

(2) Let f(x) = sin x, x ∈ [0, \frac{π}{3} ].

∫0^{\frac{π}{3}} sin x dx = − cos x|0^{\frac{π}{3}} = 0.5.

In this example, a = 0, b = \frac{π}{3} , and h = \frac{π}{6} . Simpson’s Rule gives us:

\frac{h}{3}[f(a) + 4f(a + h) + f(b)] = \frac{\frac{π}{6}}{3} [sin 0 + 4 sin \frac{π}{6} + sin \frac{π}{3} ]

= \frac{(2 + \frac{\sqrt{3}}{2})π}{18} ≈ 0.500216.

The error in this approximation is 0.000216. The approximate value is fairly accurate.

\underline{Graphs}. The graph of the unique quadratic p_{2}(x) through the points (−1, 0), (0, 1), and (1, 0) along with the graph of the cubic p_{3}(x) through the above three points and the point (2, 2), appear in the following figure. It is quite evident from the graph that

∫_{−1}^{0} p_{3}(x) dx − ∫_{−1}^{0} p_{2}(x) dx and ∫_{0}^{1} p_{3}(x) dx − ∫_{0}^{1} p_{2}(x) dx

are equal in absolute value and have opposite signs. Therefore, the integral of the cubic polynomial is equal to the value from Simpson’s Rule, which is obtained by integrating the quadratic polynomial.

Figure 1

\underline{Reference}

1. R. L. Burden and J. D. Faires, Numerical Analysis, Brooks/Cole Publishing Company, New York, 1997.

Mathematics Subject Classification (2000): 65D30

Rohan J. Dalpatadu Department of Mathematical Sciences University of Nevada – Las Vegas Las Vegas, NV 89154-4020 email: dalpatad@unlv.nevada.edu

Elizabeth E. Freeman Department of Mathematical Sciences University of Nevada – Las Vegas Las Vegas, NV 89154-4020 email: lizfreeman unlv2003@hotmail.com