Integration by Parts
Integration by parts handles products where substitution fails, like x·eˣ or x·cos x, and single functions like ln x. This guide derives the formula, gives a rule of thumb for choosing u, and shows repeated use.
The product rule says \((uv)' = u'v + uv'\). Integrating and rearranging gives \(\displaystyle\int u\,dv = uv - \int v\,du\). The goal is to pick \(u\) so that \(du\) is simpler than \(u\), and \(dv\) so that \(v\) is easy to find, making the new integral easier than the old one. A common order for choosing \(u\) is: logarithms, inverse trig, algebraic (powers of x), trig, exponential.
1The formula
Integrate the product rule \(\frac{d}{dx}[uv] = u\frac{dv}{dx} + v\frac{du}{dx}\): \(uv = \int u\,dv + \int v\,du\). Solve for \(\int u\,dv\).
\(\displaystyle\int xe^x\,dx\)
- 1Choose \(u = x\) (it gets simpler when differentiated) and \(dv = e^x\,dx\).
- 2Then \(du = dx\) and \(v = e^x\).
- 3\(\displaystyle\int u\,dv = uv - \int v\,du = xe^x - \int e^x\,dx = xe^x - e^x\).
“Let \(u = x\) and \(dv = e^x\,dx\), so \(du = dx\) and \(v = e^x\). Then \(\displaystyle\int xe^x\,dx = xe^x - \int e^x\,dx = xe^x - e^x + C\).”
2Choosing u and dv
| Choose u from earlier in this list | Example |
|---|---|
| Logarithms | \(\ln x\) |
| Inverse trig | \(\arctan x\), \(\arcsin x\) |
| Algebraic (powers of x) | \(x\), \(x^2\) |
| Trig | \(\cos x\), \(\sin x\) |
| Exponential | \(e^x\) |
\(\displaystyle\int x\cos x\,dx\)
- 1\(u = x\), \(dv = \cos x\,dx\); \(du = dx\), \(v = \sin x\).
- 2\(x\sin x - \int\sin x\,dx = x\sin x + \cos x\).
\(\displaystyle\int \ln x\,dx\)
- 1There is no basic antiderivative for \(\ln x\), but its derivative is simple. Write it as \(\ln x \cdot 1\): \(u = \ln x\), \(dv = dx\).
- 2\(du = \frac1x\,dx\), \(v = x\). So \(x\ln x - \int x \cdot \frac1x\,dx = x\ln x - x\).
\(\displaystyle\int \arctan x\,dx\)
- 1\(u = \arctan x\), \(dv = dx\); \(du = \frac{1}{1 + x^2}dx\), \(v = x\).
- 2\(x\arctan x - \displaystyle\int\frac{x}{1 + x^2}dx\). The last integral is a substitution with \(w = 1 + x^2\): \(\frac12\ln(1 + x^2)\).
In \(\int x\cos x\,dx\), choosing \(u = \cos x\), \(dv = x\,dx\) gives \(\frac{x^2}{2}\cos x + \int\frac{x^2}{2}\sin x\,dx\), a harder integral than the one you started with. If the new integral is worse, swap the choices.
3Using it more than once
\(\displaystyle\int x^2e^x\,dx\)
- 1\(u = x^2\), \(dv = e^x\,dx\): \(x^2e^x - \int 2xe^x\,dx\).
- 2The new integral is Worked Example 1 times 2: \(2(xe^x - e^x)\).
- 3Combine: \(x^2e^x - 2xe^x + 2e^x\).
The second application sits inside a minus sign: \(x^2e^x - \left[2xe^x - \int 2e^x\,dx\right]\). Distributing the minus correctly gives \(+2e^x\) at the end. Keep brackets until the last step.
4Definite integrals
\(\displaystyle\int_0^1 xe^x\,dx\)
- 1\(\left[xe^x - e^x\right]_0^1 = (e - e) - (0 - 1) = 1\).
With limits, both pieces get evaluated: \(\displaystyle\int_a^b u\,dv = \Big[uv\Big]_a^b - \int_a^b v\,du\). Forgetting to evaluate \(uv\) at the limits is a common slip.
Quick reference
| Integral | Result |
|---|---|
| \(\int xe^x\,dx\) | \(xe^x - e^x + C\) |
| \(\int x\cos x\,dx\) | \(x\sin x + \cos x + C\) |
| \(\int \ln x\,dx\) | \(x\ln x - x + C\) |
| \(\int x^2e^x\,dx\) | \(e^x(x^2 - 2x + 2) + C\) |
| \(\int \arctan x\,dx\) | \(x\arctan x - \frac12\ln(1 + x^2) + C\) |