## Section 6.2 Integration by Parts

Here's a simple integral that we can't yet evaluate:

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.

The Product Rule says that if \(u\) and \(v\) are functions of \(x\text{,}\) then \((uv)' = u'v + uv'\text{.}\) For simplicity, we've written \(u\) for \(u(x)\) and \(v\) for \(v(x)\text{.}\) Suppose we integrate both sides with respect to \(x\text{.}\) This gives

By the Fundamental Theorem of Calculus, the left side integrates to \(uv\text{.}\) The right side can be broken up into two integrals, and we have

Solving for the second integral we have

Using differential notation, we can write \(du = u'(x)dx\) and \(dv=v'(x)dx\) and the expression above can be written as follows:

This is the Integration by Parts formula. For reference purposes, we state this in a theorem.

### Theorem 6.2.2. Integration by Parts.

Let \(u\) and \(v\) be differentiable functions of \(x\) on an interval \(I\) containing \(a\) and \(b\text{.}\) Then

and

Let's try an example to understand our new technique.

### Example 6.2.3. Integrating using Integration by Parts.

Evaluate \(\ds\int x\cos(x) \, dx\text{.}\)

The key to Integration by Parts is to identify part of the integrand as “\(u\)” and part as “\(dv\text{.}\)” 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\text{.}\)

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\text{,}\) then \(du = dx\text{.}\) Since \(dv = \cos(x)\, dx\text{,}\) \(v\) is an antiderivative of \(\cos(x)\text{.}\) We choose \(v = \sin(x)\text{.}\)

Now substitute all of this into the Integration by Parts formula, giving

We can then integrate \(\sin(x)\) to get \(-\cos(x) + C\) and overall our answer is

Note how the antiderivative contains a product, \(x\sin(x)\text{.}\) This product is what makes Integration by Parts necessary.

We can check our work by taking the derivative:

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=x \, dx\) then \(du=-\sin(x)\, dx\) and \(v=x^2/2\text{.}\) Our second integral is not simpler than the first; we would have

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\text{.}\) This will mean that the integral on the right side of the Integration by Parts formula, \(\int v\,du\) will be simpler to integrate than the original integral \(\int u\,dv\text{.}\)

In the example above, we chose \(u=x\) and \(dv=\cos(x)\,dx\text{.}\) Then \(du=dx\) was simpler than \(u\) and \(v=\sin(x)\) is no more complicated than \(dv\text{.}\) Therefore, instead of integrating \(x\cos(x) \,dx\text{,}\) we could integrate \(\sin(x)\,dx\text{,}\) which we knew how to do.

A useful mnemonic for helping to determine \(u\) is “LIATE,” where

L = *L*ogarithmic, I = *I*nverse Trig., A = *A*lgebraic (polynomials, roots, power functions), T = *T*rigonometric, and E = *E*xponential.

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 \(\displaystyle \int x e^x\,dx\text{.}\)

The integrand contains an *A*lgebraic term (\(x\)) and an *E*xponential term (\(e^x\)). Our mnemonic suggests letting \(u\) be the algebraic term, so we choose \(u=x\) and \(dv=e^x\,dx\text{.}\) Then \(du=dx\) and \(v=e^x\) as indicated by the tables below.

We see \(du\) is simpler than \(u\text{,}\) while there is no change in going from \(dv\) to \(v\text{.}\) This is good. The Integration by Parts formula gives

The integral on the right is simple; our final answer is

Note again how the antiderivatives contain a product term.

### Example 6.2.7. Integrating using Integration by Parts.

Evaluate \(\displaystyle \int x^2\cos(x) \,dx\text{.}\)

The mnemonic suggests letting \(u=x^2\) instead of the trigonometric function, hence \(dv=\cos(x)\,dx\text{.}\) Then \(du=2x\,dx\) and \(v=\sin(x)\) as shown below.

The Integration by Parts formula gives

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\text{.}\) Our integration by parts formula is now \(\int r\,ds=rs-\int s\,dr\text{.}\))

The integral all the way on the right is now something we can evaluate. It evaluates to \(-2\sin(x)\text{.}\) Then going through and simplifying, being careful to keep all the signs straight, our answer is

### Example 6.2.10. Integrating using Integration by Parts.

Evaluate \(\displaystyle \int e^x\cos(x) \,dx\text{.}\)

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 \(e^x\text{;}\) to demonstrate that we do not have to follow LIATE, we choose \(u=e^x\) and hence \(dv = \cos(x)\,dx\text{.}\) Then \(du=e^x\,dx\) and \(v=\sin(x)\) as shown below.

Notice that \(du\) is no simpler than \(u\text{,}\) going against our general rule (but bear with us). The Integration by Parts formula yields

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=e^x\) and \(dv = \sin(x)\,dx\text{.}\) This leads us to the following:

The Integration by Parts formula then gives:

It seems we are back right where we started, as the right hand side contains \(\int e^x\cos(x)\,dx\text{.}\) But this is actually a good thing.

Add \(\ds\int e^x\cos(x)\, dx\) to both sides. This gives

Now divide both sides by 2 and then add the integration constant:

\begin{align*} \int e^x\cos(x) \, dx \amp = \frac{1}{2}\big(e^x\sin(x) + e^x\cos(x) \big)+C\text{.} \end{align*}Simplifying a little, our answer is thus

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

Evaluate \(\int \ln(x)\,dx\text{.}\)

One may have noticed that we have rules for integrating the familiar trigonometric functions and \(e^x\text{,}\) but we have not yet given a rule for integrating \(\ln(x)\text{.}\) 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\text{.}\) 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.

Putting this all together in the Integration by Parts formula, things work out very nicely:

The new integral simplifies to \(\int 1\,dx\text{,}\) which is about as simple as things get. Its integral is \(x+C\) and our answer is

### Example 6.2.15. Integrating using Int. by Parts: antiderivative of \(\arctan x\).

Evaluate \(\displaystyle \int \arctan x \,dx\text{.}\)

The same sneaky trick we used above works here. Let \(u=\arctan x\) and \(dv=dx\text{.}\) Then \(du=1/(1+x^2)\,dx\) and \(v=x\text{.}\) The Integration by Parts formula gives

The integral on the right can be solved by substitution. Taking \(w=1+x^2\text{,}\) we get \(dw=2x\,dx\text{.}\) The integral then becomes

The integral on the right evaluates to \(\ln\abs{w}+C\text{,}\) which becomes \(\ln(1+x^2)+C\) (we can drop the absolute values as \(1+x^2\) is always positive). Therefore, the answer is

### 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 \(\ds \int \cos(\ln(x))\, dx\text{.}\)

The integrand contains a composition of functions, leading us to think Substitution would be beneficial. Letting \(u=\ln(x)\text{,}\) we have \(du = 1/x\, dx\text{.}\) This seems problematic, as we do not have a \(1/x\) in the integrand. But consider:

Since \(u = \ln(x)\text{,}\) we can use inverse functions and conclude that \(x = e^u\text{.}\) Therefore we have that

We can thus replace \(\ln(x)\) with \(u\) and \(dx\) with \(e^u\, du\text{.}\) Thus we rewrite our integral as

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:

### 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 \(\displaystyle \int_1^2 x^2 \ln(x) \,dx\text{.}\)

Our mnemonic suggests letting \(u=\ln(x)\text{,}\) hence \(dv =x^2\,dx\text{.}\) We then get \(du = (1/x)\,dx\) and \(v=x^3/3\) as shown below.

The Integration by Parts formula then gives

In general, Integration by Parts is useful for integrating certain products of functions, like \(\int x e^x\,dx\) or \(\int x^3\sin(x)\,dx\text{.}\) 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

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

##### 2.

True

False

##### 3.

For what is “LIATE” useful?

##### 4.

True

False

#### Problems

##### Exercise Group.

Evaluate the given indefinite integral.

###### 5.

\(\ds \int x\sin(x) \, dx\)

###### 6.

\(\ds \int xe^{-x}\, dx\)

###### 7.

\(\ds \int x^2\sin(x) \, dx\)

###### 8.

\(\ds \int x^3\sin(x) \, dx\)

###### 9.

\(\ds \int xe^{x^2}\, dx\)

###### 10.

\(\ds \int x^3e^{x}\, dx\)

###### 11.

\(\ds \int xe^{-2x}\, dx\)

###### 12.

\(\ds \int e^x\sin(x) \, dx\)

###### 13.

\(\ds \int e^{2x}\cos(x) \, dx\)

###### 14.

\(\ds \int {e^{9x}\sin\!\left(4x\right)}\, dx\)

###### 15.

\(\ds \int {e^{2x}\cos\!\left(2x\right)}\, dx\)

###### 16.

\(\ds \int \sin(x) \cos(x) \, dx\)

###### 17.

\(\ds \int {\sin^{-1}\!\left(x\right)}\, dx\)

###### 18.

\(\ds \int {\tan^{-1}\!\left(5x\right)}\, dx\)

###### 19.

\(\ds \int x\tan^{-1}(x) \, dx\)

###### 20.

\(\ds \int {\cos^{-1}\!\left(x\right)}\, dx\)

###### 21.

\(\ds \int x\ln(x) \, dx\)

###### 22.

\(\ds \int {\left(x+7\right)\ln\!\left(x\right)}\, dx\)

###### 23.

\(\ds \int {x\ln\!\left(x-9\right)}\, dx\)

###### 24.

\(\ds \int x\ln(x^2)\, dx\)

###### 25.

\(\ds \int x^2\ln(x) \, dx\)

###### 26.

\(\ds \int \left(\ln(x) \right)^2\, dx\)

###### 27.

\(\ds \int {\ln^{2}\!\left(x-2\right)}\, dx\)

###### 28.

\(\ds \int x\sec^2(x) \, dx\)

###### 29.

\(\ds \int x\csc^2(x) \, dx\)

###### 30.

\(\ds \int {x\sqrt{x+4}}\, dx\)

###### 31.

\(\ds \int {x\sqrt{x^{2}-8}}\, dx\)

###### 32.

\(\ds \int \sec(x) \tan(x) \, dx\)

###### 33.

\(\ds \int x\sec(x) \tan(x) \, dx\)

###### 34.

\(\ds \int x\csc(x) \cot(x) \, dx\)

##### Exercise Group.

Evaluate the indefinite integral after first making a substitution.

###### 35.

\(\ds \int {\sin\!\left(\ln\!\left(x\right)\right)}\, dx\)

###### 36.

\(\ds \int {e^{2x}\sin\!\left(e^{x}\right)}\, dx\)

###### 37.

\(\ds \int {\cos\!\left(\sqrt{x}\right)}\, dx\)

###### 38.

\(\ds \int \ln(\sqrt{x})\, dx\)

###### 39.

\(\ds \int e^{\sqrt{x}}\, dx\)

###### 40.

\(\ds \int e^{\ln(x) }\, dx\)

##### Exercise Group.

Evaluate the definite integral. Note: the corresponding indefinite integral appears in Exercises 6.2.5–6.2.13.

###### 41.

\(\ds \int_0^{2\pi} x\sin(x) \, dx\)

###### 42.

\(\ds \int_{-2}^{1} {xe^{-x}} \, dx\)

###### 43.

\(\ds \int_{-\pi/6}^{\pi/6} {x^{2}\sin\!\left(x\right)} \, dx\)

###### 44.

\(\ds \int_{-\pi/4}^{\pi/4} {x^{3}\sin\!\left(x\right)} \, dx\)

###### 45.

\(\ds \int_{0}^{{\sqrt{\ln\!\left(2\right)}}} {xe^{x^{2}}} \, dx\)

###### 46.

\(\ds \int_0^1 x^3e^{x}\, dx\)

###### 47.

\(\ds \int_{3}^{4} {xe^{-2x}} \, dx\)

###### 48.

\(\ds \int_{0}^{3\pi/2} {e^{x}\sin\!\left(x\right)} \, dx\)

###### 49.

\(\ds \int_{-2\pi}^{2\pi} {e^{2x}\cos\!\left(x\right)} \, dx\)