Skip to main content
Logo image

APEX Calculus

Section 6.2 Integration by Parts

Here’s a simple integral that we can’t yet evaluate:
xcos(x)dx.
It’s a simple matter to take the derivative of the integrand using the Product Rule, but there is no Product Rule for integrals. However, this section introduces Integration by Parts, a method of integration that is based on the Product Rule for derivatives. It will enable us to evaluate this integral.
Figure 6.2.1. Video introduction to Section 6.2
The Product Rule says that if u and v are functions of x, then (uv)=uv+uv. For simplicity, we’ve written u for u(x) and v for v(x). Suppose we integrate both sides with respect to x. This gives
(uv)dx=(uv+uv)dx.
By the Fundamental Theorem of Calculus, the left side integrates to uv. The right side can be broken up into two integrals, and we have
uv=uvdx+uvdx.
Solving for the second integral we have
uvdx=uvuvdx.
Using differential notation, we can write du=u(x)dx and dv=v(x)dx and the expression above can be written as follows:
udv=uvvdu.
This is the Integration by Parts formula. For reference purposes, we state this in a theorem.
Let’s try an example to understand our new technique.

Example 6.2.3. Integrating using Integration by Parts.

Evaluate xcos(x)dx.
Solution 1.
The key to Integration by Parts is to identify part of the integrand as “u” and part as “dv.” Regular practice will help one make good identifications, and later we will introduce some principles that help. For now, let u=x and dv=cos(x)dx.
It is generally useful to make a small table of these values as done below. Right now we only know u and dv as shown on the left of Figure 6.2.4; on the right we fill in the rest of what we need. If u=x, then du=dx. Since dv=cos(x)dx, v is an antiderivative of cos(x). We choose v=sin(x).
u=xv=?du=?dv=cos(x)dx
u=xv=sin(x)du=dxdv=cos(x)dx
Figure 6.2.4. Setting up Integration by Parts
Now substitute all of this into the Integration by Parts formula, giving
xcos(x)dx=xsin(x)sin(x)dx.
We can then integrate sin(x) to get cos(x)+C and overall our answer is
xcos(x)dx=xsin(x)+cos(x)+C.
Note how the antiderivative contains a product, xsin(x). This product is what makes Integration by Parts necessary.
We can check our work by taking the derivative:
ddx(xsin(x)+cos(x)+C)=xcos(x)+sin(x)sin(x)+0=xcos(x).
Solution 2. Video solution
You may wonder what would have happened in Example 6.2.3 if we had chosen our u and dv differently. If we had chosen u=cos(x) and dv=xdx then du=sin(x)dx and v=x2/2. Our second integral is not simpler than the first; we would have
xcos(x)dx=cos(x)x22x22(sin(x))dx.
The only way to approach this second integral would be yet another integration by parts.
Example 6.2.3 demonstrates how Integration by Parts works in general. We try to identify u and dv in the integral we are given, and the key is that we usually want to choose u and dv so that du is simpler than u and v is hopefully not too much more complicated than dv. This will mean that the integral on the right side of the Integration by Parts formula, vdu will be simpler to integrate than the original integral udv.
In the example above, we chose u=x and dv=cos(x)dx. Then du=dx was simpler than u and v=sin(x) is no more complicated than dv. Therefore, instead of integrating xcos(x)dx, we could integrate sin(x)dx, which we knew how to do.
A useful mnemonic for helping to determine u is “LIATE,” where
L = Logarithmic, I = Inverse Trig., A = Algebraic (polynomials, roots, power functions), T = Trigonometric, and E = Exponential.
If the integrand contains both a logarithmic and an algebraic term, in general letting u be the logarithmic term works best, as indicated by L coming before A in LIATE.
We now consider another example.

Example 6.2.5. Integrating using Integration by Parts.

Evaluate xexdx.
Solution.
The integrand contains an Algebraic term (x) and an Exponential term (ex). Our mnemonic suggests letting u be the algebraic term, so we choose u=x and dv=exdx. Then du=dx and v=ex as indicated by the tables below.
u=xv=?du=?dv=exdx
u=xv=exdu=dxdv=exdx
Figure 6.2.6. Setting up Integration by Parts
We see du is simpler than u, while there is no change in going from dv to v. This is good. The Integration by Parts formula gives
xexdx=xexexdx.
The integral on the right is simple; our final answer is
xexdx=xexex+C.
Note again how the antiderivatives contain a product term.

Example 6.2.7. Integrating using Integration by Parts.

Evaluate x2cos(x)dx.
Solution 1.
The mnemonic suggests letting u=x2 instead of the trigonometric function, hence dv=cos(x)dx. Then du=2xdx and v=sin(x) as shown below.
u=x2v=?du=?dv=cos(x)dx
u=x2v=sin(x)du=2xdxdv=cos(x)dx
Figure 6.2.8. Setting up Integration by Parts
The Integration by Parts formula gives
x2cos(x)dx=x2sin(x)2xsin(x)dx.
At this point, the integral on the right is indeed simpler than the one we started with, but to evaluate it, we need to do Integration by Parts again. Here we choose r=2x and ds=sin(x) and fill in the rest below. (We are choosing new names since we have already used u and v. Our integration by parts formula is now rds=rssdr.)
u=2xv=?du=?dv=sin(x)dx
u=2xv=cos(x)du=2dxdv=sin(x)dx
Figure 6.2.9. Setting up Integration by Parts (again)
x2cos(x)dx=x2sin(x)(2xcos(x)2cos(x)dx).
The integral all the way on the right is now something we can evaluate. It evaluates to 2sin(x). Then going through and simplifying, being careful to keep all the signs straight, our answer is
x2cos(x)dx=x2sin(x)+2xcos(x)2sin(x)+C.
Solution 2. Video solution

Example 6.2.10. Integrating using Integration by Parts.

Evaluate excos(x)dx.
Solution 1.
This is a classic problem. Our mnemonic suggests letting u be the trigonometric function instead of the exponential. In this particular example, one can let u be either cos(x) or ex; to demonstrate that we do not have to follow LIATE, we choose u=ex and hence dv=cos(x)dx. Then du=exdx and v=sin(x) as shown below.
u=exv=?du=?dv=cos(x)dx
u=exv=sin(x)du=exdv=cos(x)dx
Figure 6.2.11. Setting up Integration by Parts
Notice that du is no simpler than u, going against our general rule (but bear with us). The Integration by Parts formula yields
excos(x)dx=exsin(x)exsin(x)dx.
The integral on the right is not much different than the one we started with, so it seems like we have gotten nowhere. Let’s keep working and apply Integration by Parts to the new integral, using u=ex and dv=sin(x)dx. This leads us to the following:
r=exs=?dr=?ds=sin(x)dx
r=exs=cos(x)dr=exdxds=sin(x)dx
Figure 6.2.12. Setting up Integration by Parts (again)
The Integration by Parts formula then gives:
excos(x)dx=exsin(x)(excos(x)excos(x)dx)=exsin(x)+excos(x)excos(x)dx.
It seems we are back right where we started, as the right hand side contains excos(x)dx. But this is actually a good thing.
Add excos(x)dx to both sides. This gives
2excos(x)dx=exsin(x)+excos(x)
Now divide both sides by 2 and then add the integration constant:
excos(x)dx=12(exsin(x)+excos(x))+C.
Simplifying a little, our answer is thus
excos(x)dx=12ex(sin(x)+cos(x))+C.
Solution 2. Video solution

Example 6.2.13. Integrating using Integration by Parts: antiderivative of ln(x).

Evaluate ln(x)dx.
Solution 1.
One may have noticed that we have rules for integrating the familiar trigonometric functions and ex, but we have not yet given a rule for integrating ln(x). That is because ln(x) can’t easily be integrated with any of the rules we have learned up to this point. But we can find its antiderivative by a clever application of Integration by Parts. Set u=ln(x) and dv=dx. This is a good, sneaky trick to learn as it can help in other situations. This determines du=(1/x)dx and v=x as shown below.
u=ln(x)v=?du=?dv=1dx
u=ln(x)v=xdu=1/xdxdv=1dx
Figure 6.2.14. Setting up Integration by Parts
Putting this all together in the Integration by Parts formula, things work out very nicely:
ln(x)dx=xln(x)x1xdx.
The new integral simplifies to 1dx, which is about as simple as things get. Its integral is x+C and our answer is
ln(x)dx=xln(x)x+C.
Solution 2. Video solution

Example 6.2.15. Integrating using Int. by Parts: antiderivative of arctanx.

Evaluate arctanxdx.
Solution 1.
The same sneaky trick we used above works here. Let u=arctanx and dv=dx. Then du=1/(1+x2)dx and v=x. The Integration by Parts formula gives
arctanxdx=xarctanxx1+x2dx.
The integral on the right can be solved by substitution. Taking w=1+x2, we get dw=2xdx. The integral then becomes
arctanxdx=xarctanx121wdw.
The integral on the right evaluates to ln|w|+C, which becomes ln(1+x2)+C (we can drop the absolute values as 1+x2 is always positive). Therefore, the answer is
arctanxdx=xarctanx12ln(1+x2)+C.
Solution 2. Video solution

Substitution Before Integration.

When taking derivatives, it was common to employ multiple rules (such as using both the Quotient and the Chain Rules). It should then come as no surprise that some integrals are best evaluated by combining integration techniques. In particular, here we illustrate making an “unusual” substitution first before using Integration by Parts.

Example 6.2.16. Integration by Parts after substitution.

Evaluate cos(ln(x))dx.
Solution 1.
The integrand contains a composition of functions, leading us to think Substitution would be beneficial. Letting u=ln(x), we have du=1/xdx. This seems problematic, as we do not have a 1/x in the integrand. But consider:
du=1xdxxdu=dx.
Since u=ln(x), we can use inverse functions and conclude that x=eu. Therefore we have that
dx=xdu=eudu.
We can thus replace ln(x) with u and dx with eudu. Thus we rewrite our integral as
cos(ln(x))dx=eucosudu.
We evaluated this integral on the right in Example 6.2.10. (This integral can also be found in a table of integrals). Using the result there, we have:
cos(ln(x))dx=eucos(u)du=12eu(sin(u)+cos(u))+C=12eln(x)(sin(ln(x))+cos(ln(x)))+C=12x(sin(ln(x))+cos(ln(x)))+C.
Solution 2. Video solution

Definite Integrals and Integration By Parts.

So far we have focused only on evaluating indefinite integrals. Of course, we can use Integration by Parts to evaluate definite integrals as well, as Theorem 6.2.2 states. We do so in the next example.

Example 6.2.17. Definite integration using Integration by Parts.

Evaluate 12x2ln(x)dx.
Solution 1.
Our mnemonic suggests letting u=ln(x), hence dv=x2dx. We then get du=(1/x)dx and v=x3/3 as shown below.
u=ln(x)v=?du=?dv=x2dx
u=ln(x)v=x3/3du=1/xdxdv=x2dx
Figure 6.2.18. Setting up Integration by Parts
The Integration by Parts formula then gives
12x2ln(x)dx=x33ln(x)|1212x331xdx=x33ln(x)|1212x23dx=x33ln(x)|12x39|12=(x33ln(x)x39)|12=(83ln(2)89)(13ln(1)19)=83ln(2)791.07.
Solution 2. Video solution
In general, Integration by Parts is useful for integrating certain products of functions, like xexdx or x3sin(x)dx. It is also useful for integrals involving logarithms and inverse trigonometric functions.
As stated before, integration is generally more difficult than derivation. We are developing tools for handling a large array of integrals, and experience will tell us when one tool is preferable/necessary over another. For instance, consider the three similar-looking integrals
xexdx,xex2dx and xex3dx.
While the first is calculated easily with Integration by Parts, the second is best approached with Substitution. Taking things one step further, the third integral has no answer in terms of elementary functions, so none of the methods we learn in calculus will get us the exact answer.
Integration by Parts is a very useful method, second only to Substitution. In the following sections of this chapter, we continue to learn other integration techniques. Section 6.3 focuses on handling integrals containing trigonometric functions.

Exercises Exercises

Terms and Concepts

1.
  • ?
  • True
  • False
Integration by Parts is useful in evaluating integrands that contain products of functions.
2.
  • ?
  • True
  • False
Integration by Parts can be thought of as the “opposite of the Chain Rule.”
3.
For what is “LIATE” useful?
4.
  • ?
  • True
  • False
If the integral that results from Integration by Parts appears to also need Integration by Parts, then a mistake was made in the original choice of “u”.

Problems

Exercise Group.
Evaluate the given indefinite integral.
14.
e4xsin(3x)dx
15.
e5xcos(5x)dx
16.
sin(x)cos(x)dx
17.
sin1(x)dx
18.
tan1(8x)dx
19.
xtan1(x)dx
20.
cos1(x)dx
22.
(x6)ln(x)dx
32.
sec(x)tan(x)dx
33.
xsec(x)tan(x)dx
34.
xcsc(x)cot(x)dx
Exercise Group.
Evaluate the indefinite integral after first making a substitution.
35.
cos(ln(x))dx
36.
e2xcos(ex)dx
Exercise Group.
Evaluate the definite integral. Note: the corresponding indefinite integral appears in Exercises 5–13.
41.
0πxsin(x)dx
43.
π/3π/3x2sin(x)dx
44.
π/3π/3x3sin(x)dx
45.
0ln(2)xex2dx
48.
0π/2exsin(x)dx
49.
π/2π/2e2xcos(x)dx
You have attempted 1 of 58 activities on this page.