We shall now apply our approximation theorem to the computation of definite integrals. This time we shall use a polynomial of third degree to approximate the function we are to integrate. But first let us prove a result about integrals of polynomials:
Let be a polynomial of degree . Let be the midpoint of the interval (). Then
PROOF. Observe first of all that the assertion is linear in . i.e., if it is true for and for , then it is true for and for , where is a constant. Therefore it will be true for all polynomials of degree , if we can show it is true for , , , , , , or if we can show it for , , , , , . For
\begin{aligned} x^n &= ((x-m)+m)^n \\ &= (x-m)^n + n(x-m)^{n-1}m + \dots + n(x-m)m^{n-1} + m^n \end{aligned}is a polynomial of degree in for any ; thus any polynomial in of degree is also a polynomial of degree in .
First let , where is odd: . Then
\begin{aligned} \int_a^b (x-m)^i \, dx &= \left. \frac{1}{i+1} (x-m)^{i+1} \right|_a^b \\ &= \frac{1}{i+1} \left( (b-m)^{i+1} - (a-m)^{i+1} \right)\\ &= \frac{1}{i+1} \left( \left( \frac{b-a}{2} \right)^{i+1} - \left( \frac{a-b}{2} \right)^{i+1} \right) \cdot \end{aligned}But is even, so
and
On the right side, we have
If or , the fourth derivative of is . If , the fourth derivative is , and . Thus the right side reduces to
Since is odd,
and the right-hand side is . So in this case, both sides of the equation are , and we are done. It remains to treat and .
In the first two cases, for all , so we may omit the last term on the right. For ,
while
Thus the assertion is true for . For :
\begin{aligned} \int_a^b (x-m)^2 \, dx &= \left. \frac{1}{3} (x-m)^3 \right|_a^b \\ &= \frac{1}{3} \left( \left( \frac{b-a}{2} \right)^3 - \left( \frac{a-b}{2} \right)^3 \right)\\ &= \frac{1}{3} \left( \left( \frac{b-a}{2} \right)^3 + \left( \frac{b-a}{2} \right)^3 \right) \\ &= \frac{(b-a)^3}{12} \cdot \end{aligned}Meanwhile,
\begin{aligned} \frac{b-a}{6} (f(a) + 4f(m) + f(b)) &= \frac{b-a}{6} \left( (a-m)^2 + (b-m)^2 \right)\\ &= \frac{b-a}{6} \left( \left( \frac{a-b}{2} \right)^2 + \left( \frac{b-a}{2} \right)^2 \right) \\ &= \frac{(b-a)^3}{12} \\ &= \int_a^b f(x) \, dx \cdot \end{aligned}Finally, let . Then for all .
On the other hand,
\begin{aligned} \frac{b-a}{6} (f(a) &+ 4f(m) + f(b)) - \frac{(b-a)^5}{2880} f^{\rm (iv)}(m)\\ &= \frac{b-a}{6} \left( \left( \frac{a-b}{2} \right)^4 + \left( \frac{b-a}{2} \right)^4 \right) - \frac{(b-a)^5}{2880} \cdot 24\\ &= \frac{(b-a)^5}{48} - \frac{(b-a)^5}{120} \\ &= \frac{(b-a)^5}{80} \\ &= \int_a^b f(x) \, dx \cdot \end{aligned}Thus the assertion is true for all , , and therefore for all polynomials of degree .
Now suppose we are given a function having four derivatives, and suppose we have found a polynomial of degree such that: , , , P'(m) = f'(m). (We shall show later how can be constructed. Then has at and at a zero of multiplicity at least one, and at a zero of multiplicity at least . Therefore we take the of the approximation theorem to be , and . Then
But , since is of degree . Now whenever , and if Max. denotes the maximum of for , Min. its minimum, we have
\frac{H(x)}{24} \cdot \text{Max.} \le f(x) - P(x) \le \frac{H(x)}{24} \cdot \text{Min.} \tag{**}Since is a polynomial of degree , and since , we see by our theorem that
Taking the integrals in the inequality (**), we have
If we assume, as we already have in discussing its maximum and minimum, that is continuous for , then by the theorem we quoted in Chapter 12,
for some , . Now since , we know by our theorem that
\begin{aligned} \int_a^b P(x) \, dx &= \frac{b-a}{6} (P(a) + 4P(m) + P(b)) \\ &= \frac{b-a}{6} (f(a) + 4f(m) + f(b)). \end{aligned}Finally, we have Simpson's rule:
\int_{a}^{b} f(x) \, dx = \frac{b-a}{6} (f(a) + 4f(m) + f(b)) - \frac{(b-a)^5}{2880} f^{\rm (iv)}(\xi) \tag{*}for some , .
The way in which this rule is used is by using the first term on the right as an approximation to
The second term gives an estimate of the error introduced by making this approximation. The error is at most
whichever is larger.
Finally, we must show that a polynomial can always be found satisfying our requirements. Let , , . Then we can find a straight line through and (here and are simply numbers). Set
where is so chosen that . This is always possible because . We still have , . Now set
Then
P'(m) = g'(m) + D(m-a)(m-b).Since , we can choose the constant so that P'(m) = f'(m). Then , , and P'(m) = f'(m); moreover, is of degree . Therefore is our required polynomial. (Note that in applying Simpson's rule, one need not compute anything about .)
EXERCISES
- Computea) for ;
b) by using the fact that it isand using . Compare your estimates of error in each case.
- Use Simpson's rule to approximate, with error,
No direct means is known of finding indefinite integrals in Exercises 2 and 3; therefore approximate methods assume great importance in these cases. The integral in Exercise 2 is called the error integral, and in Exercise 3 is an elliptic integral.