# Calculus/Integration techniques/Integration by Parts

Continuing on the path of reversing derivative rules in order to make them useful for integration, we reverse the product rule.

## Integration by parts

If $y=uv$ where $u$ and $v$ are functions of $x$ , then
    $y'=(uv)'=u'v+uv'$
Rearranging,
    $uv'=(uv)'-u'v$
Therefore,
    $\int uv'dx=\int (uv)'\ dx-\int u'v\ dx$
Therefore,
    $\int uv'\ dx=uv-\int vu'\ dx$
or
    $\int u\ dv=uv-\int v\ du$
This is the integration by-parts formula. It is very useful in many integrals involving products of functions and others.
For instance, to treat
    $\int x\sin(x)dx$
we choose $u=x$ and $dv=\sin(x)dx$ . With these choices, we have $du=dx$ and $v=-\cos(x)$ , and we have
    $\int x\sin(x)dx=-x\cos(x)-\int {\big-\cos(x){\big )}dx=-x\cos(x)+\int \cos(x)dx=\sin(x)-x\cos(x)+C$
Note that the choice of $u$ and $dv$ was critical. Had we chosen the reverse, so that $u=\sin(x)$ and $dv=x\ dx$ , the result would have been
    ${\frac {x^{2}\sin(x)}{2}}-\int {\frac {x^{2}\cos(x)}{2}}dx$
The resulting integral is no easier to work with than the original; we might say that this application of integration by parts took us in the wrong direction.
So the choice is important. One general guideline to help us make that choice is, if possible, to choose $u$ as the factor of the integrated, which becomes simpler when we differentiate it. In the last example, we see that $\sin(x)$ does not become simpler when we differentiate it: $\cos(x)$ is no more straightforward than $\sin(x)$.
An important feature of the integration-by-parts method is that we often need to apply it more than once. For instance, to integrate
    $\int x^{2}e^{x}dx$
we start by choosing $u=x^{2}$ and $dv=e^{x}dx$ to get
    $\int x^{2}e^{x}dx=x^{2}e^{x}-2\int xe^{x}dx$
Note that we still have an integral to take care of, and we do this by applying integration by parts again, with $u=x$ and $dv=e^{x}dx$, which gives us
    $\int x^{2}e^{x}dx=x^{2}e^{x}-2\int xe^{x}dx=x^{2}e^{x}-2(xe^{x}-e^{x})+C=x^{2}e^{x}-2xe^{x}+2e^{x}+C$
So, two applications of integration by parts were necessary, owing to the power of $x^{2}$ in the integrand.
Note that any power of x does become simpler when we differentiate it, so when we see an integral of the form
    $\int x^{n}f(x)dx$
one of our first thoughts ought to be to consider using integration by parts with $u=x^{n}$. Of course, for it to work, we need to be able to write down an antiderivative for $dv$.

### Example

Use integration by parts to evaluate the integral
    $\int e^{x}\sin(x)dx$
Solution: If we let $u=\sin(x)$ and $v'=e^{x}dx$ , then we have $u'=\cos(x)dx$ and $v=e^{x}$ . Using our rule for integration by parts gives
    $\int e^{x}\sin(x)dx=e^{x}\sin(x)-\int e^{x}\cos(x)dx$
We do not seem to have made much progress.
But if we integrate by parts again with $u=\cos(x)$ and $v'=e^{x}dx$ and hence $u'=-\sin(x)dx$ and $v=e^{x}$ , we obtain
    $\int e^{x}\sin(x)dx=e^{x}\sin(x)-e^{x}\cos(x)-\int e^{x}\sin(x)dx$
We may solve this identity to find the anti-derivative of $\sin(x)e^{x}$ and obtain
    $\int e^{x}\sin(x)dx={\frac {e^{x}{\big\sin(x)-\cos(x){\big )}}{2}}+C$

### With definite integral

The rule is essentially the same for definite integrals as long as we keep the endpoints.
   Integration by parts for definite integrals Suppose f and g are differentiable and their derivatives are continuous. Then
       $\int \limits _{a}^{b}f(x)g'(x)dx={\bigf(x)g(x){\big )}{\bigg |}_{a}^{b}-\int \limits _{a}^{b}f'(x)g(x)dx$
       $=f(b)g(b)-f(a)g(a)-\int \limits _{a}^{b}f'(x)g(x)dx$ .
This can also be expressed in Leibniz notation.
       $\int \limits _{a}^{b}u\ dv=(uv){\Big |}_{a}^{b}-\int \limits _{a}^{b}v\ du.$

### More Examples

Examples Set 1: Integration by Parts

## Exercises

Evaluate the following using integration by parts.
$\int -4\ln(x)dx$
$4x-4x\ln(x)+C$
$4x-4x\ln(x)+C$
$\int (38-7x)\cos(x)dx$
$(38-7x)\sin(x)-7\cos(x)+C$
$(38-7x)\sin(x)-7\cos(x)+C$
$\int \limits _{0}^{\tfrac {\pi }{2}}(-6x+45)\cos(x)dx$
$51-3\pi$
$51-3\pi$
$\int (5x+1)(x-6)^{4}dx$
${\frac {(5x+1)(x-6)^{5}}{5}}-{\frac {(x-6)^{6}}{6}}+C$
${\frac {(5x+1)(x-6)^{5}}{5}}-{\frac {(x-6)^{6}}{6}}+C$
$\int \limits _{-1}^{1}(2x+8)^{3}(2-x)dx$
$1916.8$
$1916.8$
Solutions

# External links

* Videos and exercises on integration by parts at Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References