4.4 Integration by Parts
The product rule run backwards — trade a hard integral for an easier one, choosing $u$ with LIATE.
By now we can evaluate many basic integrals. Yet although $\displaystyle\int x\sin\left(x^2\right)dx$ yields to the substitution $u=x^2$, something as simple-looking as $\displaystyle\int x\sin x\,dx$ defies us. There is no product rule for integration — but there is a technique based on the product rule for differentiation that lets us exchange one integral for another. We call it integration by parts.
The Integration-by-Parts Formula
If $h(x)=f(x)g(x)$, the product rule gives $h^\prime(x)=f^\prime(x)g(x)+f(x)g^\prime(x)$. Integrating both sides, $$\int h^\prime(x)\,dx=\int\left(f^\prime(x)g(x)+f(x)g^\prime(x)\right)dx,$$ so $$h(x)=f(x)g(x)=\int g(x)f^\prime(x)\,dx+\int f(x)g^\prime(x)\,dx.$$ Solving for $\displaystyle\int f(x)g^\prime(x)\,dx$: $$\int f(x)g^\prime(x)\,dx=f(x)g(x)-\int g(x)f^\prime(x)\,dx.$$ With $u=f(x)$ and $v=g(x)$, so that $du=f^\prime(x)\,dx$ and $dv=g^\prime(x)\,dx$, we get the compact form below.
1. A poor choice. Had we chosen $u=\sin x$ and $dv=x\,dx$, then $du=\cos x\,dx$ and $v=\tfrac12x^2$, giving $$\int x\sin x\,dx=\frac12x^2\sin x-\int\frac12x^2\cos x\,dx.$$ The new integral is worse than the original (the power of $x$ went up). We may need to try several choices before finding one that works.
2. No constant in $v$. Using $v=-\cos x+K$ instead: $$\begin{aligned}\int x\sin x\,dx&=(x)(-\cos x+K)-\int(-\cos x+K)(1\,dx)\\&=-x\cos x+Kx+\sin x-Kx+C=-x\cos x+\sin x+C.\end{aligned}$$ The $K$ cancels, so we may always take the simplest $v$. (Interactive 1 uses $v=1-\cos x$, i.e. $K=1$, and gets the same answer.)
3. Always check by differentiating the result.
Choose $u$ to be the function type that appears first in this list; $dv$ is everything else, together with $dx$.
Logarithmic
$\ln x$
Inverse trig
$\tan^{-1}x$
Algebraic
$x^2,\ \sqrt x$
Trigonometric
$\sin x$
Exponential
$e^{3x}$
Why it works. Whatever we pick as $dv$ must be something we can integrate. We have no simple formulas to integrate $\ln x$ or $\tan^{-1}x$ on their own, so they belong at the head of the list as choices for $u$ (LI — or IL; they rarely appear together). Exponential and trigonometric functions are easy to integrate and make good $dv$'s, so they sit at the end (TE — or ET; when both appear it usually doesn't matter which is $u$). Algebraic functions are easy both to differentiate and integrate, so they sit in the middle.
In Example 1 the integrand has an algebraic factor $x$ and a trigonometric factor $\sin x$; A comes before T, so $u=x$.
Exercises
- 1 $\displaystyle\int x\cos x\,dx$
- 2 $\displaystyle\int xe^{4x}dx$
- 3 $\displaystyle\int x^2e^x\,dx$
- 4 $\displaystyle\int xe^{-x}dx$
- 5 $\displaystyle\int x\sin2x\,dx$
- 6 $\displaystyle\int x\cos3x\,dx$
- 7 $\displaystyle\int x\sec^2x\,dx$
- 8 $\displaystyle\int x^2\cos x\,dx$
- 9 $\displaystyle\int x^2\ln x\,dx$
- 10 $\displaystyle\int\ln x\,dx$
- 11 $\displaystyle\int e^x\sin x\,dx$
- 12 $\displaystyle\int e^x\cos x\,dx$
- 13 $\displaystyle\int\tan^{-1}x\,dx$
- 14 $\displaystyle\int\sin^{-1}x\,dx$
- 1 $\displaystyle\int xe^x\,dx$
- 2 $\displaystyle\int x^2e^{-x}\,dx$
- 3 $\displaystyle\int x\ln x\,dx$
- 4 $\displaystyle\int\ln(2x)\,dx$
- 5 $\displaystyle\int\sqrt x\,\ln x\,dx$
- 6 $\displaystyle\int(\ln x)^2\,dx$
- 7 $\displaystyle\int x\tan^{-1}x\,dx$
- 8 $\displaystyle\int e^{2x}\sin x\,dx$
- 9 $\displaystyle\int e^{-x}\cos x\,dx$
- 10 $\displaystyle\int x^3e^{x^2}dx$ (hint: substitute $w=x^2$ first)
- 1 $\displaystyle\int_0^{\pi}x\sin x\,dx$
- 2 $\displaystyle\int_0^1xe^{2x}dx$
- 3 $\displaystyle\int_1^ex\ln x\,dx$
- 4 $\displaystyle\int_0^1x^2e^x\,dx$
- 5 $\displaystyle\int_0^{\pi/2}e^x\cos x\,dx$
- 6 Use LIATE to choose $u$, then evaluate $\displaystyle\int x^3\ln x\,dx$.
- 7 Use LIATE to choose $u$, then evaluate $\displaystyle\int x\,2^x\,dx$.
- 8 Conceptual. For $\displaystyle\int xe^x\,dx$ a student chooses $u=e^x$, $dv=x\,dx$. Write the resulting new integral and explain why this choice fails.
- 9 Applied. A particle moves with velocity $v(t)=te^{-t}$ m/s. Find the distance it travels during $0\le t\le2$.
- 10 Applied. Find the area of the region bounded by $y=\ln x$, the $x$-axis, and the line $x=e^2$.
Research question. What is an income stream that grows over time worth today?
Why it matters. Financial analysts and banks use present value integrals to value businesses, loans and investment projects.
What to do.
- Sample case: a small shop in Nizwa earns income at rate $1000\,t$ OMR per year ($t$ in years) for 5 years; the discount rate is $r=0.05$.
- Using integration by parts, show $\int_0^T t\,e^{-rt}dt=\frac{1-e^{-rT}(1+rT)}{r^2}$.
- Compute the present value $PV=1000\int_0^5 t\,e^{-0.05t}dt$.
- Check with a spreadsheet: add monthly amounts discounted by $e^{-rt}$. Compare with the total without discount ($12\,500$ OMR).
Tools: Calculator, spreadsheet
Hand in: A half-page note: the exact and spreadsheet values, the effect of discounting, and one limitation.
Going further. Anywhere: change $r$ to your country's typical interest rate and compare.
🧪 Self-check quiz
Q1. Integration by parts comes from reversing which rule?
Q2. For $\displaystyle\int x^3\ln x\,dx$, LIATE says $u=$
Q3. For $\displaystyle\int xe^{2x}dx$ with $u=x$, $v=$
Q4. $\displaystyle\int\ln x\,dx=$
Q5. How many applications of parts does $\displaystyle\int x^2e^{3x}dx$ need?