Sei sulla pagina 1di 17

4.

5 Numerical Integration*
! Error bounds for certain Left, Right, Trapezoid, and Midpoint Sums
! Simpsons Rule for approximating areas under curves
! Using error bounds to calculate definite integrals to within specified degrees of accuracy

Approximations and Error


Approximating is easy; the tough part is knowing when your approximation is good. For
example, suppose we want to get a rough estimate of the number of seconds in a day. The actual answer is of course that there are (60 seconds)(60 minutes)(24 hours) = 86, 400 seconds
in each day, but if you wanted to calculate quickly in your head you might instead consider
the simpler product (60)(60)(20) = 72, 000. This approximation is good for knowing roughly
what order of magnitude we are talking about, but not good enough for most practical applications. In this case we can see that our simple approximation is off by an error of 4, 400
seconds. But how do we know how good or bad an approximation is without knowing the
exact value we are approximating?
The error of an approximation is the difference between the approximated value and the
actual value of what is being calculated. When we are interested only in the magnitude of
such error and not in whether our approximation is more or less than the actual value, we
consider the absolute value of error:
| error | = | true value approximation |.
When we use a Riemann sum we are approximating an exact area under a curve. The
resulting error will typically be large if we use only a few rectangles, but become smaller
when we use a large number of rectangles. In general, the error E(n) for using a given nrectangle Riemann sum is the difference between the actual area and the approximated area:
!"
!
n
! b
!
#
!
!
|E(n)| = !
f (x) dx
f (xk ) x! .
! a
!
k=1

$b
But how can we possibly find this error without knowing the exact value of a f (x) dx in the
first place? It turns out that in specific situations we can get bounds on this error even without
knowing the value of the definite integral. This means that in those situations we will be able
to approximate definite integrals to whatever degree of accuracy we choose.

Error in Left and Right Sums


Since we will be calculating and comparing many types of Riemann sums in this section, it
will be useful to have some descriptive notation for such sums. Suppose we wish to examine
the area between the graph of a function f and the x-axis on [a, b]. We will denote the Left
Sum and Right Sum n-rectangle approximations for this area as:
LEFT(n) =

n
#

f (xk1 )x = (f (x0 ) + f (x1 ) + f (x2 ) + . . . + f (xn1 )) x,

k=1

RIGHT(n) =

n
#

f (xk )x = (f (x1 ) + f (x2 ) + f (x3 ) + . . . + f (xn )) x.

k=1

Sometimes these sums are over-approximations of the actual area, and sometimes they
are under-approximations, depending on the behavior of the function f . If f happens to be

4.5 Numerical Integration*

368

monotonic on [a, b], in other words either always increasing on [a, b] or always decreasing on
[a, b], we can say more. For example, consider the monotonically decreasing function f below.
For this function, the 4-rectangle Left Sum is an over-approximation and the 4-rectangle Right
Sum is an under-approximation.
Area under f on [a, b]

LEFT(4)

RIGHT(4)

f(a)

f(a)

f(a)

f(b)

f(b)

f(b)

This is true in general; for any number n of rectangles, the area under a monotonically
increasing or decreasing graph will be between the Left Sum and the Right Sum approximations:
Left and Right Sums of Monotonic Functions
Suppose f is integrable on [a, b] and let n be a positive integer.
(a) If f is increasing on [a, b] then LEFT(n)

$b

f (x) dx RIGHT(n).
$b
(b) If f is decreasing on [a, b] then RIGHT(n) a f (x) dx LEFT(n).
a

Proof. We will prove part (b) and leave the entirely similar proof of (a) to Exercise 56. Suppose we partition [a, b] into n rectangles over subintervals of the form [xk1 , xk ]. If f is monotonically decreasing then for each k we know that f (xk1 ) f (x) f (xk ) for all x [xk1 , xk ],
and thus the area under f on [xk1 , xk ] will be less than the area of the kth Left Sum rectangle
and greater than the area of the kth Right Sum rectangle.
The fact that the actual area under a monotonic function is always sandwiched between
the Left Sum and the Right Sum can actually tell us something about the amount of error in
those Riemann sum approximations. The shaded rectangles in the figures below represent
the combined error from the Left Sum and the Right Sum. These errors join up to form a rectangle that can be stacked into a larger rectangle whose area |f (b) f (a)|x is the difference
|LEFT(n) RIGHT(n)|, regardless of the value of n:
Difference between LEFT(4) and RIGHT(4)

f(b) - f(a)

f(b)

f(b)

f(a)

f(b) - f(a)

f(a)

Difference between LEFT(8) and RIGHT(8)

Theorem 4.16

Since the stack of rectangles represents the combined error from the Left and Right Sums,
we know that the error from either of these approximations must itself be less than |f (b)
f (a)|x. This argument holds for any monotonically decreasing function, and we can say
similar things when f is monotonically increasing. Therefore we have proved:

4.5 Numerical Integration*

Theorem 4.17

369

Error Bounds for Left and Right Sums


Suppose f is integrable and monotonic on [a, b], and n is a positive integer. We can bound
the error ELEFT(n) of the Left Sum as follows:
|ELEFT(n) | |LEFT(n) RIGHT(n)| = |f (b) f (a)| x.
The error |ERIGHT(n) | of the corresponding Right Sum has the same bound.
As we will see in Example 1, we can use these error bounds to ensure that our Left or Right
Sum approximations of area are to within any desired degree of accuracy.

Error in Trapezoid and Midpoint Sums


What about bounding error for other types of Riemann Sums? Recall from Section 4.2 the
Trapezoid and Midpoint Sums for n subdivisions, which can be expressed as:
TRAP(n) =

n
#
f (xk1 ) + f (xk )

k=1

MID(n) =

x = (f (x0 ) + 2f (x1 ) + 2f (x2 ) + . . . + f (xn )) ( x


2 ),

n
#
&
%
&
%
&
%
&
%
1
2
+f x1 +x
+ . . . + f xn12+xn ) x.
f xk12+xk x, = (f x0 +x
2
2

k=1

It turns out that we can guarantee that these sums are either over-approximations or
under-approximations depending on whether the function f is concave up or concave down.
For example, consider the concave up function f shown below right. It is immediately obvious that the Trapezoid Sum approximation must be greater than the actual area under the
curve, as shown in the middle figure.
Area under f on [a, b]

TRAP(4)

MID(4)

f(b)

f(b)

f(b)

f(a)

f(a)

f(a)

What is less obvious is that the Midpoint Sum of a concave up function, as shown in the
third picture above, will always be an under-approximation of the true area. For concave
down functions the situation is reversed, with the true area sandwiched between the smaller
Trapezoid Sum and the larger Midpoint Sum, as stated in the following theorem:
Theorem 4.18

Trapezoid and Midpoint Sums of Functions with Consistent Concavity


Suppose f is integrable on [a, b] and let n be a positive integer.
(a) If f is concave up on [a, b] then MID(n)

$b

f (x) dx TRAP(n).
$b
(b) If f is concave down on [a, b] then TRAP(n) a f (x) dx MID(n).
a

Proof. We will use geometric arguments to prove part (a), and leave the similar proof of
part (b) to Exercise 57. That the Trapezoid Sum is an over-approximation for concave up

4.5 Numerical Integration*

370

functions is clear from our earlier middle diagram above. Specifically, upwards concavity
guarantees that the secant line from (xk1 , f (xk1 )) to (xk , f (xk )) will always be completely
above the graph of f on [xk1 , xk ].
That the Midpoint Sum is an under-approximation for concave up functions becomes
clear if we reinterpret each midpoint rectangle as a trapezoid. Given a subinterval [xk1 , xk ],
consider the midpoint trapezoid on the interval to be the trapezoid whose top is formed by
the line tangent to the graph of f at the midpoint of the subinterval. From the figure it is clear
that the midpoint trapezoid will have the same area as the midpoint rectangle whose height
is given by the height of f (x) at the midpoint of the subinterval. Now look at the figure on
the right; since f is concave up, the midpoint tangent line on each subinterval will be below
the graph. Therefore the area of each midpoint trapezoid will be less than the area under the
curve on that subinterval.
Midpoint trapezoid

Reinterpretation of MID(4) with trapezoids


f(b)

f(a)

Because the true area of a consistently concave up or down function will always be between the Trapezoid Sum and the Midpoint Sum, we know that the error for either of those
sums is less than the difference in those sums. This is entirely analogous to what we saw in
Theorem 4.17. We can actually get an even better bound if we are able to restrict the behavior
of the second derivative:
Theorem 4.19

Error Bounds for Trapezoid and Midpoint Sums


Suppose f is integrable and either always concave up or always concave down on [a, b],
and let n be a positive integer. We can bound both ETRAP(n) and EMID(n) as follows:
(a) |ETRAP(n) | |TRAP(n) MID(n)|

(b) |EMID(n) | |TRAP(n) MID(n)|

If we suppose further that f ## is bounded on [a, b], that is, that there is some positive real
number M such that |f ## (x)| M for all x [a, b], we can say that:
(c) |ETRAP(n) |

M (b a)3
12n2

(d) |EMID(n) |

M (b a)3
24n2

The proof of the second part of this theorem can be found in many numerical analysis texts.
You will explore why these bounds are reasonable in Exercise 18. In Example 2 you will use
these bounds to calculate Trapezoid and Midpoint Sums to specified degrees of accuracy.

4.5 Numerical Integration*

371

Simpsons Rule
$b
So far all of our approximations of a definite integral a f (x) dx have utilized piecewiselinear approximations of f . In other words, after subdividing [a, b], we approximated each
piece of f with a line. For example, the Left Sum just represents the area under the graph of
a piecewise-linear step function that agrees with f on the left hand side of each subinterval.
The Trapezoid Sum uses a continuous piecewise-linear function whose pieces are secant lines
of the graph of f , connecting the heights of the function at the subdivision points.
One way to try to get a more accurate approximation of a definite integral is to use a
non-linear approximation instead. For example, we could approximate each piece of f with
a parabola instead of a line. The first graph below shows some function f on [a, b], and the
second graph shows how we could approximate the area under the graph of f with three
paraboloa-topped rectangles. We choose the parabola p(x) on each subinterval to be the
unique parabola that passes through the leftmost height, the midpoint height, and the rightmost height on that subinterval; see the third picture.
Rb
Approximation of a f (x) dx
with paraboloa-topped rectangles

y = f (x) on [a, b]

A closer look at
the first parabola
f(x)
p(x)

x0

x1

x2

x3

x4

x5

x6

x0

x1

x2

The example shown above was specifically chosen so that the parabolas would be easily
distinguishable from the original function. In other words, it does not show a very accurate
approximation! However, in general, approximation by parabolas can be extremely accurate;
imagine using 20 parabolas along the graph of f above, and consider how closely such an
approximation would hug the function.
So how do we calculate a particular parabola-based area approximation? One way would
be to actually find the equations of each little quadratic parabola piece, and then use definite
integral formulas for quadratics to calculate the area under each of these parabola pieces.
Doing this would in practice be quite time-consuming. The following theorem can help make
this process faster; it provides a specific formula for calculating the area under a quadratic
on an interval that uses only the values of the quadratic at the endpoints and the midpoint
of that interval. This nice theorem will allow us to bypass the step of actually finding the
equation of each parabola.
Theorem 4.20

The Definite Integral of a Quadratic in Terms of Endpoints and Midpoint


If p(x) is a quadratic function on [A, B], then
"

p(x) dx =

BA
6

(p(A) + 4p( A+B


2 ) + p(B)).

The proof of this convenient formula is just an application of known definite integral formulas
and a bunch of algebra, and is left to Exercise 60.
It turns out to be convenient to construct our parabolas on pairs of intervals. For example,
in the middle figure on the previous page we divided [a, b] into n = 6 subintervals and then

4.5 Numerical Integration*

372

constructed three parabolas to approximate the curve y = f (x). In Exercise 61) you will show
that this process leads to the following summation formula:
Theorem 4.21

Simpsons Rule
Suppose f is integrable on [a, b] and n is a positive even integer. Let x = ba
n and
xk = a + kx.
$b
We can approximate a f (x) dx with n2 parabola-topped rectangles by using the following sum, which is known as Simpsons Rule:
SIMP(n) = (f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + + 2f (xn2 ) + 4f (xn1 ) + f (xn )) ( x
3 ).
Intuitively, it makes sense that for most functions f , an approximation using pieces of
parabolas could be more accurate than an approximation of f with pieces of lines. The following theorem backs up this intuition with a bound on the error from Simpsons Rule that is
clearly better than the error bounds we found for Left, Right, Trapezoid, and Midpoint Sums:

Theorem 4.22

Error Bound for Simpsons Rule


Suppose f is an integrable function on [a, b] whose fourth derivative is bounded. This
means that there is some positive real number M such that |f [4] (x)| M for all x [a, b].
In this situation we can bound the error ESimp(n) error from Simpsons Rule as follows:
|ESIMP(n) |

M (b a)5
.
180n4

The proof of Theorem 4.22 can be found in many numerical analysis texts, and we will not
concern ourselves with it here.
Notice that all of the error bounds we have discussed have a requirement that either f , or
some derivative of f , is bounded. For the Left and Right Sums we required f to be monotonic,
which implies that f is bounded. This in turn puts some kind of limit on how much the height
function f can change on [a, b]. For the Trapezoid and Midpoint Sums we required f ## to be
bounded, which puts a limit on the curviness of f on [a, b]. Notice that curvier functions will
tend to have less accurate Trapezoid Rule approximations. For Simpsons Rule we required
a bound on the fourth derivative, which also puts some limits on how wild f can be on
[a, b], and therefore limits how much error can arise by using parabolas to approximate the
function on that interval.

Examples and Explorations


Example 1

Guaranteeing a level of accuracy from a Right Hand Sum


$ 1.5
2
Suppose we wish to approximate the definite integral 0 ex dx with an n-rectangle
Right Sum so that we can be sure that our estimate is within two decimal places of the
exact answer. How large will we have to make n?
Solution. When we say that an estimate is accurate to two decimal places, we mean that the
estimate and the true value have the same digits in at least the first two decimal places after
the decimal point. To account for rounding, if we want to be absolutely certain of accuracy to

4.5 Numerical Integration*

373

two decimal places, we will need the error to be less than 0.005.
2

It just so happens that the function f (x) = ex on the interval [0, 1.5] is exactly the function pictured in the first graph of this section. This function is monotonically decreasing on
2
[0, 1.5] because its derivative f # (x) = 2xex is always negative on this interval. Therefore
= 1.5
Theorem 4.17 applies. We have a = 0, b = 1.5, and x = 1.50
n
n , so the magnitude of the
error from using an n-rectangle Right Sum has the following bound:
2

|ERHS(n) | |f (b) f (a)|x = |e(1.5) e0 |( 1.5


n )

1.3419
n .

We want to find n such that |ERHS(n) | is less than 0.005. To do this we just have to find n such
that the error bound is less than 0.005, so we need to have:
1.3419
n

< 0.005 =

1.3419
0.005

< n = n > 268.38.

This means that n = 269 is the first positive integer for which the n-rectangle Right Sum will
be within 0.005 of the actual area under the curve.
In case youre interested, the exact value of the definite integral is approximately 0.856188,
and the Right Hand Sum approximation with 269 rectangles is approximately 0.853693; notice
that these values do indeed agree in the first two decimal places.

Example 2

Finding bounds for the error from Trapezoid and Midpoint Sums
Consider the area between the graph of f (x) = x2 2x + 2 and the x-axis on the interval
[0, 3]. Find Trapezoid and Midpoint Sum approximations for this area with n = 4, and
then use Theorem 4.19 to describe bounds on the error in both cases.
Solution. The function f (x) = x2 2x + 2 on [0, 3] just happens to be what we used as our
graphical example when discussing the Trapezoid and Midpoint Sums. We begin by dividing
the interval [0, 3] into n = 4 subintervals of width x = 34 , with subdivision points x0 = 0,
x1 = 34 , x2 = 23 , x3 = 94 , and x4 = 3. Using the equation f (x) = x2 2x + 2, the n = 4 Trapezoid
Sum approximation is
TRAP(4) = (f (0) + 2f ( 43 ) + 2f ( 32 ) + 2f ( 49 ) + f (3))(

( 34 )
)=
2

201
32

6.28125.

To find MID(4), we must first find the midpoints of the 4 subintervals; these midpoints are
21

x1 = 38 , x2 = 89 , x3 = 15
8 , and x4 = 8 . Therefore the n = 4 Midpoint Sum approximation is
21 3
MID(4) = (f ( 83 ) + f ( 98 ) + f ( 15
8 ) + f ( 8 )( 4 ) =

375
64

5.85938.

Now to figure out the accuracy of these approximations. Theorem 4.18 applies because
f # (x) = 2x 2 is positive on all of [0, 3] and thus f is concave up on that entire interval.
Therefore the actual area under f on [0, 3] is greater than MID(4) = 375
64 5.85938 and smaller
than TRAP(4) = 201

6.28125.
In
particular,
by
the
first
part
of
Theorem
4.19 this means that
32
|ETRAP(4) | and |EMID(4) | | 201
32

375
64 |

27
64

0.421875.

This means that we can expect both the n = 4 Trapezoid Sum and the n = 4 Midpoint Sum to
be within about 0.421875 of the exact area under f on [0, 3].
The second part of Theorem 4.19 has the potential to give us a much better error bound
in the sense that we should be confident in our n = 4 approximations to an even greater
degree of accuracy than what is suggested above. Lets see if this is the case in this example.
We first have to get a bound M on the second derivative that is as good as possible. The

4.5 Numerical Integration*

374

second derivative of f (x) = x2 2x + 2 is f ## (x) = 2, and thus clearly |f ## (x)| 2 for all values
x [0, 3], so can take M = 2. Note that we are lucky to have an extremely good bound for f ##
in this example, since we know it is constantly 2. We can now say that
|ETRAP(4) |
and
|EMID(4) |

M (b a)3
2(3 0)3
9
=
=
0.28125
12n2
12(42 )
32

M (b a)3
2(3 0)3
9
=
=
0.140625.
2
24n
24(42 )
64

Therefore from the n = 4 Trapezoid Sum approximation, we know that the actual value
$3
9
129
210
of 0 f (x) dx is within 32
of 201
32 , i.e., between 32 4.03125 and 32 6.5625. With the
n = 4 Midpoint Sum we can guarantee even better accuracy, namely that the actual value of
$3
9
366
384
f (x) dx is within 64
of 375
64 , i.e., between 64 5.71875 and 64 = 6.
0
Example 3

Arriving at the Simpsons Rule formula when n = 6


Show that the Simpsons Rule formula in Theorem 4.21 results from repeated application
of Theorem 4.20 in the case where n = 6, with n2 = 3 parabolas.
Solution. Suppose f is an integrable function on an interval [a, b]. In this case we have three
quadratic functions p1 (x), p2 (x) and p3 (x) approximating f (x) on the double subintervals
[x0 , x2 ], [x2 , x4 ], and [x4 , x6 ], and agreeing with f (x) at the endpoints and midpoints of these
subintervals. Note that the midpoints of the parabola pieces are the odd subdivision points
x1 , x3 , and x5 . We can approximate the area under f on [a, b] by adding up the areas under
these three parabola pieces p1 (x), p2 (x), and p3 (x):
" x6
" b
" x4
" x2
p2 (x) dx +
p3 (x) dx.
f (x) dx
p1 (x) dx +
a

x0

x2

x4

By applying Theorem 4.20 to the first double subinterval [x0 , x2 ] we see that
" x2
0
p1 (x) dx = x2 x
(p1 (x0 ) + 4p1 (x1 ) + p1 (x2 )).
6
x0

Similarly, on the second and third double subintervals [x2 , x4 ] and [x4 , x6 ] we have
" x4
2
p1 (x) dx = x4 x
(p1 (x2 ) + 4p1 (x3 ) + p1 (x4 )),
6
x2
" x6
4
p1 (x) dx = x6 x
(p1 (x4 ) + 4p1 (x5 ) + p1 (x6 )).
6
x4

By construction, the values of p1 (x) at x0 , x1 , and x2 are the same as the corresponding values
of f (x). Similarly, the values of p2 (x) and p3 (x) agree with the values of f (x) at the corresponding endpoints and midpoints. Moreover, the width of each double subinterval is 2x,
$b
2
4
0
and thus x2 x
, x4 x
, and x6 x
are all equal to x
6
6
6
3 . Therefore a f (x) dx is approximated
with Simpsons Rule by the sum
x
x
(f (x0 ) + 4f (x1 ) + f (x2 )) x
3 + (f (x2 ) + 4f (x3 ) + f (x4 )) 3 + (f (x4 ) + 4f (x5 ) + f (x6 )) 3 .

After a little algebra it follows that Simpsons Rule indeed says what is predicted by Theorem 4.21:
" b
f (x) dx (f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + 2f (x4 ) + 4f (x5 ) + f (x6 )) x
3 .
a

4.5 Numerical Integration*

375

Note that if we knew the the function f and the interval [a, b] then we could easily calculate
the sum above.

Questions. Test your understanding of the reading by answering these questions:


! What does it mean for a function to be monotonic on an interval?
! Why do we require that f be monotonic on all of [a, b] in Theorem 4.16?
! Why do we require that f be either always concave up or always concave down on [a, b]
in Theorem 4.18?
! A Trapezoid Sum with n trapezoids can be written in the form (f (x0 ) + 2f (x1 ) + 2f (x2 ) +
. . . + f (xn )) ( x
2 ). Why are f (x0 ) and f (xn ) not multiplied by 2 in this expression?
! Simpsons Rule approximates the area under a curve by approximating a function with
pieces of parabolas. How do we define the parabolas that are used on each subinterval?

Exercises 4.5
Thinking Back
Monotonicity and concavity: For each function f and interval [a, b], use derivatives to determine whether or not f is
monotonic on [a, b] and whether or not f has consistent
concavity on [a, b].
! f (x) = x3 2x2 , [a, b] = [1, 3]
! f (x) = x3 2x2 , [a, b] = [0, 1]
! f (x) = sin( 2 x), [a, b] = [1, 1]
Bounding the second derivative:
f (x) = x2 (x 3).

Consider the function

! To the nearest tenths place, find the smallest number


M so that |f !! (x)| M for all x [0, 2].

! To the nearest tenths place, find the smallest number


M so that |f !! (x)| M for all x [0, 4].
Determining quadratics: For each problem below, find the
equation of the unique quadratic function p(x) with the
given properties.
! The graph of p(x) is a parabola that agrees with
f (x) = x3 + 1 at f (1), f (0), and f (1).
! The graph of p(x) is a parbola that agrees with the
function f (x) = x1 at x = 1, x = 2, and x = 3.
! The graph of p(x) is a parabola that agrees with the
function f (x) = sin x at x = 0, x = 2 , and x = .

Concepts
0. Problem Zero: Read the section and make your own
summary of the material.
1. True/False: Determine whether each of the following
statements is true or false. If a statement is true, explain why. If a statement is false, provide a counterexample.
(a)

True or False: If we knew the exact value of the


error from a given Riemann Sum calculation,
then we would know the exact value of the actual area under the curve.
(b) True or False: We can sometimes get a bound
on the error from a given Riemann Sum calculation even without knowing the exact value of
the actual area under the curve.
(c) True or False: A Left Sum with n = 10 rectangles will always have more error than the corresponding Left Sum with n = 100 rectangles.
(d) True or False: A Right Sum with n = 10 rectangles for a monotonically decreasing function
will always have more error than the corresponding Right Sum with n = 100 rectangles.
(e) True or False: If f is monotonically increasing on [a, b], then the error from using the Left
Sum with n rectangles will always be less than
the difference between the Right and Left Sums
with n rectangles.
(f) True or False: If f is concave down on [a, b] then
every Trapezoid Sum on that interval will be an
under-approximation.
(g) True or False: If f is concave down on [a, b] then
every Midpoint Sum on that interval will be an
over-approximation.
(h) True or False: Simpsons Rule with n = 10 subdivisions (and thus 5 parabola-topped rectangles) will always be more accurate than the
Trapezoid Sum with n = 10 trapezoids.

2. Examples: Give examples of each of the following. Try


to find examples that are different than any in the
reading.
A function f on an interval [a, b] for which
the Left Hand Sum and the Trapezoid Sum are
over-approximations for every n.
(b) A function f on an interval [a, b] for which the
Right Hand Sum and the Trapezoid Sum are
over-approximations for every n.

(a)

(c)

A function f on an interval [a, b] for which


Simpsons Rule has no error at all.

3. Suppose f is monotonicically increasing on [a, b]. Use


pictures to explain why the error from using the Left
Rb
Sum with n rectangles to approximate a f (x) dx will
always be less than or equal to the difference between
the Right Sum with n rectangles and the Left Sum
with n rectangles.
4. Suppose f is concave down on [a, b]. Use pictures to
explain why the error from using the Trapezoid Sum
Rb
with n trapezoids to approximate a f (x) dx will always be less than or equal to the difference between
the Trapezoid Sum with n trapezoids and the Midpoint Sum with n rectangles.
5. Sketch an example that shows that the inequality
Rb
LEFT(n) a f (x) dx RIGHT(n) is not necessarily true if f is not monotonically increasing on [a, b].
6. Sketch an example that shows that the inequality
Rb
MID(n) a f (x) dx TRAP(n) is not necessarily
true if f is not concave up on all of [a, b].

7. Sketch an example that shows that the Left Sum error


bound |ELEFT(n) | |f (b) f (a)| x does not necessarily hold for functions f that fail to be monotonic
on [a, b].

4.5 Numerical Integration*

377

8. If f is monotonically increasing on [a, b], which of the


following approximations is guaranteed to be an overRb
approximation for a f (x) dx? (Select all that apply.)
(b) Right Sum
(a) Left Sum
(c)

Trapezoid Sum

Trapezoid Sum

n=4

n=8

n = 16

Right Sum

0.634524

0.662872

0.677766

Left Sum
Trapezoid Sum

0.759524
0.697024

0.725372
0.694122

0.709016
0.693391

Midpoint Sum

0.693147

0.693147

0.693147

Method

(d) Midpoint Sum

9. If f is concave down on all of on [a, b], which of the


following approximations is guaranteed to be an overRb
approximation for a f (x) dx? (Select all that apply.)
(b) Right Sum
(a) Left Sum
(c)

16. The table below describes twelve different approxiR2


mations of the value of 1 x1 dx.

(d) Midpoint Sum

10. The error bounds for Right and Left Sums in Theorem 4.17 only apply to monotonic functions. Suppose f is a positive integrable function that is increasing on [a, c] and decreasing on [c, b], with a < c < b.
Rb
How could you make an estimate of a f (x) dx using
a Right or Left Sum and still get an error bound of the
error? Draw a picture to help illustrate your answer.
11. The error bounds for Trapezoid and Midpoint Sums
in Theorem 4.19 only apply to functions with consistent concavity. Suppose f is a positive integrable
function that is concave down on [a, c] and concave
up on [c, b], with a < c < b. How could you make an
Rb
estimate of a f (x) dx using a Trapezoid or Midpoint
Sum and still get an error bound of the error? Draw
a picture to help illustrate your answer.
12. Explain what we mean when we say that the Right
Hand, Left Hand, Trapezoid, and Midpoint Sum apRb
proximations for a f (x) dx involve piecewise-linear
approximations of the function f .

R2
The exact value of 1 x1 dx is ln 2 0.69314718.
Create a table showing the errors corresponding
to each of the twelve approximations. What do
you notice as n increases in each row?
(b) What do you notice about the sign of the errors
of the Right and Left Sums? What about the
signs of the errors of the Trapezoid and Midpoint Sums?
(c) How do the errors of the Right and Left Sums
compare with the errors of the Trapezoid and
Midpoint Sums for each n? How do the errors
from the Trapezoid Sums compare to the errors
from the Midpoint Sums?

(a)

17. The table below describes four different approximaR5


tions of the value of 2 f (x) dx for some differentiable function f . Use
R 5 the result from Exercise 59 to
find an estimate of 2 f (x) dx that you are would expect to be more accurate than any of the estimates in
the table, and explain your answer.
Method

13. What is a midpoint trapezoid, and what does it


have to do with the Midpoint Sum? How do midpoint trapezoids help us determine whether the Midpoint Sum will be an overapproximation or underapproximation?

14. Theorem 4.19 allows us to estimate MID(n) with


twice the accuracy (i.e., half of the error) of TRAP(n).
Is this what you would have expected from looking
at graphical examples? Why do you think the Midpoint Sum is so accurate? (Hint: Think about the midpoint trapezoids and how they are defined.)
15. Suppose f is a function with f !! (x) < 0, f ! (x) < 0 and
f (x) > 0 for all x [a, b].
(a)

Put the Right Hand Sum, Left Hand Sum,


Trapezoid Sum, and Midpoint Sum approximaRb
tions of a f (x) dx in order from smallest to
largest. (This does not depend on the number n
of rectangles.) Explain your answer with a picture.
Rb
(b) The true value of a f (x) dx must lie between
two of the approximations that you listed in
part (a). Which two, and why?

n = 1000

Right Sum

1.09794591

Left Sum

1.09927925

Trapezoid Sum

1.09861258

Midpoint Sum

1.09861214

18. Suppose f is a positive, increasing, concave up function on an interval [a, b], and let c be the midpoint of
the interval. Let A be the point (a, 0), B be the point
(b, 0), C be the point (c, f (c)), D be the point (b, f (b)),
E be the point (a, f (a)), R be the point (b, f (c)), and
S be the point (a, f (c)).
(a)

Draw a picture illustrating the above. What


does the area of trapezoid ABDE represent?
(b) Draw a line through point C that is parallel to
the line connecting D and E. Let P be the point
on this line with x-coordinate b. Let Q be the
point on this line with x-coordinate a. What
does the area of the rectangle ABRS represent?
What can you say about the area of the rectangle
ABRS and the trapezoid ABP Q?
(c) Let A1 be the area between the line P Q and the
graph of f . Let A2 be the area between the line
DE and the graph of f . How do the areas compare in size? What do these areas represent?
How does this help motivate the statement of
Theorem 4.19?

4.5 Numerical Integration*


19. Use the definite integral formulas from Theorem 4.11
to verify that the formula in Theorem 4.20 is true in
the case where p(x) = 3x2 x + 4, and [A, B] = [1, 5].

378
22. In this problem we investigate two cases where
Simpsons Rule happens to approximate a definite integral exactly.
Explain why Simpsons Rule finds the exact
Rb
value of a f (x) dx if f is a quadratic function.
(Hint: Think about Theorem 4.20.)
(b) Explain why Simpsons Rule finds the exact
Rb
value of a f (x) dx if f is a cubic function. (Hint:
Think about the M in the error bound formula in
Theorem 4.22.)
(a)

20. Sketch the graph of some function f on [2, 5] for


which SIMP(6) (i.e., with n2 = 3 parabola-topped rectRb
angles) is an underapproximation for a f (x) dx.

21. Show that the summation expression for Simpsons


Rule in Theorem 4.21 follows from repeated applications of the formula for the definite integral of a
quadratic in Theorem 4.20, in the case where n = 4
(i.e., where there are n2 = 2 parabolas).

Skills
Calculate each definite integral approximation in Exercises 2340, and then find an error bound for your approximation.
Z 4
23.
(x2 + x) dx, Right Sum, n = 4
0

24.

25.

26.

27.

28.

29.

30.

31.

32.

33.

34.

35.

36.

37.

38.

ex dx, Left Sum with n = 6

1
3

ex dx, Left Sum, n = 10

1
3

dx, Trapezoid Sum, n = 6

39.

dx, Midpoint Sum, n = 6

40.

cos x dx, Simpsons Rule, n = 8

cos x dx, Simpsons Rule, n = 12

Approximate each definite integral in Exercises 4150 with


the indicated method and to the given degree of accuracy.
Z 1
41.
xex dx, Left Sum, within 0.5
1

42.

1
dx, Right Sum, within 1 decimal place
x

1
dx, Left Sum, within 1 decimal place
x

43.

ln x dx, Midpoint Sum, n = 12

44.

ln x dx, Trapezoid Sum, n = 12

45.

dx, Trapezoid Sum with n = 8

46.

dx, Right Sum, n = 8

47.

48.

cos(x2 ) dx, Midpoint Sum, n = 9

49.

x(x + 1)(x 2) dx, Simpsons Rule, n = 12

50.
51.

1
7

2p
3

1+

x3

1+

x3

cos(x2 ) dx, Left Sum, n = 9

4
2
4
2
2
1

x(x + 1)(x 2) dx, Simpsons Rule, n = 24


4

(x 4x + 4x ) dx, Simpsons Rule, n = 4

x2 dx, Midpoint Sum, within 0.1

1
2p

xex dx, Right Sum, within 0.5

1
7

(x4 4x3 + 4x2 ) dx, Simpsons Rule, n = 8

1
3

(x2 + x) dx, Right Sum, n = 8

x2 dx, Trapezoid Sum, within 0.1

0
2

x 3 , Trapezoid Sum, within 2 decimal places

1
2

x 3 , Midpoint Sum, within 2 decimal places

10ex dx, Simpsons Rule, within 0.01

10ex dx, Simpsons Rule, within 0.001

52.

sin x dx, Simpsons Rule, within 3 decimal places


0

sin x dx, Simpsons Rule, within 4 decimal places

4.5 Numerical Integration*

379

Applications
53. Moms casserole surprise is hot out of the oven. It
cools at a rate of T ! (t) = 15e0.5t degrees per minute.
The change in temperature T (t) over an interval is
equal to the area under the graph of T ! (t) over that
interval.
(a)

Estimate the change in temperature of the casserole during its first four minutes out of the oven,
using LEFT(4), RIGHT(4), MID(4), TRAP(4),
and SIMP(4).
(b) Give a bound on the errors involved in each approximation.
54. The table below shows the velocity in meters per second of a parachutist at various times. The distance
traveled by the parachutist over an interval of time
is equal to the area under the velocity curve on the
same interval.
t

v(t)

17

23

28

(a)

The parachutists acceleration is decreasing due


to air resistance. What does this say about v(t)?
(b) Find upper and lower bounds on the distance
the parachutist fell in this time interval so that
the bounds are within 4 meters of each other.
(Hint: You dont need to use the same approximation technique on the whole interval.)

55. The rate r of increase of the Gross Domestic Product


(GDP) in % per year for the United States from 1993
to 2001 is recorded in the table below. For example, in
1993 the GDP rose 2.7% from January 1 to December
31. You may assume there is no growth from December 31 to January 1 of the next year.
Year 1993 1994 1995 1996 1997 1998 1999 2000 2001
r

2.7

4.0

2.7

3.6

4.4

4.3

4.1

3.8

0.3

(a)

Use Simpsons Rule to estimate the total percentage change in GDP from January 1, 1993 to
December 31, 2001.
(b) If the GDP was 6, 880.0 billion dollars on January 1, 1993, what was the GDP on December
31, 2001? Use the best approximating tool available to you.
(c) Estimate a bound for the fourth derivative of r
over the time period from 1993 to 2001, and use
that information to determine an error bound
for your estimate of the total change in r.

Proofs
56. Prove part (a) of Theorem 4.16: If f is integrable
and monotonically increasing on [a, b], then for any
Rb
positive integer n we have LEFT(n) a f (x) dx
RIGHT(n).

57. Use geometric arguments to support part (b) of Theorem 4.18: If f is integrable and concave down on
[a, b], and n is any positive integer, then TRAP(n)
Rb
f (x) dx MID(n).
a

58. Prove that the Trapezoid Sum is equivalent to the average of the Left and Right Sums:
TRAP(n) =

LEFT(n) + RIGHT(n)
.
2

59. Prove that Simpsons Rule is equivalent to the following weighted average of the Trapezoid and Midpoint
Sums:
SIMP(2n) = 31 TRAP(n) + 23 MID(n).

60. Follow the steps below to prove Theorem 4.20: if p(x)


is a quadratic function on [A, B], then
Z

p(x) dx =

BA
A+B
(p(A) + 4p(
) + p(B)).
6
2

(a)

First, calculate the integral of an arbitrary


quadratic p(x) = a0 + a1 x + a2 x2 over the interval [A, B] using the definite integral formulas from Theorem 4.11 of Section 4.3. (See also
Problem 64 in Section 4.4.)
(b) Now use the fact that the parabola p(x) passes
through the points (A, p(A)), ( A+B
, p( A+B
)),
2
2
and (B, p(B)) to show that what you found in
part (a) is equivalent to the desired formula.

61. Prove that by repeated application of the formula for


the definite integral of a quadratic in Theorem 4.20,
we can arrive at the Simpsons Rule approximation
given in Theorem 4.21. (Hint: Apply Theorem 4.20 to
the subintervals [xk , xk+2 ] where k is even.)

4.5 Numerical Integration*

380

Thinking Forward
Finding exact error: In the next chapter we will see that definite integrals can be computed by taking differences of
antiderivatives; in particular the Fundamental Theorem of
Calculus will reveal that if f is continuous on [a, b] then
Rb
f (x) dx = F (b) F (a), where F is any antiderivative
a
of f . Armed with this fact, we can check the exact error
of Riemann sum approximations for integrals of functions
that we can antidifferentiate.
! Use the antiderivative
fact above to find the exact
R4
value of 1 x1 dx. (Hint: What is an antiderivative of
1
? In other words, what is a function F whose derivative
x
is f (x) = x1 ?)

! What value of n would be sufficient to guarantee that


R4
a Right Sum approximation of 1 x1 dx is accurate to
within 0.25, according to Theorem 4.17?

! What is the actual error that results from a Right Sum


R4
approximation with n = 4 for 1 x1 dx?
! By trial and error with smaller values of n, find the
smallest value of n for which a Right Sum will apR4
proximate 1 x1 dx to within 0.25.

! Repeat the three problems above for the Midpoint


Sum in place of the Right Sum.

Appendix A
Answers To Odd Problems

6
4
2
1

2
4
6

17. approximately 3
19. Draw any graph where the average height
of the graph on [2, 5] is 10, and the slope
from (2, f (2)) to (5, f (5)) on your graph
is 3.
21. See the reading.
23. f is continuous on [1, 5], so the Mean
Value Theorem for Integrals applies and
says that there is some c (1, 5) for which
f (c) = c(c 6) is equal to the average value
R5
1
x(x 6) dx of the function f . You
51 1
can compute this average value; it is equal
to 23
. Therefore, there is some c (1, 5)
3
such that f (c) = 23
. We can solve the
3
to find such a value
equation f (c) = 23
3
of c. Actually there are two such values:
c 1.8453 and c 4.1547.
25. Using a Left Sum with n = 10, we have
43.333.
27. Using a Left Sum with n = 8, we have (a)
11.1973; (b) 12.2229.
29. (a) 52 ; (b) 13
2
31. (a) 43 ; (b) 109
12
33. (a) 25
;
(b)
25.2
2
35. Using a Left Sum with n = 8, we have 22.
37. 13
2
39. 38
6
41. 15
43. (f (1) + f (0.75) + f (0.5) + f (0.25) +
f (0) + f (0.25) + f (0.5) + f (0.75))( 18 )
0.990978
45. One possible approximation is (f ( 4 ) +
f ( 2 ) + + f (2))( 4 ) = 0
47. 7
49. 4
51. 1
53. c = 1
55. c = 13 ln(ln 2)

2 4
57. c = 2

59. (a) There is some time c (0, 4) when


(0)
f ! (c) = f (4)f
= 1.44; therefore there is
40
some time c in the first four days when the
rate of growth of the plant is 1.44 centimeters per day. (b) There is some time c during
the first four days when the height of the
plant is equal to the average height of the
plant over those four days. Since this average height is 1.92 feet, we know that there
is some c (0, 4) such that f (c) = 1.92. We
can solve for c = 2.3094.
R 18
R 5.29
(55 f (x)) dx + 5.29 (r(x)
61. (a)
1.51
R 30.71
f (x)) dx + 18 (s(x) g(x)) dx +
R 34.49
(55 g(x)) dx; (b) 561.9 square
30.71
feet (too big!)
63. Write out the Riemann sum for each side;
the absolute values on the right hand side
factor out of both the sum and the limit.
65. See the reading concerning the development of average value in the plant height
example.
Section 4.5
1. T, T, F, T, T, T, T, F.
3. Use pictures similar to the three above Theorem 4.16, but with an increasing function.
5. One example is f (x) = x2 + 2x + 3 on
[0, 3], with n = 3 Left and Right Sums.
7. The same example from Problem 5 works
here as well.
9. Midpoint Sum
11. Do the approximation separately on [a, c]
and on [c, b] and calculate bounds for the error on each piece using Theorem 4.19. The
total error will be less than or equal to the
sum of the absolute values of the two errors
you calculated.
13. See the discussion in the reading above Theorem 4.19.
15. (a) LEFT(n) < MID(n) < TRAP(n) <
RIGHT n; (b) between MID(n) and
TRAP(n).
17. Using the weighted average from Exericse 59, the n = 1000 Simpsons Rule approximation is 1.09861229, which we would
expect to be an even better approximation.
R5
19. By the old formula we have 1 (3x2 x +
R5
R5
R5 2
4) dx = 3 1 x dx 1 x dx + 1 4 dx =
3( 31 )(53 13 ) ( 21 )(52 12 ) + 4(5 1) =
128 and by the new formula we also have
R5
(3x2 x + 4) dx = 51
((3(1)2 1 + 4) +
6
1
2
2
4(3(3) 3 + 4) + (3(5 ) 5 + 4)) = 128.
21. Mimic Example 3 but with n = 4 instead of
n = 6.

23. RIGHT(4) = 29.3333. Since f ! (x) = 2x + 1


is positive on [0, 4] we know that f (x) =
x2 + x is monotonically increasing on
[0, 4]. Therefore we can guarantee that
|ERIGHT(4) | |f (4) f (0)|( 40
) = 20.
4

25. LEFT(6) = 0.318092. Since f ! (x) = ex


is negative on [1, 3] we know that
f (x) = ex is monotonically decreasing on [1, 3]. Therefore we can guarantee
that |ELEFT(6) | |f (3) f (1)|( 31
) =
6
|e3 e1 |( 31 ) = 0.106031.
27. TRAP(6) = 0.321033. Since f !! (x) = ex is
positive on [1, 3] we know that f (x) = ex
is concave up on [1, 3]. Moreover, |f !! (x)| =
|ex | e1 for all x [1, 3]. Therefore we
1
(31)3
can guarantee that |ETRAP(6) | e 12(6)
=
2
0.00681258.
29. MID(12) = 7.63016. Since f !! (x) = x12
is negative on [1, 7] we know that f (x) =
ln x is concave down on [1, 7]. Moreover
|f !! (x)| = | x12 | 112 = 1 for all x [1, 7].
Therefore |EMID(12) |

1(71)3
24(12)2

= 0.0625.

31. TRAP(8) = 3.25174; using the fact that


|f !! (x)| 2 for all x [0, 2] (this is not the
best possible bound), we can guarantee that
|ETRAP(8) | 0.0208333.
33. LEFT(10) = .0996031; |ELEFT(10) | 0.28804.

35. SIMP(6) = 24. Since f [4] = 0 for all x


[2, 4] we can guarantee that ESIMP(6) 0,
i.e., that the estimate is in fact exact.
37. SIMP(4) = 3.60791. Since f ! [4] = 24 for all
x [2, 4] we can guarantee that ESIMP(4)
0.126563.
39. SIMP(4) = xxx. Since f ! [4] 1 for all x
[, ] we can guarantee that ESIMP(4)
0.212514.
41. Since f (x) = xex is monotonically increasing on [1, 1], Theorem 4.17 guarantees we
can have |ELEFT(n) | 0.5 if we choose n = 13
or higher. We have LEFT(13) = 0.509077.
43. Since f (x) = x1 is monotonically decreasing
on [2, 4], Theorem 4.17 guarantees we can
have |ELEFT(n) | 0.05 (accuracy to one decimal place) if we choose n = 10 or higher. We
have RIGHT(10) = 0.668771.
45. Since f (x) = x2 is concave up on [0, 3] with
f !! (x) = 2 for all x, Theorem 4.19 guarantees
we can have |EMID(n) | 0.1 if we choose
n = 5 or higher. We have MID(5) = 8.91.
2

47. Since f (x) = x 3 is concave down on


[1, 4] with |f !! (x)| 29 for all x [1, 4],
Theorem 4.19 guarantees we can have
|EMID(n) | 0.005 (accuracy to two decimal
places) if we choose n = 10 or higher. We
have TRAP(10) = 5.44578.

49. Since f (x) = 10ex dx has |f [4] (x)| 10 for


all x [0, 2], Theorem 4.22 guarantees we
can have |ESIMP(n) | 0.01 if we choose n = 4
or higher, meaning that we should use 2 or
more parabola-topped rectangles. We have
SIMP(4) = 8.64956.
51. Since f (x) = sin x has |f [4] (x)| 1 for
all x, Theorem 4.22 guarantees we can
have |ESIMP(n) | 0.0005 (accuracy to three
decimal places) if we choose n = 8 or
higher, meaning that we should use 4 or
more parabola-topped rectangles. We have
SIMP(8) = 2.00027.
53. (a) LEFT(4) = 32.96 degrees, RIGHT(4) =
19.99 degrees, MID(4) = 25.6717 degrees,
TRAP(4) = 26.48
degrees,
and SIMP(4) = 25.94 degrees.
(b)
|ELEFT(4) | < 12.97, |ERIGHT(4) | < 12.97,
|EMID(4) | < 0.625, |ETRAP(4) | < 1.25, and
|ESIMP(4) | < 0.208.
55. Hints:
For (a) you need to use
four parabolas,
over the intervals
[1993, 1995], [1995, 1997], [1997, 1999], and
[1999, 2001]. In part (b) note that the area
under the graph of r on an interval is the
change in the GDP over that interval. For
part (c) you can make a table of difference
quotients to estimate r ! , and then repeat
that process to estimate higher derivatives.
57. Mimic the proof of part (a) of the theorem
given in the reading.
59. Use the expanded sum expressions for the
Trapezoid Sum with n subdivision points
called x0 , x2 , x4 , . . . x2n , the Midpoint Sum
with the same n subdivision points and thus
midpoints x1 , x3 , x5 , . . . x2n1 , and compare
to Simpsons Rule with all 2n subdivision
points x0 , x1 , x2 , . . . x2n .
61. Generalize the method shown for n = 6 in
Example 3 to arbitrary n.

Chapter 5
Section 5.1
1. T, F, F, T, F, F, F, F.
3. An antiderivative of f is just one function
whose derivative
is f , while the indefinite
R
integral f (x) dx is the family of all antiderivatives of f .
5. See Definitions 4.8 and 5.1. The definite integral is a number while the indefinite integral is a family of functions; the definite
integral concerns area while the indefinite
integral concerns antiderivatives; we calculate definite integrals using Riemann sums,
but we calculate indefinite integrals by antidifferentiating.

Potrebbero piacerti anche