Integration By Parts
Integration by parts is the integration counterpart to the product rule. When you're faced with an integral that looks like a product of two different types of functions — say, \(x\sin x\) or \(x^2 e^x\) — this is usually the method that cracks it.
The Formula
Start from the product rule for derivatives. If \(u\) and \(v\) are both functions of \(x\):
$$\frac{d}{dx}[uv] = u\frac{dv}{dx} + v\frac{du}{dx}$$
Integrate both sides with respect to \(x\):
$$uv = \int u,dv + \int v,du$$
Rearranging:
$$\boxed{\int u,dv = uv - \int v,du}$$
That's the integration by parts formula. To use it, you split the integrand into two pieces: one you call \(u\), the other \(dv\). You differentiate \(u\) to get \(du\), and integrate \(dv\) to get \(v\). Then you apply the formula.
The goal is to make \(\int v,du\) easier to evaluate than the original integral.
Choosing u and dv — the LIATE Rule
The hardest part of integration by parts is deciding which piece to call \(u\) and which to call \(dv\). A good rule of thumb is LIATE, which lists function types in order of what makes a better \(u\):
| Letter | Function Type | Example |
|---|---|---|
| L | Logarithmic | \(\ln x\) |
| I | Inverse trig | \(\arctan x\) |
| A | Algebraic (polynomial) | \(x^2\), \(x+1\) |
| T | Trigonometric | \(\sin x\), \(\cos x\) |
| E | Exponential | \(e^x\), \(2^x\) |
Choose the function that appears earlier in the list as \(u\). The reasoning: functions near the top (log, inverse trig) become simpler when differentiated, while exponentials and trig functions don't simplify much — they cycle. Polynomials reduce in degree with each differentiation, so they're good \(u\) choices when paired with something integrable.
LIATE is a guideline, not a law. Some problems don't fit neatly, and you'll develop intuition with practice.
Worked Examples
Example 1: \(\int x\cos x,dx\)
The integrand is a product of algebraic (\(x\)) and trig (\(\cos x\)). By LIATE, algebraic comes before trig, so:
$$u = x \qquad dv = \cos x,dx$$ $$du = dx \qquad v = \sin x$$
Apply the formula:
$$\int x\cos x,dx = x\sin x - \int \sin x,dx = x\sin x + \cos x + C$$
Example 2: \(\int xe^x,dx\)
Algebraic before exponential:
$$u = x \qquad dv = e^x,dx$$ $$du = dx \qquad v = e^x$$
$$\int xe^x,dx = xe^x - \int e^x,dx = xe^x - e^x + C = e^x(x-1) + C$$
Example 3: \(\int \ln x,dx\)
This one looks like it can't use integration by parts since there's only one function — but watch what happens when you write \(\ln x = \ln x \cdot 1\):
$$u = \ln x \qquad dv = dx$$ $$du = \frac{1}{x},dx \qquad v = x$$
$$\int \ln x,dx = x\ln x - \int x \cdot \frac{1}{x},dx = x\ln x - \int 1,dx = x\ln x - x + C$$
This trick — pairing a "lonely" function with \(dv = dx\) — also works for \(\arctan x\), \(\arcsin x\), and other inverse trig functions.
Example 4: \(\int x^2 e^x,dx\) (preview of repeated application)
Try once with \(u = x^2\), \(dv = e^x,dx\):
$$du = 2x,dx \qquad v = e^x$$
$$\int x^2 e^x,dx = x^2 e^x - \int 2xe^x,dx = x^2 e^x - 2\int xe^x,dx$$
We still have \(\int xe^x,dx\), but that's just Example 2. Substituting:
$$= x^2 e^x - 2[e^x(x-1)] + C = e^x(x^2 - 2x + 2) + C$$
Repeated Integration by Parts
Some integrals require applying the technique twice (or more). The structure is always the same — work through one round, notice the new integral is still a product, and apply the formula again.
Example 5: \(\int x^2 \sin x,dx\)
Round 1: \(u = x^2\), \(dv = \sin x,dx\):
$$du = 2x,dx \qquad v = -\cos x$$
$$\int x^2\sin x,dx = -x^2\cos x + \int 2x\cos x,dx$$
Round 2: Apply integration by parts to \(\int 2x\cos x,dx\), which is \(2 \int x\cos x,dx\). From Example 1 we know \(\int x\cos x,dx = x\sin x + \cos x + C\). So:
$$\int x^2\sin x,dx = -x^2\cos x + 2(x\sin x + \cos x) + C$$
$$= -x^2\cos x + 2x\sin x + 2\cos x + C$$
The Cycling Trick
Occasionally, repeated application brings you back to the original integral. Consider \(\int e^x\sin x,dx\):
Round 1: \(u = \sin x\), \(dv = e^x,dx\):
$$\int e^x\sin x,dx = e^x\sin x - \int e^x\cos x,dx$$
Round 2: \(u = \cos x\), \(dv = e^x,dx\):
$$\int e^x\cos x,dx = e^x\cos x + \int e^x\sin x,dx$$
Substituting back:
$$\int e^x\sin x,dx = e^x\sin x - \left(e^x\cos x + \int e^x\sin x,dx\right)$$
$$\int e^x\sin x,dx = e^x\sin x - e^x\cos x - \int e^x\sin x,dx$$
$$2\int e^x\sin x,dx = e^x(\sin x - \cos x)$$
$$\int e^x\sin x,dx = \frac{e^x(\sin x - \cos x)}{2} + C$$
The original integral appeared on both sides, so you solve for it algebraically. This cycling behavior always happens with products of exponentials and trig functions.
Practice Problems
1. Find \(\int x\sin x,dx\). Show answer\(u = x\), \(dv = \sin x,dx\), so \(du = dx\), \(v = -\cos x\). Result: \(-x\cos x + \int \cos x,dx = -x\cos x + \sin x + C\).
2. Find \(\int \arctan x,dx\). (Hint: use \(u = \arctan x\), \(dv = dx\).) Show answer\(du = \frac{1}{1+x^2},dx\), \(v = x\). Result: \(x\arctan x - \int \frac{x}{1+x^2},dx\). The remaining integral is \(\frac{1}{2}\ln(1+x^2)\) by substitution. Final answer: \(x\arctan x - \frac{1}{2}\ln(1+x^2) + C\).
3. Find \(\int x^2 e^{3x},dx\). Show answerApply integration by parts twice. Round 1: \(u = x^2\), \(dv = e^{3x},dx\) → \(x^2 \cdot \frac{e^{3x}}{3} - \frac{2}{3}\int xe^{3x},dx\). Round 2 on \(\int xe^{3x},dx\): \(x\cdot\frac{e^{3x}}{3} - \frac{e^{3x}}{9}\). Combining: \(\frac{e^{3x}}{3}\left(x^2 - \frac{2x}{3} + \frac{2}{9}\right) + C\).
4. Find \(\int e^x\cos x,dx\) using the cycling trick. Show answerRound 1: \(u = \cos x\), \(dv = e^x dx\): gives \(e^x\cos x + \int e^x\sin x,dx\). Round 2: \(u = \sin x\), \(dv = e^x dx\): gives \(e^x\sin x - \int e^x\cos x,dx\). Substituting: \(\int e^x\cos x,dx = e^x\cos x + e^x\sin x - \int e^x\cos x,dx\), so \(2\int e^x\cos x,dx = e^x(\cos x + \sin x)\), giving \(\frac{e^x(\cos x + \sin x)}{2} + C\).
5. Find \(\int \ln(x^2),dx\). (Hint: use logarithm properties to simplify first.) Show answer\(\ln(x^2) = 2\ln x\), so the integral is \(2\int \ln x,dx = 2(x\ln x - x) + C = 2x\ln x - 2x + C\).