# Integration by Parts

The purpose of integration by parts is to replace a difficult integral with one that is easier to evaluate. The formula that allows us to do this is \(\int u\, dv=uv-\int v\,du.\)

#### Contents

## Summary

Suppose we are trying to do the integration \(\int xe^x\,dx.\) We notice that u-substitution cannot be used, since neither \(x\) nor \(e^x\) are close to being the derivative of the other. A function which is the product of two different kinds of functions, like \(xe^x,\) requires a new technique in order to be integrated, which is **integration by parts**. The rule is as follows:

\[\int u \, dv=uv-\int v \, du. \ _\square\]

This might look confusing at first, but it's actually very simple. Let's take a look at its proof and find out how easy and convenient it is.

Remember the product rule? It is the rule for differentiating the product of two functions, expressed in terms of

\[\left(f(x)g(x)\right)'=f'(x)g(x)+f(x)g'(x).\]

Integration by parts is exactly its antiderivative form. Integrating both sides gives

\[\begin{align} f(x)g(x)&=\int f'(x)g(x)dx+\int f(x)g'(x)dx\\ \Rightarrow \int f(x)g'(x)dx&=f(x)g(x)-\int f'(x)g(x)dx. \end{align}\]

Let \(u=f(x)\) and \(v=g(x).\) Then we have a more compact expression:

\[\begin{align} \int f(x)g'(x)dx&=f(x)g(x)-\int f'(x)g(x)dx\\ \Rightarrow \int udv &=uv-\int vdu.\ _\square \end{align}\]

Now that we know the rule, let's find the answer to the example above.

## What is \(\displaystyle{\int xe^xdx}?\)

Let \(u=x\) and \(v'=e^x.\) Then we have

\[\begin{align} u'&=1\\ v&=\int e^xdx=e^x\\ \Rightarrow \int xe^xdx&=\int udv\\ &=uv-\int vdu\\ &=xe^x-\int e^x\cdot1dx\\ &=xe^x-e^x+C, \end{align}\]

where \(C\) is the constant of integration. \(_\square\)

## Integration by Parts - Basic

As shown in the example above, we let one factor be \(u\) and the other \(v'\) (or \(dv\)). Then our given problem will be \(\displaystyle{\int u \, dv},\) and we can apply the rule of integration by parts. So then, what is the criterion to determine which of the factors will be \(u?\) Why can't we let \(u=e^x\) and \(v'=x?\) There is a rule to this too: Since \(v'\) is to be integrated, let \(v'\) be the easier to integrate. *Easier* means that the function changes less after integration. For instance, an exponential function, say \(e^x,\) is easy to integrate, since it doesn't change at all after integration. A trigonometric function will change to its counterpart. For instance, \(\sin x\) will change to \(-\cos x.\) Logarithmic functions are the most difficult to integrate. Here is an explicit demonstration of the rule:

\[\begin{align} &&\text{Logs} &&\text{Polynomials} &&\text{Trigs} &&\text{Exponentials}\\ &&u\ \ \ \ &&\cdots\ \ \ \ \ \ &&\cdots\ \ &&v'\ \ \ \ \ \ \end{align}\]

The further to the right, the better to put as \(v',\) and the more on the left, the better to put as \(u.\) Let's see a few more examples.

## Evaluate \(\displaystyle\int xe^x\, dx.\ \)

\(x\) has a pretty simple derivative, so let's say \(u=x\). Then \(dv=e^x \, dx, du=dx\), and \(v=\displaystyle\int dv=e^x\), which implies \[\displaystyle\int xe^x\; dx=(x)(e^x)-\displaystyle\int (e^x)(dx)=xe^x-e^x + C=e^x(x-1) + C.\]

where C is the constant of integration. You can take the derivative to see that it is indeed our desired result. \(_\square\)

Find the indefinite integral \(\displaystyle{\int x\sin x \, dx.}\)

According to the rule above, we should let \(u=x\) and \(v'=\sin x.\) Then we have

\[\begin{align} u'&=1\\ v&=-\cos x\\ \Rightarrow\int x\sin x \, dx&=\int u \, dv\\ &=uv-\int v \, du\\ &=-x\cos x-\int (-\cos x)\cdot1 \, dx\\ &=-x\cos x+\sin x+C, \end{align}\]

where \(C\) is the constant of integration. \(_\square\)

Find the indefinite integral \(\displaystyle{\int x^2\cos x \, dx.}\)

According to the rule above, we should let \(u=x^2\) and \(v'=\cos x.\) Then we have

\[\begin{align} u'&=2x\\ v&=\sin x\\ \Rightarrow\int x^2\cos x \, dx&=\int u \, dv\\ &=uv-\int v \, du\\ &=x^2\sin x-\int 2x\sin xdx. \end{align}\]

We know what \(\displaystyle{\int x\sin xdx}\) is from

Example Question 1(otherwise, we would have to use integration by parts one more time). Therefore, we have\[x^2\sin x-\int 2x\sin xdx=x^2\sin x+2x\cos x-2\sin x+C,\]

where \(C\) is the constant of integration.

Notice that we needed to use integration by parts twice to solve this problem. \(_\square\)

Find the indefinite integral \(\displaystyle{\int xe^{2x} \, dx.}\)

According to the rule above, we should let \(u=x\) and \(v'=e^{2x}.\) Then we have

\[\begin{align} u'&=1\\ v&=\frac{1}{2}e^{2x}\\ \Rightarrow\int xe^{2x} \, dx&=\int u \, dv\\ &=uv-\int v \, du\\ &=\frac{1}{2}xe^{2x}-\int \frac{1}{2}e^{2x} \, dx\\ &=\frac{1}{2}xe^{2x}-\frac{1}{4}e^{2x}+C, \end{align}\]

where \(C\) is the constant of integration. \(_\square\)

Find the indefinite integral \(\displaystyle{\int \ln x\,dx.}\)

This one needs a trick. Think of \(\ln x\) as \(1\cdot\ln x.\) Then, according to the rule above, we should let \(u=\ln x\) and \(v'=1.\) Then we have

\[\begin{align} u'&=\frac{1}{x}\\ v&=x\\ \Rightarrow\int \ln x \, dx&=\int u \, dv\\ &=uv-\int v \, du\\ &=x\ln x-\int x\cdot\frac{1}{x} \, dx\\ &=x\ln x-x+C, \end{align}\]

where \(C\) is the constant of integration.

This one will appear very frequently, so memorizing \(\displaystyle{\int\ln x\,dx=x\ln x-x+C}\) is highly recommended. \(_\square\)

## Integration by Parts - Intermediate

Find the indefinite integral \(\displaystyle{\int x\ln x\,dx.}\)

According to the rule above, we should let \(u=\ln x\) and \(v'=x.\) Then we have

\[\begin{align} u'&=\frac{1}{x}\\ v&=\frac{1}{2}x^2\\ \Rightarrow\int x\ln x \, dx&=\int u \, dv\\ &=uv-\int v \, du\\ &=\frac{1}{2}x^2\ln x-\int \frac{1}{2}x^2\cdot\frac{1}{x} \, dx\\ &=\frac{1}{2}x^2\ln x-\int\frac{1}{2}x \, dx\\ &=\frac{1}{2}x^2\ln x-\frac{1}{4}x^2+C, \end{align}\]

where \(C\) is the constant of integration. \(_\square\)

## Integration by Parts - Advanced

## Evaluate \( \displaystyle\int \arcsin 3x \,dx. \)

Let \(u=\arcsin 3x\) and \(dv=dx,\) then \(du = \dfrac{3\, dx}{\sqrt{1-(3x)^{2}}} \) and \(v=x,\) which implies that the given expression is

\[\displaystyle\int \arcsin 3x \,dx = \displaystyle x \arcsin 3x - \int \dfrac{3x}{\sqrt{1-9x^{2}}} \, dx. \qquad (1)\]

Let \( a= 1-9x^{2}\) and \(\dfrac{da}{-18x} = dx ,\) then \((1)\) is equivalent to

\[\begin{align} \displaystyle x \arcsin 3x + \dfrac{1}{6} \int \dfrac{da}{\sqrt{a}} &= \displaystyle x \arcsin 3x + \dfrac{1}{3} \sqrt{a} + C \\ & = \displaystyle x \arcsin 3x + \dfrac{1}{3} \sqrt{1-9x^{2}} + C, \end{align} \] where \(C\) is the constant of integration. \(_\square\)

## See Also

**Cite as:**Integration by Parts.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/integration-by-parts/