Lecture 3 Techniques of integration (cont’d) Integration by parts (cont’d) Relevant section from Stewart, Eighth Edition: 7.1 In the previous lecture, we derived the following formula: Integration by Parts: Formula 1 u(x)v ′ (x) dx = u(x)v(x) - u ′ (x)v(x) dx . (1) This formula is often written in an alternative fashion, using the differentials of the functions involved in the integrand, as opposed to functions multiplied by the differential “dx”. Here: du = u ′ (x) dx and dv = v ′ (x) dx , (2) so that Formula 1 may be rewritten as Integration by Parts: Formula 2 u dv = uv - v du . (3) Example 2: Let us revisit Example 1 from the previous lecture, i.e., xe x dx , (4) and show how it is expressed in terms of Formula 2. First of all, as before, we’ll let u(x)= x or simply u = x, (5) which implies that du = u ′ (x) dx = dx or simply du = dx . (6) Secondly, we’ll let dv = e x dx . (7) But dv = v ′ (x) dx, which implies that v ′ (x)= e x , (8) 22
37
Embed
Lecture 3 Techniques of integration (cont’d)links.uwaterloo.ca/math138pdocs/set2.pdf · Lecture 3 Techniques of integration (cont’d) Integration by parts (cont’d) Relevant section
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Lecture 3
Techniques of integration (cont’d)
Integration by parts (cont’d)
Relevant section from Stewart, Eighth Edition: 7.1
In the previous lecture, we derived the following formula:
Integration by Parts: Formula 1
∫
u(x)v′(x) dx = u(x)v(x) −∫
u′(x)v(x) dx . (1)
This formula is often written in an alternative fashion, using the differentials of the functions involved
in the integrand, as opposed to functions multiplied by the differential “dx”. Here:
du = u′(x) dx and dv = v′(x) dx , (2)
so that Formula 1 may be rewritten as
Integration by Parts: Formula 2
∫
u dv = uv −∫
v du . (3)
Example 2: Let us revisit Example 1 from the previous lecture, i.e.,
∫
xex dx , (4)
and show how it is expressed in terms of Formula 2. First of all, as before, we’ll let
u(x) = x or simply u = x , (5)
which implies that
du = u′(x) dx = dx or simply du = dx . (6)
Secondly, we’ll let
dv = ex dx . (7)
But dv = v′(x) dx, which implies that
v′(x) = ex, (8)
22
which, in turn, implies that
v(x) = ex . (9)
Note that we did not write that
v(x) = ex + C , (10)
where C is an arbitrary constant. You don’t need C – we’ll show why later. Formula 2 then becomes
∫
u dv = uv −∫
v du∫
xex dx = xex −∫
exdx
= xex − ex + C . (11)
Let’s now see what happens if we included the arbitrary constant C in our expression for v(x) above:
∫
u dv = uv −∫
v du∫
xex dx = x[ex +C]−∫
[ex + C]dx
= xex + Cx− ex − Cx+D
= xex − ex +D , (12)
where D is an arbitrary constant. This is the same result as was obtained without the use of C. As
such, we see that using the arbitrary constant C inside the series of steps involved in integration by
parts is redundant. (This, of course, is the case when you use antiderivatives to evaluate a definite
integral using FTC II. You can add any constant you wish to the antiderivative to produce another
antiderivative. But when you take the difference of the antiderivatives evaluated at x = a and x = b,
this constant disappears.
Example 3: Find∫
x2ex dx . (13)
From the experience gained in Examples 1 and 2, it seems that letting u = x2 would be a good
idea. Integration by parts will then produce an integral with a lower power of x. As such, using the
differential notation of Formula 2,
u = x2 =⇒ du = 2x dx , (14)
23
and
dv = ex dx = v′ dx =⇒ v = ex . (15)
Using Formula 2,∫
u dv = uv −∫
v du∫
x2ex dx = x2ex −∫
ex2x dx
= x2ex − 2
∫
xex dx
= x2ex − 2(xex − ex) + C
= x2ex − 2xex + 2ex + C , (16)
where we have used the results of Examples 1 and 2. Of course, it is always good practice to check
the result:
d
dx
[
x2ex − 2xex + 2ex + C]
= 2xex + x2ex − 2ex − 2xex + 2ex
= x2ex , (17)
which verifies our result.
Example 4: Find∫
x sinx dx . (18)
Once again, it seems that it would be a good idea if we set u = x so that du = dx. Then
dv = sinx dx = v′(x) dx =⇒ v(x) = − cos x . (19)
Then, using Formula 2,∫
udv = uv −∫
vdu∫
x sinx dx = −x cos x−∫
(− cos x) dx
= −x cos x+
∫
cos x dx
= −x cos x+ sinx+ C . (20)
Once again, we verify the result,
d
dx[−x cos x+ sinx+ C] = − cos x+ x sinx+ cos x
= x sinx . (21)
24
Example 5: Find∫
lnx dx . (22)
At first sight, this might appear confusing, since there is only one function in the integrand. How can
we express it as a product. The trick is to express the integrand as
lnx = (1)(ln x) = (lnx)(1) . (23)
There are two choices for our integration by parts procedure. If we let u = 1, then du = 0. Further-
more, by letting dv = lnx dx, we would have to antidifferentiate lnx, which is what we’re trying to
do in the first place!
So, in what might appear to be quite contradictory to what we were doing earlier, let’s let
dv = 1 dx = v′(x) dx =⇒ v(x) = x , (24)
and
u = lnx =⇒ du =1
xdx . (25)
Now use Formula 2,
∫
udv = uv −∫
vdu∫
lnx = (lnx)(x)−∫
x · 1xdx
= x lnx−∫
dx
= x lnx− x+ C . (26)
Let’s verify the result:
d
dx[x lnx− x+ C] = lnx+ 1− 1
= lnx . (27)
Integration by parts applied to definite integrals
Let’s return to our original derivation of the integration by parts formula: Given two functions u and
v, we note thatd
dx[u(x)v(x)] = u′(x)v(x) + u(x)v′(x) , (28)
25
which implies (rather trivially, of course, but that’s not the point) that u(x)v(x) is the antiderivative
of the expression on the RHS. This implies that, by the use of the Fundamental Theorem of Calculus
II,∫ b
a[u′(x)v(x) + u(x)v′(x)] dx = u(x)v(x)
∣
∣
∣
b
a= u(b)v(b) − u(a)v(a) . (29)
We’ll rewrite the first equation as follows,
Definite integration by parts: Formula 1
∫ b
au(x)v′(x)dx = u(x)v(x)
∣
∣
∣
b
a−∫ b
au′(x)v(x) dx . (30)
This is integration by parts as applied to definite integrals. You’ll see that this is simply Formula 1
“evaluated at both limits x = a and x = b. It shouldn’t be too difficult to see that Formula 2 for
definite integrals becomes
Definite integration by parts: Formula 2
∫ b
au dv = uv
∣
∣
∣
b
a−∫ b
av du . (31)
Example 6: Find∫ e
1lnx dx . (32)
We’ll use two methods which, of course, are related to each other:
• Method No. 1: Let’s simply use the antiderivative of the integrand, as it was found in Example
5 above. From FTC II,
∫ e
1lnx dx = x lnx− x
∣
∣
∣
e
1
= (e ln e− e)− (1 ln 1− 1)
= e− e+ 1
= 1 . (33)
• Method No. 2: We’ll use the definite integration by parts method Formula 2:
u = lnx =⇒ du =1
xdx , (34)
26
and
dv = dx = v′(x) dx =⇒ v = x , (35)
so that
∫ e
1lnx dx = x lnx
∣
∣
∣
e
1−∫ e
1dx
= e ln e− 1 ln 1− x∣
∣
∣
e
1
= e− 0− (e− 1)
= 1 , (36)
in agreement with Method No. 1.
Example 7: (not done in class) Find∫ π
0x sinx dx . (37)
Here, we’ll let
u = x =⇒ du = dx ,
and
dv = sinx dx = v′(x) dx =⇒ v = − cos x , (38)
so that
∫ πx
0sinx dx = −x cosx
∣
∣
∣
π
0−∫ π
0(− cos x) dx
= −π cos(π)− (0 cos 0 ) +
∫ π
0cos x dx
= π + sinx∣
∣
∣
π
0
= π . (39)
An interesting family of definite integrals which are connected by recursion
Let’s consider the following family of antiderivatives,
∫
sinn x dx , n ≥ 0 . (40)
Of course, the first couple of antiderivatives are easy,
∫
sin0 x dx =
∫
dx = x+ C
∫
sinx dx = − cos x+ C . (41)
27
But at n = 2, the following antiderivative,
∫
sin2 x dx , (42)
is not obvious. Actually, we’ll be dealing with trigonometric integrals in the next lecture. Here we
wish to show that integration by parts can be used to establish a relation between antiderivatives with
different n values.
Let’s express sinn x as a product that can be treated with integration by parts, i.e.,
∫
sinn x dx =
∫
sinn−1 x sinx, dx . (43)
We’ll now let
u = sinn−1 x =⇒ du = (n− 1) sinn−2 x cos x dx , (44)
so that integration by parts will decrease the exponent of sinx. This implies that and
dv = sinx dx =⇒ v = − cos x . (45)
Now use IP (integration by parts) Formula 2:
∫
u dv = uv −∫
v du∫
sinn x dx = − sinn−1 x cos x−∫
(− cos x)(n − 1) sinn−2 x cos x dx (46)
= − sinn−1 x cos x+ (n− 1)
∫
sinn−2 cos2 x dx.
We’ll now rewrite the cos2 x in the integrand as cos2 x = 1− sin2 x, to obtain the equation,
∫
sinn x dx = − sinn−1 x cos x+ (n− 1)
∫
sinn−2 x dx− (n− 1)
∫
sinn x dx . (47)
Now notice that the integral in the last term on the right is the same as the integral on the left side,
so we’ll bring it over to give
n
∫
sinn x dx = − sinn−1 x cos x+ (n− 1)
∫
sinn−2 x dx . (48)
Finally, we’ll divide by n to obtain,
∫
sinn x dx = − 1
nsinn−1 x cos x+
(n − 1)
n
∫
sinn−2 x dx , n ≥ 2 . (49)
28
This is a kind of recursion equation that relates the antiderivatives of powers of sinx. (It is also given
in Stewart, Eighth Edition, as Example 6 on Page 475 (and derived on Page 476).
We now show how this relation is useful to compute values of the following general family of
definite integrals,
In =
∫ π/2
0sinn x dx , n ≥ 0 . (50)
First of all, let’s compute the first two integrals,
I0 =
∫ π/2
0dx =
π
2, (51)
and
I1 =
∫ π/2
0sinx dx
= (− cos x)∣
∣
∣
π/2
0
= (−0)− (−1)
= 1 . (52)
We’ll now use the definite integral form of the recursion relation in (49),
∫ π/2
0sinn x dx = − 1
nsinn−1 x cos x
∣
∣
∣
π/2
0+
(n− 1)
n
∫ π/2
0sinn−2 x dx , n ≥ 2 . (53)
For n ≥ 2,
sinn−1 0 = 0 and cosπ
2= 0 , (54)
so that the first term on the right side of the equation vanishes. As a result, we have
∫ π/2
0sinn x dx =
(n− 1)
n
∫ π/2
0sinn−2 x dx , n ≥ 2 , (55)
or simply,
In =n− 1
nIn−2 , n ≥ 2 . (56)
This is a recursion relation that relates In to In−2. From I0, we can determine I2, I4, etc.. From I1,
we can determine I3, I5, etc.. Let’s look at the first couple of terms of the even-indexed series,
I2 =1
2I0 =
1
2· π2
I4 =3
4I2 =
3
4· 12· π2. (57)
29
In general, we have
I2n =1 · 3 · 5 · · · (2n − 1)
2 · 4 · 6 · · · (2n) · π2. (58)
Now examine the first couple of terms of the odd-indexed series,
I3 =2
3I1 =
2
3
I5 =4
5I3 =
4
5· 23. (59)
In general, we have
I2n+1 =2 · 4 · 6 · · · (2n)
3 · 5 · 7 · · · (2n+ 1). (60)
30
Appendix: Some material covered in the Monday Section 005 Tuto-
rial
The definite integral and its applications (cont’d)
Both of these topics are particular examples of the “Spirit of Calculus” at work. They are taken from
ERV’s lecture notes for MATH 137P Fall 2012 (Week 12).
The work done by a nonconstant force
We start with a result that is well-known to you from high school physics. Suppose that a constant
force F = F i acts on a mass m, causing it to move along the x-axis from position x = a to x = b.
Then the total work done W by the force is given by the product of the magnitude of the force and
the displacement of the mass, i.e.,
W = F (b− a) (61)
This is a special case of the more general result in which a constant force F moves the mass in a
straight line that is not necessarily parallel to F. If the displacement vector of the mass is d, then the
total work W done by F is
W = F · d. (62)
In the discussion that follows, it will be sufficient to consider Eq. (61).
Now suppose that the force F is no longer constant, i.e., F = f(x)i, where the function f(x) is
not necessarily constant. If the mass m is moved from position x = a to x = b, what is the total work
W done by the force? You have most probably seen the answer in your first-year Physics course. It
is given by the definite integral,
W =
∫ b
af(x) dx. (63)
We now derive this result mathematically in terms of our Riemann sum definition of the definite
integral. And our derivation will be done by employing what we have previously called the “Spirit
of Calculus.” Very briefly, we’ll subdivide the interval [a, b] into tiny subintervals Ik of length ∆x,
and then approximate the force function f(x) as a constant over each subinterval. We then use the
constant-force result from Eq. (61) over each subinterval Ik, to approximate the work ∆Wk done in
moving the mass over the subinterval Ik. Finally, we sum over the contributions from all subintervals.
31
As before, we first consider an n > 0 (with the idea of letting n → ∞) and define
∆x =b− a
n. (64)
Then define the partition points,
xk = a+ k∆x, k = 0, 1, 2, · · · . (65)
Note that x0 = a and xn = b. These partition points define a set of n subintervals Ik = [xk−1, xk],
k = 1, 2, · · · n, of equal length ∆x.
Now select a sample point x∗k ∈ [xk−1, xk] from each subinterval Ik. Then evaluate the force
function f at each sample point x∗k. We now consider each value f(x∗k) as the approximation of f(x)
over the subinterval Ik. In other words, the function f(x) is approximated by a constant function
f(x∗k). In this way, we may use Eq. (61) to approximate the work ∆Wk done by the function f(x) in
moving the mass over the subinterval Ik, i.e., from xk−1 to xk, as follows,
∆Wk∼= f(x∗k)∆x (constant force strength × displacement). (66)
The total work done by the force in moving the mass from x0 = a to xn = b will then be approximated
as follows,
W =
n∑
k=1
∆Wk∼=
n∑
k=1
f(x∗k)∆x. (67)
But by construction, the RHS of this equation is a Riemann sum for the definite integral of f(x) from
x = a to x = b. Assuming that the definite integral of f exists (which is ensured if f is continuous or
piecewise continuous), we have
W = limn→∞
n∑
k=1
f(x∗k)∆x
=
∫ b
af(x) dx. (68)
This concludes our mathematical justification of the definite integral formula for work.
An important note regarding the dimensions of work and the integral formula
The dimensionality of force isMLT−2. (Think of F = ma and the dimensions of mass and acceleration.
Therefore the dimensionality of work is force times distance, or ML2T−2. Note that the dimensionality
32
of the Riemann sum in Eq. (67) is also force times distance. Since the definite integral in Eq. (68)
is the limit of Riemann sums with this dimensionality, it follows that the definite integral has the
dimension of work. Basically, we can think of the integrand as having the dimensionality of force and
the infinitesimal dx as the dimensionality of length.
The extension of the work integral to several dimensions and motion along curves
In a future course on advanced calculus that includes the subject of “vector calculus” (e.g., AMATH
231 or MATH 227), you will consider the more general case of a nonconstant force F(r) in R3 acting
on a mass m as the mass moves along a curve C from a point P to point Q. The situation is sketched
in the diagram below.
xy
z
P
Q
m F(r(t))r(t)
The goal is once again to compute the total amount of work W done by the force. Once again, in
the “Spirit of Calculus,” the idea is to break up the motion into tiny pieces over which we can use the
constant-force-straight-line formula “W = F (b − a)” to approximate the work over these pieces. We
then “sum up,” i.e., integrate over all contributions to obtain W . In this case, since the force vectors
F(r) will not, in general, be parallel to the motion of the mass, we’ll have to take scalar products
of these vectors F with the instantaneous direction of motion of the mass m – in other words, the
velocity vectors v = r′ along the curve. The net result is that we have an integral of the following
form∫
CF · dr, (69)
which is known as the line integral of the vector field F over the curve C. You may already have
seen this integral in your Physics course.
33
The definite integral and its applications (cont’d)
The average value of a function
Suppose that a thin, straight wire is located on the x-axis, specifically on the interval [a, b]. Further-
more, suppose that the function f(x) represents the temperature of the wire at a point x ∈ [a, b]. The
question is, “What is the average temperature of the wire?” This is a specific example of the more
general question: What is the average value of a function f over the interval [a, b]?
We’ll address this problem in the usual way, i.e., by means of the “Spirit of Calculus.” We’ll divide
up the interval [a, b] into n subintervals Ik, take samples of the function f(x) on these subintervals,
and then compute the average of these sample values. The average value of f over the interval [a, b]
will be the limit n → ∞ of these average values, provided that the limit exists.
So, as before, let n > 0 and define ∆x =b− a
n. Then define the partition points,
xk = a+ k∆x, k = 0, 1, · · · , n, (70)
so that x0 = a and xn = b. These points define the n subintervals Ik = [xk−1, xk], k = 1, 2, · · · , n.From each subinterval Ik, choose a sample point x∗k ∈ Ik. Then evaluate the function at this sample
point. The result is a set of n function values f(x∗k). These may be viewed as samples of the function
f(x) over the interval [a, b].
It seems reasonable to take the average of these n function values – we’ll denote this average as
f̄n =1
n
n∑
k=1
f(x∗k). (71)
Now the sum on the RHS looks almost like a Riemann sum to the definite integral of f . However, a
∆x is missing. So let’s multiply and divide by ∆x as follows,
f̄n =1
n
1
∆x
n∑
k=1
f(x∗k)∆x
=1
n∆xSn. (72)
Here, Sn is a Riemann sum corresponding to the definite integral
∫ b
af(x) dx. There remains the
question about what to do about the factor1
n∆x. Recalling the definition of ∆x:
∆x =b− a
n⇒ n∆x = b− a. (73)
34
Therefore, the average value in (72) becomes
f̄n =1
b− aSn. (74)
Assuming that f is continuous (or at least piecewise continuous), the limit of the Riemann sums Sn
exists, and we have
limn→∞
f̄n =1
b− alimn→∞
Sn =1
b− a
∫ b
af(x) dx. (75)
This is the average value of f over the interval [a, b], which we shall denote as follows,
f̄[a,b] =1
b− a
∫ b
af(x) dx. (76)
In other words, we compute the definite integral of f over the interval [a, b] and then divide by the
length of the interval, b− a.
Let’s now rewrite Eq. (76) as follows,
∫ b
af(x) dx = f̄[a,b](b− a). (77)
If we assume, for the moment - for the sake of simplicity - that f(x) > 0 on [a, b], then Eq. (77) is
stating that the area enclosed by the graph of f(x), the lines x = a and x = b and the x−axis is given
by the average value of f on [a, b] multiplied by the length of the interval (b− a). In other words, as
sketched in the figure below, we have replaced the area enclosed by the graph, etc., by a rectangle of
height f̄[a,b]. The rectangular region is shaded.
a bx
y = f(x)
f̄[a,b]
That being said, we may now relax the restriction that f(x) be strictly positive on [a, b]. In this case,
the average value of f on [a, b] times the length (b− a) will be a signed area.
35
Some simple, yet illuminating, examples:
(Note: These may not have been covered in the tutorial, but are added for your information.)
1. The function f(x) = 1 over the interval [a, b] = [0, 1]. Since f(x) assumes only one value over
the entire interval, namely, the value 1, we expect that its average value is 1. Let’s check this.
Since a = 0, b = 1 and f(x) = 1, we have
f̄[0,1] =1
1
∫ 1
01 dx = [x]10 = 1, (78)
as expected.
2. The function f(x) = x over the interval [a, b] = [0, 1]. From a look at the graph of f over
[0, 1], we might guess that the average value is its average value is 1/2. Since a = 0, b = 0 and
f(x) = 1, we have
f̄[0,1] =1
1
∫ 1
0x dx =
[
x2
2
]1
0
=1
2. (79)
Our intuition was correct.
3. The function f(x) = x2 over the interval [a, b] = [0, 1]. A look at the graph of f(x) = x2 shows
that there are many more x-values for which f(x) < 1/2 than in the previous case, f(x) = x.
Therefore, we would expect the average value to be less than 1/2. Since a = 0, b = 0 and
f(x) = 1, we have
f̄[0,1] =1
1
∫ 1
0x2 dx =
[
x3
3
]1
0
=1
3. (80)
4. In general, the function f(x) = xn over the interval [a, b] = [0, 1], where n > 0. Since a = 0,
b = 0 and f(x) = 1, we have
f̄[0,1] =1
1
∫ 1
0xn dx =
[
xn+1
n+ 1
]1
0
=1
n+ 1. (81)
Note that as n → ∞, the average value of the function xn behaves as follows,1
n+ 1→ 0. Does
this make sense? For any x such that 0 ≤ x < 1, raising it to higher powers makes it smaller,
i.e., xn → 0 as n → ∞. (Think of x = 1/2.) That means that the graph of f(x) = xn gets flatter
and flatter as n increases, except at x = 1, since 1n = 1 always. This is illustrated below.
Since all values of xn for x ∈ [0, 1) – note that we exclude the case x = 1 – approach zero as
n → ∞, we expect the average value of xn to approach zero in the limit n → ∞.
36
An important piece of advice: When you encounter a new concept in mathematics, it is often
most helpful to apply that concept to a set of cases, perhaps a one-parameter family of functions, and
to observe the behaviour of the results as you vary the parameter. We have done this with the concept
of the average value of a function, applying it to the one-parameter family of functions xn on [0, 1].
37
Lecture 4
Trigonometric integrals
Relevant section from Stewart, Eighth Edition: 7.2
In this section we consider the problem of finding antiderivatives of intgrands that are products of
trigonometric functions. These integrals are actually encountered when the method of trigonometric
substitution, to be discussed the next lecture, is used.
Integrands involving powers of sin and cos
Here we consider integrals of the form
∫
sinm x cosn x dx . (82)
The simplest cases are well known to us,
∫
sinx dx = − cos x+ C
∫
cos x dx = sinx+ C . (83)
Example 1: (This case was not done in class.) The next simplest case is
∫
sinx cos x dx =
∫
u du (u = sinx, du = cos x dx)
=1
2u2 + C
=1
2sin2 x+ C . (84)
Note that we could also have performed the substitution u = cos x, du = − sinx dx,
∫
sinx cos x dx = −∫
u du
= −1
2u2 + C
= −1
2cos2 x+ C . (85)
At first glance, this result is different from the first result, but it is equivalent since
−1
2cos2 x+ C = −1
2(1− sin2 x) + C
=1
2sin2 x+D , (86)
38
where D is an arbitrary constant.
Note that from the double angle formula,
sin 2x = 2 sinx cos x , (87)
the above integral can also be evaluated as follows,
∫
sinx cos x dx =1
2
∫
2 sin x cos x dx
=1
2
∫
sin 2x dx
= −1
4cos 2x + C . (88)
This result appears to be quite different from the earlier two results. But with the double angle for-
mula for the cosine function (below), it can be shown that this result is equivalent to the other two.
We’ll leave this as an exercise for the reader.
Example 2: The next simplest cases are
∫
sin2 x dx
∫
cos2 x dx . (89)
In these cases, the following double angle formula for the cosine is useful:
cos 2x = cos2 x− sin2 x . (90)
If we rewrite the above formula as follows,
cos2 x = (1− sin2 x)− sin2 x
= 1− sin2 x , (91)
we then obtain the result,
sin2 x =1
2− 1
2cos 2x . (92)
We may then use this result to obtain,
∫
sin2 x dx =
∫[
1
2− 1
2cos 2x
]
dx
=1
2x− 1
4sin 2x+ C . (93)
39
We can use the following double angle formula for the sine function,
sin 2x = 2 sinx cos x , (94)
to rewrite the above result as∫
sin2 x dx =1
2x− 1
2sinx cos x+ C . (95)
If we rewrite the formula in (90) as follows,
cosx = cos2 x− (1− cos2 x)
= 2 cos2 x− 1 , (96)
we obtain
cos2 x =1
2+
1
2cos 2x . (97)
We then use this result to obtain∫
cos2 x dx =
∫[
1
2+
1
2sin 2x
]
dx
=1
2x+
1
4sin 2x+ C , (98)
which can also be written as∫
cos2 x dx =1
2x+
1
2sinx cos x+ C . (99)
Example 3(a): Let us now consider the following integral,∫
cos3 x dx . (100)
We’ll express the integrand as the following product,
cos3 x = cos2 x cos x (101)
to perform the following steps,∫
cos3 x dx =
∫
cos2 x cos x dx
=
∫
(1− sin2 x) cos x dx
=
∫
cosx dx−∫
sin2 cos x dx
= sinx− 1
3sin3 x+ C . (102)
40
The final integral was obtained by the method of substitution: Let u = sinx so that du = cos x dx.
Then
∫
sin2 cos x dx =
∫
u2 du
=1
3u3 + C
=1
3sin3 x+ C . (103)
Note that the integral in the second line of the original derivation could also be treated in one line
using substitution as follows: Letting u = sinx so that du = cos x dx,
∫
(1− sin2 x) cos x dx =
∫
(1− u2) du
= u− 1
3u3 + C
= sinx− 1
3sin3 +C , (104)
in agreement with the previous result. This is often the way that solutions are presented in Stewart’s
text.
Example 3(b): We can evaluate the following antiderivative,
∫
sin3 x dx , (105)
in a similar manner:
∫
sin3 x dx =
∫
sin2 sinx dx
=
∫
(1− cos2 x) sinx dx
=
∫
sinx dx−∫
cos2 x sinx dx
= − cos x+1
3cos3 x+ C . (106)
The above two examples are special cases of a more general method of treating an integral of the form
∫
sinm x cosn x dx . (107)
41
In the case that one of m or n is odd, then one tries, using the relation
sin2 x+ cos2 x = 1 , (108)
to express the integral in one of the following forms,∫
[ polynomial in cos x] sinx dx (109)
which can be treated by the substitution u = cos x, du = − sinx dx, or or∫
[ polynomial in sinx] cos x dx , (110)
which can be treated by the substitution u = sinx, du = cos x dx. A summary of the entire procedure
is given in the box with heading, “Strategy for Evaluating∫
sinm x cosn x dx,” on Page 481 of
Stewart’s textbook (Eighth Edition).
Example 3(a) revisited: Let us now reconsider the following integral,∫
cos3 dx =
∫
cos2 cos x dx . (111)
This time, however, instead of expressing cos2 x − (1 − sin2 x) as before, we’ll try the method of
integration by parts:
u = cos2 x =⇒ du = −2 cos x sinx dx , (112)
dv = cos x ex =⇒ v = sinx . (113)
Now use Formula 2 of Integration by Parts,∫
u dv = uv −∫
v du , (114)
to obtain∫
cos3 x dx =
∫
cos2 x cos x dx
= cos2 x sinx+ 2
∫
sin2 x cos x dx
= cos2 x sinx+2
3sin3 x+ C . (115)
At first glance, this does not look like the answer obtained in our first treatment of this integral, Eq.
(102). With a little rewriting, however, we obtain the same result, i.e.,
cos2 x sinx+2
3sin3 x+ C = [1− sin2 x] sinx+
2
3sin3 +C
= sinx− 1
3sin3 x+C . (116)
42
The “moral” of the story: Sometimes, you may obtain a result that does not agree with the result
presented in a book or table of integrals. This does not necessarily mean that your result is incorrect
- it may simply be the correct result, but cast in a slightly different form.
Example 4: Find∫
sin5 x cos2 x dx . (117)
If we substitute cos2 x = 1− sin2 x, we then obtain the following sum,
∫
sin5 x dx−∫
sin7 x dx . (118)
In other words, we are in a deeper mess! Instead, we’ll do the following,
sin5 x cos2 x = sin4 x cos2 x sinx
= (1− cos2 x)2 cos2 x sinx
= (1− 2 cos2 x+ cos4 x) cos2 x sinx
= (cos2 x− 2 cos4 x+ cos6 x) sinx . (119)
This is in keeping with the “Strategy” from Stewart’s textbook, where the power of the sine function,
5, is an odd number. As a result, our integrand is now in the form,
[ polynomial in sinx] cos x . (120)
We may now use the substitution method,
∫
sin5 x cos2 x dx =
∫
(cos2 x− 2 cos4 x+ cos6 x) sinx dx
= −∫
(u2 − 2u4 + u6) du (u = cos x, du = − sinx dx)
= −1
3u3 +
2
5u5 − 1
7u7 +C
= −1
3cos3 x+
2
5cos5 x− 1
7cos7 x+ C (resubstituing u = cos x) . (121)
Integrals involving powers of tan and sec
Here we consider integrals of the form
∫
tanm x secn x dx . (122)
43
Once again, these integrals are often encountered when we employ the method of trigonometric sub-
stitution.
First of all, let’s review the basic differentiation results of tan and sec:
d
dxtan x = sec2 x
d
dxsec x = secx tan x . (123)
If you have these results memorized, then fine. If not, they can always be derived quickly from first
principles:
d
dxtan x =
d
dx
[
sinx
cos x
]
=cos2 x+ sin2 x
cos2 x(quotient rule)
=1
cosx
= sec2 x . (124)
d
dxsec x =
d
dx
[
1
cosx
]
= − 1
cos2 x· (− sinx)
=1
cos x· sinxcos x
= sec x tan x . (125)
Also useful will be the following relationship between tan x and secx,
tan2 x = sec2 x− 1 or sec2 x− tan2 x = 1 or tan2 x+ 1 = sec2 x . (126)
Once again, if you have one or more of thse results memorized, fine. But if not, they can easily be
derived from the Pythagorean relation,
sin2 x+ cos2 x = 1 . (127)
Divide both sides by cos2 x:sin2 x
cos2 x+ 1 =
1
cos2 x, (128)
44
which, of course, is
tan2 x+ 1 = sec2 x . (129)
Example No. 1: The simplest integrals in this class, which you may have seen in MATH 137, are
∫
tan x dx = ln | sec x|+ C (130)
and∫
secx dx = ln | sec x+ tan x|+ C . (131)
Let’s derive these results. The first one is quite straightforward:
∫
tanx dx =
∫
sinx
cos xdx
= −∫
1
udu (u = cos x du = − sinx dx)
= − ln | cos x|+ C
= ln | cos x|−1 + C
= ln |(cos x)−1|+ C
= ln | sec x|+ C . (132)
The second result is obtained by means of a “clever trick:”
∫
sec x dx =
∫
sec x
(
sec x+ tan x
sec x+ tan x
)
dx (multiplication by 1)
=
∫
sec2 +secx tan x
sec x+ tanxdx
=
∫
1
udu (u = [sec x+ tan x] )
= ln |u|+ C
= ln | sec x+ tanx|+ C . (133)
(As mentioned in the lecture, some people would refer to this trick as “cheesy.” But it does achieve
the correct result.)
Example No. 2: The next simplest integral involving tan and sec is quite easy,
∫
sec x tanx dx = sec x+ C . (134)
45
Example No. 2: Let us now consider the integrals,
∫
tan2 x dx and
∫
sec2 x dx . (135)
These are rather straightforward:
∫
tan2 x dx =
∫
(sec2 −x) dx
= tan x− x+ C (136)
and
∫
sec2 x dx = tan x+ C . (137)
For higher powers of tan and sec, there is a strategy similar to that for powers of tan and sec: See the
box entitled, Strategy for evaluating∫
tanm x secm x. This strategy does not cover all cases and,
as the text indicates, one “may need to use identities, integration by parts, and occasionally a little
ingenuity. We consider a few examples below.
Example No. 3: The antiderivative,∫
tan3 x dx . (138)
Let’s write tan3 x = tan2 x tan x and then convert the tan2 x term:
∫
tan3 x dx =
∫
tan2 x tanx dx
= (sec2−1) tan x dx
=
∫
tanx sec2 x dx−∫
tan x dx
=1
2tan2 x− ln | sec x|+ C . (139)
The first integral was obtained from the method of substitution: u = tan x, du = sec2 x dx.
Example No. 4: The antiderivative,∫
sec3 dx . (140)
Method No. 1: (This method was started in class but not finished.) We’ll write sec3 x = sec2 x sec x
46
and then convert the sec2 x term:
∫
sec3 x dx =
∫
sec2 x sec x dx (141)
=
∫
(tan2 x+ 1) sec x dx (142)
=
∫
tan2 x sec x dx+
∫
sec x dx . (143)
The second integral is easy – we computed it earlier,
∫
secx dx = ln | sec x+ tan x|+ C . (144)
As for the first integral, we’ll try integration by parts,
∫
tan2 x sec x dx =
∫
tanx(sec x tanx) dx (145)
with u = tan x and du = sec x tan x dx, implying that v = sec x and du = sec2 x. Recalling that
∫
u dv = uv −∫
v du , (146)
we have∫
tan x(sec x tan x) dx = tanx sec x−∫
sec3 x dx . (147)
If we now substitute the results of (144 and (147) into (141), we obtain
∫
sec3 x dx = sec x tan x−∫
sec3 x dx+ ln | sec x+ tanx|+ C . (148)
It might appear that we have “goofed,” since the same integral appears on both sides of the equation!
But the saving grace is that the integral on the right side is multiplied by (-1). As such, we can bring
it over to the left side to give
2
∫
sec3 x dx = sec x tanx+ ln | sec x+ tanx|+ C . (149)
and then divide by 2 to arrive at the final result,
∫
sec3 x dx =1
2secx tan x+
1
2ln | sec x+ tanx|+ C . (150)
Method No. 2: (This was the method shown in class.) We’ll once again express the integrand as
sec3 x = sec2 x sec2 x but this time, instead of using a trigonometric identity to re-express the sec2 x
function, we’ll use integration by parts:
∫
sec3 x dx =
∫
sec2 x sec x dx . (151)
47
Let u = secx and dv = sec2 x dx so that du = sec x tanx dx and v = tanx. Then from the integration
by parts formula,∫
u dv = uv −∫
v du , (152)
we obtain the following,
∫
sec3 x dx = sec x tanx−∫
tanx sec x tan x dx . (153)
This result is actually equivalent to Eq. (147). We’ll work on the second integral by combining the
two tanx functions and using the trig identity:
∫
tan2 x sec x dx =
∫
(sec2 x− 1) sec x dx
=
∫
sec3 x dx−∫
sec x dx
=
∫
sec3 x dx− ln | sec x+ tanx|+ C . (154)
Inserting this result into (153) yields
∫
sec3 x dx = sec x tan x−∫
sec3 dx+ ln | sec x+ tanx|+C , (155)
which is identical to Eq. (148) from Method No. 1. As such, we shall be able to arrive at the same
result, i.e.,∫
sec3 x dx =1
2secx tan x+
1
2ln | sec x+ tanx|+ C . (156)
48
Lecture 5
Trigonometric substitution
Relevant section from Stewart, Eighth Edition: 7.3
In science and engineering, we often encounter integrals with integrands composed of square roots,
or integer powers of these square roots, of quadratic functions, e.g.,
√
A− x2,√
A+ x2,√
x2 −A . (157)
Such integrals can often be handled by means of appropriate “trigonometric substitutions,” the sub-
ject of this section. As we’ll see below, the goal is to remove the square root terms from
the integrands and this can be accomplished using appropriate trigonometric substitutions. These
substitutions will be based upon the following two important trigonometric relations,
sin2 x+ cos2 x = 1 ,
tan2 x+ 1 = sec2 x . (158)
As we discussed earlier, the second relation can be obtained from the first one by dividing both sides
of the first one by cos2 x. We’ll see that it is convenient to replace the constants A in the above
expresssions with a2, i.e.,√
a2 − x2,√
a2 + x2,√
x2 − a2 . (159)
Integrals which contain√a2 − x
2
Example 1: The antiderivative,∫
√
a2 − x2 dx . (160)
Let’s consider the change of variable,
x = a sin θ =⇒ dx = a cos θ dθ . (161)
We would like this to be a 1− 1 relationship between x and θ, which implies that the angle θ should
be restricted to the interval [−π/2, π/2]. More on this later.
49
In addition, we’ll assume, for simplicity, that a > 0. With this change of variable, the square root
term becomes,
√
a2 − x2 =√
a2 − a2 sin2 θ
= a√
1− sin2 θ
= a cos θ . (162)
Technically, the last line should be√
a2 − x2 = a| cos θ| , (163)
since the√· function is, by definition, non-negative. If we restrict the range of the θ variable to
[−π/2, π/2], then cos θ ≥ 0 and the absolute value sign can be omitted.
Inserting the expressions for the square root function and the dx term into the original integral,
we obtain
∫
√
a2 − x2 =
∫
[a cos θ][a cos θ] dθ
= a2∫
cos2 θ dθ . (164)
As you see, we’ve produced a trigonometric integral, the subject of the previous lecture. You may
recall that we can easily evaluate this integral using the double-angle formula for the cosine function,
∫
cos2 θdθ =
∫[
1
2+
1
2cos 2θ
]
dθ
=1
2θ +
1
4sin 2θ
=1
2θ +
1
2sin θ cos θ + C . (165)
But we must now express this result in terms of the original variable x. How do we do this? Let us
recall that
x = a sin θ =⇒ sin θ =x
a, (166)
which, in turn, implies that
θ = Sin−1(x
a
)
. (167)
This takes care of θ and sin θ. But what about cos θ?
One way to obtain cos θ is to simply use the trigonometric relation,
cos2 θ = 1− sin2 θ =⇒ cos2 θ = 1− x2
a2. (168)
50
This, in turn, implies that
cos θ =
√
1− x2
a2=
√a2 − x2
a. (169)
Since θ ∈ [−π/2, π/2], we can take the positive square root.
The above procedure of translating expressions involving θ to those involving x is simplified if we draw
a diagram that is associated with the change of variable,
x = a sin θ =⇒ sin θ =x
a. (170)
a
θ√
a2− x2
x
Note: This particular instructor thinks that it is always a good idea to draw the diagram.
We now combine all of our results to obtain the desired antiderivative,∫
√
a2 − x2 dx = a2∫
cos2 θ
=a2
2θ +
a2
2sin θ cos θ + C
=a2
2Sin−1
(x
a
)
+a2
2
(x
a
)
√a2 − x2
a+ C
=a2
2Sin−1
(x
a
)
+x
2
√
a2 − x2 + C . (171)
It’s a good idea to check this result by differentiation (omitting the arbitrary constant C):
d
dx
[
a2
2Sin−1
(x
a
)
+x
2
√
a2 − x2]
=a2
2
1√
1− x2
a2
(
1
a
)
+1
2
√
a2 − x2 +x
2· 12
1√a2 − x2
(−2x)
=1
2
[
a2√a2 − x2
+√
a2 − x2 − x2√a2 − x2
]
=1
2
[
a2 − x2√a2 − x2
+√
a2 − x2]
=√
a2 − x2 . (172)
Example 1 revisited - An application: Let us now apply this result to the following definite
integral,∫ a
−a
√
a2 − x2 dx , (173)
51
which is the area of the semi-circular region enclosed by the curve y =√a2 − x2 and the x-axis
between x = −a and x = b. This is one-half the area of a circle of radius a, namely1
2πa2.
From the FTC II and our earlier result,
∫ a
−a
√
a2 − x2 dx =a2
2Sin−1
(x
a
)
+x
2
√
a2 − x2
∣
∣
∣
∣
∣
a
−a
=
[
a2
2Sin−1(1) +
a
2
√
a2 − x2]
−[
a2
2Sin−1(−1) +
−a
2
√
a2 − x2]
=a2
2
(π
2
)
− a2
2
(
−π
2
)
=1
2πa2 . (174)
The above result was made possible by the fact that we had previously done all of the work to compute
the antiderivative of√a2 − x2. If, on the other hand, you were given the definite integral to evaluate,
and then started to employ the trigonometric substitution method, some time and work could be saved
by stopping after obtaining the antiderivative in terms of θ and evaluating it at appropriate limits, as
opposed to expressing your results in terms of x and then evaluating them. We illustrate this with
the problem addressed above.
First of all, note that the lower and upper limits of integration are −a and a, respectively. With
the change of variable,
x = a sin θ , (175)
this implies that the lower and upper limits of integration are −π/2 and π/2. Then,
∫ a
−a
√
a2 − x2 dx = a2∫ π/2
−π/2cos2 θ dθ
= a2[
θ
2+
1
4sin 2θ
]π/2
−π/2
= a2[π
2+ 0]
− a2[
−π
2+ 0]
=1
2πa2 , (176)
in agreement with our earlier result.
Example 2: The antiderivative,∫
1√a2 − x2
dx . (177)
52
(In the case that a = 1, you may remember that the antiderivative is Sin−1(x).) Once again, we
consider the change of variable,
x = a sin θ =⇒ dx = a cos θ dθ . (178)
Then, as before,√
a2 − x2 = a cos θ . (179)
Inserting these expressions into the integral,
∫
1√a2 − x2
dx =
∫
a cos θ
a cos θdθ
=
∫
dθ
= θ + C . (180)
But from the change of variable,
x = a sin θ =⇒ sin θ =x
a=⇒ θ = Sin−1
(x
a
)
. (181)
Therefore,∫
1√a2 − x2
dx = Sin−1(x
a
)
+ C . (182)
Example 2 revisited: Suppose that you remembered that
∫
1√a2 − x2
dx = Sin−1(x) . (183)
You could use this fact to find the antiderivative,
∫
1√a2 − x2
dx , (184)
as follows. First, factor out the a2 from the square root:
∫
1√a2 − x2
dx =
∫
1
a
1√
1−(
xa
)2dx . (185)
Now make the change of variable,
u =x
a=⇒ du =
1
adx =⇒ dx = adu . (186)
53
The integral at the right then becomes
1
a
∫
1√
1−(
xa
)2dx =
1
a
∫
1
1− u2a du
=
∫
1
1− u2du
= Sin−1u+ C
= Sin−1(x
a
)
+ C , (187)
in agreement with our earlier result.
Example 2: It’s possible that we also have powers of x present in the integral, e.g.,
∫
x√a2 − x2
dx . (188)
This integral is actually quite easy since the top is a derivative of the inside of the bottom. Let
u = a2 − x2 =⇒ du = −2x dx =⇒ x dx = −1
2du , (189)
so that the above integral becomes
−1
2
∫
1
u1/2du = −1
2(2)u1/2 + C
= −√
a2 − x2 +C . (190)
Example 4: The antiderivative,∫
x2√a2 − x2
dx . (191)
As before, let
x = a sin θ =⇒ dx = a cos θ . (192)
54
The above integral becomes∫
x2√a2 − x2
dx =
∫
a2 sin2 θ
a cos θa cos θ dθ
= a2∫
sin2 θ dθ
= a2∫[
1
2− cos 2θ
]
dθ (193)
=a2
2θ − a2
4sin(2θ)
=a2
2θ − a2
2sin θ cos θ
=a2
2Sin−1
(x
a
)
− a2
2
(x
a
)
√
1− x2
a2+ C
=a2
2Sin−1
(x
a
)
− x
2
√
a2 − x2 + C .
(194)
Integrals which contain√a2 + x
2
Example 5: The antiderivative,∫
√
a2 + x2 dx . (195)
With an eye to the trigonometric relation,
tan2 x+ 1 = sec2 x , (196)
let us consider the change of variable,
x = a tan θ =⇒ dx = a sec2 θ dθ . (197)
With this change of variable, the square root term becomes
√
a2 + x2 =√
a2 + a2 tan2 θ
= a√
1 + tan2 θ
= a sec θ . (198)
As earlier, the sec θ term should technically be | sec θ|, but we’ll restrict the range of θ once again to
[−π/2, π/2].
And while we’re at it, let’s draw the triangle that is associated with this change of variable, starting
with the fact that
tan θ =x
a. (199)
55
θ
x
a
√
a2 + x2
We now perform the above change of variable in the integral,
∫
√
a2 + x2 dx =
∫
(a sec θ)a sec2 θ dθ
= a2∫
sec3 θ . (200)
We evaluated this antiderivative in the previous lecture and simply employ the result here:
∫
√
a2 + x2 dx = a2∫
sec3 θ
=a2
2[sec θ tan θ + ln | sec θ + tan θ|] + C . (201)
We must now “translate” the functions in θ into functions involving x. From the diagram,
tan θ =x
asec θ =
√x2 + a2
a. (202)
Inserting these results into our expression, we obtain
∫
√
a2 + x2 dx =a2
2[sec θ tan θ + ln | sec θ + tan θ|] + C
=x
2
√
a2 + x2 +a2
2ln
∣
∣
∣
∣
∣
√a2 + x2
a+
x
a
∣
∣
∣
∣
∣
+ C . (203)
Note that we can write the logarithmic term as follows,
ln
∣
∣
∣
∣
∣
√a2 + x2
a+
x
a
∣
∣
∣
∣
∣
= ln
∣
∣
∣
∣
∣
√a2 + x2 + x
a
∣
∣
∣
∣
∣
= ln∣
∣
∣
√
a2 + x2 + x∣
∣
∣− ln |a| . (204)
The constant term ln |a| can be absorbed into the arbitrary constant C in the previous expression. As
such, our final result is
∫
√
a2 + x2 dx =x
2
√
a2 + x2 +a2
2ln∣
∣
∣
√
a2 + x2 + x∣
∣
∣+ C .
(205)
The result can be checked by differentiation. (But we won’t do it here!)
56
Example 6: The antiderivative∫
1√a2 + x2
dx . (206)
Once again, we consider the following change of variable,
x = a tan θ =⇒ dx = a sec2 θ dθ . (207)
The above integral becomes
∫
1√a2 + x2
dx =
∫
1
a sec θ(a sec2 θ) dθ
=
∫
sec θ dθ
= ln | sec θ + tan θ|+ C
= ln
∣
∣
∣
∣
∣
√a2 + x2
a+
x
a
∣
∣
∣
∣
∣
+ C
= ln |√
a2 + x2 + x|+ C , (208)
where we have once again absorbed the ln |a| term into the arbitrary constant.
Integrals which contain√x2 − a
2
Example 7: The antiderivative,∫
√
x2 − a2 dx . (209)
Once again with an eye to the trigonometric relation,
tan2 x+ 1 = sec2 x =⇒ sec2 x− 1 = tan2 x , (210)
we consider the following change of variable,
x = a sec θ =⇒ dx = a sec θ tan θ dθ . (211)
This implies thatx
a= sec θ =⇒ θ = Tan−1
(x
a
)
. (212)
Let’s draw the triangle associated with this change of variable:
57
θ
a
x √
x2− a2
Performing the change of variable in the above integral yields,
∫
√
x2 − a2 dx =
∫
(a tan θ)(a sec θ tan θ), dθ
= a2∫
tan2 θ sec θ dθ
= a2∫
(sec2 θ − 1) sec θ dθ
= a2∫
sec3 θ dθ − a2∫
sec θ dθ
= a2[
1
2sec θ tan θ +
1
2ln | sec θ + tan θ| − ln | sec θ + tan θ|
]
+ C
=a2
2[sec θ tan θ − ln | sec θ + tan θ| ] + C
=a2
2
[
(x
a
)
(√x2 − a2
a
)
− ln
∣
∣
∣
∣
∣
x
a+
√x2 − a2
a
∣
∣
∣
∣
∣
]
+ C
=x
2
√
x2 − a2 − a2
2ln |x+
√
x2 − a2|+ C , (213)
where, once again, we have absorbed ln |a| into the arbitrary constant.