Integration by parts is used to solve integrals by expressing them in terms of simpler integrals. This is applied in areas like mechanical engineering for calculating work done by variable forces, in physics for solving complex integrals, and in economics for evaluating growth models. Use this resource to learn how to integrate using integration by parts.
If your expression consists of two functions multiplied together, you can integrate this by parts. This is like the product rule in differentiation and can be used on logarithmic, exponential, trigonometric and algebraic functions.
Integration by parts is particularly useful for integrating products of functions, such as when one function is easily differentiable and the other is easily integrable.
The product rule
The formula for integration by parts uses the product rule for differentiation. For any two differentiable functions \(v(x)\) and \(u(x)\), we have:
\[\frac{d}{dx}(v(x)u(x))=v(x)\frac{du(x)}{dx}+u(x)\frac{dv(x)}{dx}\]
Integrating both sides with respect to \(x\) gives:
\[\begin{align*} \int\frac{d}{dx}(v(x)u(x))dx & = \int\left(v(x)\frac{du(x)}{dx}+u(x)\frac{dv(x)}{dx}\right)dx\\
v(x)u(x) & = \int v(x)\frac{du(x)}{dx}dx+\int u(x)\frac{dv(x)}{dx}dx
\end{align*}\]
This can be rearranged to give the product rule for integration:
This is often abbreviated to \(\int vu'dx = vu-\int uv'dx\).
Using the product rule
To help you choose \(v\) and \(u'\), choose \(v\) to be the function that comes first in the following sequence of functions:
logarithmic function
inverse trig function
algebraic function
trigonometric function
exponential function.
\(u'\) is then the other function in the integrand. For example, the integrand in \(\int x\sin(x)dx\) is \(x\sin(x)\). In this case, it is the product of an algebraic function \(x\) and a trigonometric function \(\sin(x)\) so we would set \(v=x\), because algebraic functions are higher on the list than trigonometric functions. Then, \(u'=\sin(x)\).
The hope is that by choosing functions \(v\) and \(u'\) carefully, the integral on the right-hand side is easier than the original integral. If the integral on the right is harder, try swapping \(v\) and \(u'\).
Example 1 – using the product rule
Find \(\int x\cos(x)dx\).
Here, we have an algebraic function \(x\) and a trigonometric function \(\cos(x)\). Since algebraic functions are higher on the list than trigonometric functions, we let \(v=x\) and so \(u'=\dfrac{du}{dx}=\cos(x)\).
Then, \(v'=\dfrac{dv}{dx}=1\) and \(u=\sin(x)\).
Using the formula, we have:
\[\begin{align*} \int x\cos(x)dx & = vu-\int uv'dx\\
& = x\sin(x)-\int(\sin(x))\times1dx\\
& = x\sin(x)+\cos(x)+c,\,c\in\mathbb{R}
\end{align*}\]
If we chose the functions as \(v=\cos(x)\) and \(u'=x\), then \(v'=-\sin(x)\) and \(u=\dfrac{1}{2}x^{2}\). Substituting in the formula will give:
\[\begin{align*} \int x\cos(x)dx & =vu-\int uv'dx\\
& = -\frac{1}{2}x^{2}\sin(x)-\int-\frac{1}{2}x^{2}\sin(x)dx
\end{align*}\]
The integral on the right is harder than the one we began with and we make no progress. If this happens to you, change the selection.
Find \(\int x^{3}\ln(x)dx\).
Here, we have an algebraic function \(x^{3}\) and a logarithmic function \(\ln(x)\). Since logarithmic functions are higher on the list than algebraic functions, we let \(v=\ln(x)\) and so \(u'=\dfrac{du}{dx}=x^{3}\).
Then \(v'=\dfrac{dv}{dx}=\dfrac{1}{x}\) and \(u=\dfrac{1}{4}x^{4}\).
Using the formula, we have:
\[\begin{align*} \int x^{3}\ln(x)dx & = vu-\int uv'dx\\
& = \ln(x)\left(\frac{1}{4}x^{4}\right)-\int\frac{1}{4}x^{4}\left(\frac{1}{x}\right)dx\\
& = \frac{1}{4}x^{4}\ln(x)-\frac{1}{4}\int x^{3}dx\\
& = \frac{1}{4}x^{4}\ln(x)-\frac{1}{4}\frac{1}{4}x^{4}+c,\,c\in\mathbb{R}\\
& = \frac{x^{4}\ln(x)}{4}-\frac{x^{4}}{16}+c
\end{align*}\]
Find \(\int\sin^{-1}(x)dx\).
The integrand seems like it consists of only one function \(\sin^{-1}(x)\). The trick here is to note that the integrand can always be multiplied by \(1\) without change. So, instead of seeing \(\int\sin^{-1}(x)dx\), we see \(\int\sin^{-1}(x)\times1dx\).
We can view \(1\) as the constant value function, which gives the value \(1\) regardless of its argument. That is \(1(x)=1\) for all \(x\in\mathbb{R}\).
The constant value function is algebraic, \((1=x^{0})\) and is lower on the list compared to an inverse trigonometric function like \(\sin^{-1}(x)\).
We set \(v=\sin^{-1}(x)\) and \(\dfrac{du}{dx}=1\), then \(\dfrac{dv}{dx}=\dfrac{1}{\sqrt{1-x^{2}}}\) and \(u=x\).
Substituting in the formula, we get:
\[\begin{align*} \int\sin^{-1}(x)dx & = vu-\int uv'dx\\
& = x\sin^{-1}(x)-\int\frac{x}{\sqrt{1-x^{2}}}dx
\end{align*}\]
The integral on the right-hand side can be evaluated with the substitution \(w=1-x^{2}\) then \(\dfrac{dw}{dx}=-2x\) and \(x=-\dfrac{1}{2}\dfrac{dw}{dx}\), using the substitution rule.
Substituting this result in our integration by parts formula, we get the final result:
\[\begin{align*} \int\sin^{-1}\left(x\right)dx & = vu-\int uv'dx\\
& = x\sin^{-1}(x)-\int\frac{x}{\sqrt{1-x^{2}}}dx\\
& = x\sin^{-1}(x)+\sqrt{1-x^{2}}+c
\end{align*}\]
Repeated use of the product rule
For some integrals, you will need to use the integration by parts technique more than once. For example, consider \(\int x^{2}e^{x}dx\).
We have an algebraic function \(x^{2}\) multiplying an exponential function \(e^{x}\). According to our guide, we set \(v(x)=x^{2}\) and \(u'(x)=e^{x}\). Then, \(\dfrac{dv}{dx}=2x\) and \(u(x)=e^{x}\).
Substituting in the integration by parts formula, we get:
\[\int x^{2}e^{x}dx = x^{2}e^{x}-\int e^{x}(2x)dx\]
The integral on the right-hand side requires another integration by parts. We set \(v(x)=2x\) and \(u'(x)=e^{x}\). Then \(\dfrac{dv}{dx}=2\) and \(u(x)=e^{x}\).
Substituting in the integration by parts formula gives:
\[\begin{align*} \int e^{x}(2x)dx & = 2xe^{x}-\int2e^{x}dx\\
& = 2xe^{x}-2e^{x}+c,\,c\in\mathbb{R}
\end{align*}\]
Now, we substitute this result into the integration by parts formula to get the result:
\[\begin{align*} \int x^{2}e^{x}dx & = x^{2}e^{x}-\int e^{x}(2x)dx\\
& = x^{2}e^{x}-(2xe^{x}-2e^{x}+c)\\
& = x^{2}e^{x}-2xe^{x}+2e^{x}-c\\
& = e^{x}(x^{2}-2x+2)-c
\end{align*}\]
It doesn’t matter if we put \(c\) or \(-c\) as \(c\) is just any constant.