Calculus II
Preface
Here are my online notes for my Calculus II course that I teach here at Lamar University.
Despite the fact that these are my “class notes”, they should be accessible to anyone wanting to
learn Calculus II or needing a refresher in some of the topics from the class.
These notes do assume that the reader has a good working knowledge of Calculus I topics
including limits, derivatives and basic integration and integration by substitution.
Calculus II tends to be a very difficult course for many students. There are many reasons for this.
The first reason is that this course does require that you have a very good working knowledge of
Calculus I. The Calculus I portion of many of the problems tends to be skipped and left to the
student to verify or fill in the details. If you don’t have good Calculus I skills, and you are
constantly getting stuck on the Calculus I portion of the problem, you will find this course very
difficult to complete.
The second, and probably larger, reason many students have difficulty with Calculus II is that you
will be asked to truly think in this class. That is not meant to insult anyone; it is simply an
acknowledgment that you can’t just memorize a bunch of formulas and expect to pass the course
as you can do in many math classes. There are formulas in this class that you will need to know,
but they tend to be fairly general. You will need to understand them, how they work, and more
importantly whether they can be used or not. As an example, the first topic we will look at is
Integration by Parts. The integration by parts formula is very easy to remember. However, just
because you’ve got it memorized doesn’t mean that you can use it. You’ll need to be able to look
at an integral and realize that integration by parts can be used (which isn’t always obvious) and
then decide which portions of the integral correspond to the parts in the formula (again, not
always obvious).
Finally, many of the problems in this course will have multiple solution techniques and so you’ll
need to be able to identify all the possible techniques and then decide which will be the easiest
technique to use.
So, with all that out of the way let me also get a couple of warnings out of the way to my students
who may be here to get a copy of what happened on a day that you missed.
1. Because I wanted to make this a fairly complete set of notes for anyone wanting to learn
calculus I have included some material that I do not usually have time to cover in class
and because this changes from semester to semester it is not noted here. You will need to
find one of your fellow class mates to see if there is something in these notes that wasn’t
covered in class.
2. In general I try to work problems in class that are different from my notes. However,
with Calculus II many of the problems are difficult to make up on the spur of the moment
and so in this class my class work will follow these notes fairly close as far as worked
problems go. With that being said I will, on occasion, work problems off the top of my
head when I can to provide more examples than just those in my notes. Also, I often
© 2007 Paul Dawkins i http://tutorial.math.lamar.edu/terms.aspx
Calculus II
don’t have time in class to work all of the problems in the notes and so you will find that
some sections contain problems that weren’t worked in class due to time restrictions.
3. Sometimes questions in class will lead down paths that are not covered here. I try to
anticipate as many of the questions as possible in writing these up, but the reality is that I
can’t anticipate all the questions. Sometimes a very good question gets asked in class
that leads to insights that I’ve not included here. You should always talk to someone who
was in class on the day you missed and compare these notes to their notes and see what
the differences are.
4. This is somewhat related to the previous three items, but is important enough to merit its
own item. THESE NOTES ARE NOT A SUBSTITUTE FOR ATTENDING CLASS!!
Using these notes as a substitute for class is liable to get you in trouble. As already noted
not everything in these notes is covered in class and often material or insights not in these
notes is covered in class.
© 2007 Paul Dawkins ii http://tutorial.math.lamar.edu/terms.aspx
Calculus II
Approximating Definite Integrals
In this chapter we’ve spent quite a bit of time on computing the values of integrals. However, not
all integrals can be computed. A perfect example is the following definite integral.
2 2
ò 0
e x dx
We now need to talk a little bit about estimating values of definite integrals. We will look at
three different methods, although one should already be familiar to you from your Calculus I
days. We will develop all three methods for estimating
b
ò f ( x ) dx
a
by thinking of the integral as an area problem and using known shapes to estimate the area under
the curve.
Let’s get first develop the methods and then we’ll try to estimate the integral shown above.
Midpoint Rule
This is the rule that should be somewhat familiar to you. We will divide the interval [ a, b ] into n
subintervals of equal width,
b-a
Dx =
n
We will denote each of the intervals as follows,
[ x0 , x1 ] , [ x1 , x2 ] ,K , [ xn-1 , xn ] where x0 = a and xn = b
Then for each interval let xi* be the midpoint of the interval. We then sketch in rectangles for
( )
each subinterval with a height of f xi* . Here is a graph showing the set up using n = 6 .
We can easily find the area for each of these rectangles and so for a general n we get that,
ò f ( x ) dx » Dx f ( x ) + Dx f ( x ) + L + Dx f ( x )
b
* * *
1 2 n
a
Or, upon factoring out a Dx we get the general Midpoint Rule.
© 2007 Paul Dawkins 3 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
ò f ( x ) dx » Dx éë f ( x ) + f ( x ) + L + f ( x )ùû
b
* * *
1 2 n
a
Trapezoid Rule
For this rule we will do the same set up as for the Midpoint Rule. We will break up the interval
[ a, b] into n subintervals of width,
b-a
Dx =
n
Then on each subinterval we will approximate the function with a straight line that is equal to the
function values at either endpoint of the interval. Here is a sketch of this case for n = 6 .
Each of these objects is a trapezoid (hence the rule’s name…) and as we can see some of them do
a very good job of approximating the actual area under the curve and others don’t do such a good
job.
The area of the trapezoid in the interval [ xi -1 , xi ] is given by,
Dx
Ai =
2
( f ( xi -1 ) + f ( xi ) )
So, if we use n subintervals the integral is approximately,
Dx Dx Dx
ò f ( x ) dx » 2 ( f ( x ) + f ( x ) ) + 2 ( f ( x ) + f ( x ) ) + L + 2 ( f ( x ) + f ( x ) )
b
0 1 1 2 n -1 n
a
Upon doing a little simplification we arrive at the general Trapezoid Rule.
b Dx
ò f ( x ) dx » 2 éë f ( x ) + 2 f ( x ) + 2 f ( x ) + L + 2 f ( x ) + f ( x )ùû
a
0 1 2 n -1 n
Note that all the function evaluations, with the exception of the first and last, are multiplied by 2.
© 2007 Paul Dawkins 4 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
Simpson’s Rule
This is the final method we’re going to take a look at and in this case we will again divide up the
interval [ a, b ] into n subintervals. However unlike the previous two methods we need to require
that n be even. The reason for this will be evident in a bit. The width of each subinterval is,
b-a
Dx =
n
In the Trapezoid Rule we approximated the curve with a straight line. For Simpson’s Rule we are
going to approximate the function with a quadratic and we’re going to require that the quadratic
agree with three of the points from our subintervals. Below is a sketch of this using n = 6 . Each
of the approximations is colored differently so we can see how they actually work.
Notice that each approximation actually covers two of the subintervals. This is the reason for
requiring n to be even. Some of the approximations look more like a line than a quadratic, but
they really are quadratics. Also note that some of the approximations do a better job than others.
It can be shown that the area under the approximation on the intervals [ xi -1 , xi ] and [ xi , xi +1 ] is,
Dx
Ai =
3
( f ( xi -1 ) + 4 f ( xi ) + f ( xi +1 ) )
If we use n subintervals the integral is then approximately,
Dx Dx
ò f ( x ) dx » 3 ( f ( x ) + 4 f ( x ) + f ( x ) ) + 3 ( f ( x ) + 4 f ( x ) + f ( x ) )
b
a 0 1 2 2 3 4
Dx
+L +
3
( f ( xn-2 ) + 4 f ( xn-1 ) + f ( xn ) )
Upon simplifying we arrive at the general Simpson’s Rule.
b Dx
ò f ( x ) dx » 3 éë f ( x ) + 4 f ( x ) + 2 f ( x ) + L + 2 f ( x ) + 4 f ( x ) + f ( x )ùû
a
0 1 2 n-2 n -1 n
© 2007 Paul Dawkins 5 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
In this case notice that all the function evaluations at points with odd subscripts are multiplied by
4 and all the function evaluations at points with even subscripts (except for the first and last) are
multiplied by 2. If you can remember this, this is a fairly easy rule to remember.
Okay, it’s time to work an example and see how these rules work.
Example 1 Using n = 4 and all three rules to approximate the value of the following integral.
2 2
ò 0
e x dx
Solution
First, for reference purposes, Maple gives the following value for this integral.
2 2
ò 0
e x dx = 16.45262776
In each case the width of the subintervals will be,
2-0 1
Dx = =
4 2
and so the subintervals will be,
[ 0, 0.5] , [ 0.5, 1] , [1, 1.5] , [1.5, 2]
Let’s go through each of the methods.
Midpoint Rule
2 2
(
1 ( 0.25)2 ( 0.75)2
)
+ e(1.25) + e(1.75) = 14.48561253
2 2
ò 0
e x dx »
2
e +e
Remember that we evaluate at the midpoints of each of the subintervals here! The Midpoint Rule
has an error of 1.96701523.
Trapezoid Rule
2 2
(
1 2 ( 0 )2
)
e + 2e( 0.5) + 2e(1) + 2e(1.5) + e( 2 ) = 20.64455905
2 2 2 2
ò 0
e x dx »
2
The Trapezoid Rule has an error of 4.19193129
Simpson’s Rule
2 2
(
1 2 ( 0 )2
)
e + 4e( 0.5) + 2e(1) + 4e(1.5) + e( 2) = 17.35362645
2 2 2 2
ò 0
e x dx »
3
The Simpson’s Rule has an error of 0.90099869.
None of the estimations in the previous example are all that good. The best approximation in this
case is from the Simpson’s Rule and yet it still had an error of almost 1. To get a better
estimation we would need to use a larger n. So, for completeness sake here are the estimates for
some larger value of n.
© 2007 Paul Dawkins 6 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
Midpoint Trapezoid Simpson’s
n Approx. Error Approx. Error Approx. Error
8 15.9056767 0.5469511 17.5650858 1.1124580 16.5385947 0.0859669
16 16.3118539 0.1407739 16.7353812 0.2827535 16.4588131 0.0061853
32 16.4171709 0.0354568 16.5236176 0.0709898 16.4530297 0.0004019
64 16.4437469 0.0088809 16.4703942 0.0177665 16.4526531 0.0000254
128 16.4504065 0.0022212 16.4570706 0.0044428 16.4526294 0.0000016
In this case we were able to determine the error for each estimate because we could get our hands
on the exact value. Often this won’t be the case and so we’d next like to look at error bounds for
each estimate.
These bounds will give the largest possible error in the estimate, but it should also be pointed out
that the actual error may be significantly smaller than the bound. The bound is only there so we
can say that we know the actual error will be less than the bound.
So, suppose that f ¢¢ ( x ) £ K and f ( x ) £ M for a £ x £ b then if EM, ET, and ES are the
( 4)
actual errors for the Midpoint, Trapezoid and Simpson’s Rule we have the following bounds,
K (b - a ) K (b - a) M (b - a)
3 3 5
EM £ ET £ ES £
24n 2 12n 2 180n 4
Example 2 Determine the error bounds for the estimations in the last example.
Solution
We already know that n = 4 , a = 0 , and b = 2 so we just need to compute K (the largest value
of the second derivative) and M (the largest value of the fourth derivative). This means that we’ll
need the second and fourth derivative of f(x).
f ¢¢ ( x ) = 2e x (1 + 2 x 2 )
2
f ( 4) ( x ) = 4e x ( 3 + 12 x 2 + 4 x 4 )
2
Here is a graph of the second derivative.
Here is a graph of the fourth derivative.
© 2007 Paul Dawkins 7 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
So, from these graphs it’s clear that the largest value of both of these are at x = 2 . So,
f ¢¢ ( 2 ) = 982.76667 Þ K = 983
f ( 4) ( 2 ) = 25115.14901 Þ M = 25116
We rounded to make the computations simpler.
Here are the bounds for each rule.
983 ( 2 - 0 )
3
EM £ = 20.4791666667
24 ( 4 )
2
983 ( 2 - 0 )
3
ET £ = 40.9583333333
12 ( 4 )
2
25116 ( 2 - 0 )
5
ES £ = 17.4416666667
180 ( 4 )
4
In each case we can see that the errors are significantly smaller than the actual bounds.
© 2007 Paul Dawkins 8 http://tutorial.math.lamar.edu/terms.aspx
Calculus II
© 2007 Paul Dawkins 9 http://tutorial.math.lamar.edu/terms.aspx