back to the math tutorial index back to the math tutorial index

Integration by Parts

We will use the Product Rule for derivatives to derive a powerful integration formula:

  • Start with $(f(x)g(x))'=f(x)g'(x)+f'(x)g(x)$.
  • Integrate both sides to get $\displaystyle f(x)g(x)=\int\! f(x)g'(x)\, dx +\int\! f'(x)g(x)\, dx$. (We need not include a constant of integration on the left, since the integrals on the right will also have integration constants.)
  • Solve for $\displaystyle\int\! f(x)g'(x)\, dx$, obtaining \[\int f(x)g'(x)\, dx=f(x)g(x)-\int f'(x)g(x)\, dx.\]
This formula frequently allows us to compute a difficult integral by computing a much simpler integral. We often express the Integration by Parts formula as follows:

Let \[ \begin{array}{ll} u = f(x)\qquad\qquad & dv = g'(x)\, dx\\ du = f'(x)\, dx & v = g(x) \end{array} \] Then the formula becomes \[\int u\, dv=uv-\int v\, du.\] To integrate by parts, strategically choose $u$, $dv$ and then apply the formula.

Example

Let's evaluate $\displaystyle\int\! xe^x\, dx$.

Let \[ \begin{array}{ll} u = x \qquad\qquad & dv = e^x\, dx\\ du = dx & v = e^x \end{array} \] Then by integration by parts, \begin{eqnarray*} \int xe^x&=&xe^x-\int e^x\, dx\\ &=&xe^x-e^x+C. \end{eqnarray*}

A Faulty Choice         A Reduction Formula

Integration by parts "works" on definite integrals as well: \[\int^b_a u\, dv=\left.uv\right|^b_a-\int^b_a v\, du.\]

Example

We will evaluate $\displaystyle\int^1_0\! \arctan (x)\, dx$.

Let \[ \begin{array}{ll} u = \arctan(x) \qquad\qquad & dv = dx\\ du = \displaystyle\frac{1}{1+x^2}\, dx & v = x \end{array} \] Then by integration by parts, \begin{eqnarray*} \int^1_0 \arctan(x)&=&\left.x\arctan(x)\right|^1_0-\int^1_0 \frac{x}{1+x^2}\, dx\\ &=&\left.x\arctan(x)\right|^1_0-\left.\frac{1}{2}\ln (1+x^2)\right|^1_0\\ &=&\left(\frac{\pi}{4}-0\right)-\left(\frac{1}{2} \ln (2)-0\right)\\ &=&\frac{\pi}{4}-\ln (\sqrt{2}). \end{eqnarray*} Sometimes it is necessary to integrate twice by parts in order to compute an integral:

Example

Let's compute $\displaystyle\int\! e^x\cos x\, dx$.

Let \[ \begin{array}{ll} u = e^x\qquad\qquad & dv = \cos x\, dx\\ du = e^x\, dx & v = \sin x \end{array} \] Then $\displaystyle\int\! e^x\cos x\, dx=e^x\sin x-\int\! e^x\sin x\, dx$.

It is not clear yet that we've accomplished anything, but now let's integrate the integral on the right-hand side by parts:

Now let \[ \begin{array}{ll} u = e^x\qquad\qquad & dv = \sin x\, dx\\ du = e^x\, dx & v = -\cos x \end{array} \] So $\displaystyle\int\! e^x\sin x\, dx=-e^x\cos x+\int e^x\cos x\, dx$.

Substituting this into $\displaystyle\int\! e^x\cos x\, dx=e^x\sin x-\int\! e^x\sin x\, dx$, \begin{eqnarray*} \int e^x\cos x\, dx&=&e^x\sin x-\left[-e^x\cos x+\int e^x\cos x\, dx\right]\\ &=&e^x\sin x+ e^x\cos x -\int e^x\cos x\, dx. \end{eqnarray*} The integal $\displaystyle\int\! e^x\cos x\, dx$ appears on both sides on the equation, so we can solve for it: \[2\int e^x\cos x\, dx=e^x\sin x+e^x\cos x.\] Finally, \[\int e^x\cos x\, dx =\frac{1}{2}e^x\sin x+\frac{1}{2}e^x\cos x +C.\]

Check by Differentiating

Key Concept

\[\int u\, dv=uv-\int v\, du.\]
  • Choose $u$, $dv$ in such a way that:
    1. $u$ is easy to differentiate.
    2. $dv$ is easy to integrate.
    3. $\displaystyle\int\! v\, du$ is easier to compute that $\displaystyle\int\! u\, dv$.
  • Sometimes it is necessary to integrate by parts more than once.