Step 23: Integration by Parts and Partial Fractions
- AP students: this whole step is AP BC only (topics 6.11 to 6.13). AP Calculus AB does not test integration by parts, partial fractions or improper integrals. Cambridge 9709 Paper 3 and IB AA HL do test parts and partial fractions.
- Integration by parts undoes the product rule: \( \int u\,\frac{dv}{dx}\,dx = uv-\int v\,\frac{du}{dx}\,dx \). Choose as \( u \) the factor that gets simpler when you differentiate it.
- Partial fractions split a fraction such as \( \frac{x + 7}{(x-1)(x + 3)} \) into \( \frac{2}{x-1}-\frac{1}{x + 3} \), and each piece integrates to a logarithm.
- Exam point: an improper integral is a limit. Replace \( \infty \) (or the bad point) by a letter, integrate, then take the limit in writing. “\( \frac{1}{\infty} = 0 \)” earns no credit.
Integration by parts: the product rule in reverse
Substitution (Step 22) handles a function of a function, where the derivative of the inside is sitting next to it. Now consider a product of two unrelated functions, such as \( x\cos 3x \) or \( x^2\ln x \). Neither factor is the derivative of anything inside the other, so substitution has nothing to grip. The product rule, run backwards, does.
The product rule says \( \dfrac{d}{dx}(uv) = u\dfrac{dv}{dx} + v\dfrac{du}{dx} \). Integrate both sides with respect to \( x \) and rearrange:
The formula does not finish the integral; it trades it. You give up \( \int u\,v’\,dx \) and take on \( \int v\,u’\,dx \) instead. The trade is worth making when differentiating \( u \) makes it simpler and you can integrate \( v’ \).
Find \( \int x\cos 3x\,dx \).
So \( \int x\cos 3x\,dx = \tfrac13x\sin 3x + \tfrac19\cos 3x + C \). Differentiate to check: \( \tfrac13\sin 3x + x\cos 3x-\tfrac13\sin 3x = x\cos 3x \).
Find the exact value of \( \int_1^e x^2\ln x\,dx \).
The same idea finds \( \int \ln x\,dx \) itself: write it as \( \int 1 \times \ln x\,dx \) with \( u = \ln x \) and \( \frac{dv}{dx} = 1 \), which gives \( x\ln x-x + C \).
Choosing u, repeated parts and the loop
Pick as \( u \) the factor that gets simpler when differentiated, and make sure you can integrate the other one. A handy guide is LIATE: take as \( u \) whichever factor comes first in the list Logarithmic, Inverse trigonometric, Algebraic, Trigonometric, Exponential. Logarithms come first because you can differentiate \( \ln x \) easily but cannot integrate it without parts; exponentials come last because they integrate without any fuss.
| Integral | \( u \) | \( \frac{dv}{dx} \) | Why |
|---|---|---|---|
| \( \int x e^{2x}\,dx \) | \( x \) | \( e^{2x} \) | \( x \) drops to 1 |
| \( \int x^3\ln x\,dx \) | \( \ln x \) | \( x^3 \) | \( \ln x \) cannot be integrated directly |
| \( \int \tan^{-1} x\,dx \) | \( \tan^{-1} x \) | \( 1 \) | its derivative \( \frac{1}{1 + x^2} \) is algebraic |
| \( \int x^2\sin x\,dx \) | \( x^2 \) | \( \sin x \) | two rounds remove the \( x^2 \) |
LIATE is a guide, not a law. What matters is that \( v \) can be found and the new integral is easier than the old one. If the trade makes things worse, swap the roles of \( u \) and \( \frac{dv}{dx} \).
With \( x^2 \) as \( u \), one round of parts lowers the power to \( x \), and a second round removes it. Keep the same type of choice in round two.
Find \( \int x^2 e^{3x}\,dx \).
Factorised, the answer is \( \tfrac{1}{27}e^{3x}(9x^2-6x + 2) + C \).
Sometimes neither factor ever simplifies. The derivatives of \( \cos x \) cycle through \( -\sin x \), \( -\cos x \), and so on, and \( e^{2x} \) just stays an exponential. Yet after two rounds the original integral comes back, and you can solve for it as if it were an unknown. Call it \( I = \int e^{2x}\cos x\,dx \). With \( u = e^{2x} \) both times, the first round gives \( I = e^{2x}\sin x-2\int e^{2x}\sin x\,dx \), and the second gives \( \int e^{2x}\sin x\,dx = -e^{2x}\cos x + 2I \). Substituting back, \( I = e^{2x}\sin x + 2e^{2x}\cos x-4I \), so \( 5I = e^{2x}(\sin x + 2\cos x) \) and
An economics example: the present value of a growing income. A business expects income at a rate \( R(t) = 50 + 10t \) thousand dollars per year, \( t \) years from now. Money received at time \( t \) is worth \( e^{-rt} \) times as much today, so with a discount rate of 5% the present value of the next 10 years is
This is a polynomial times an exponential, so use parts with \( u = 50 + 10t \) and \( \frac{dv}{dt} = e^{-0.05t} \), giving \( v = -20e^{-0.05t} \). Then the antiderivative is \( -20(50 + 10t)e^{-0.05t} + \int 200e^{-0.05t}\,dt = -e^{-0.05t}(5000 + 200t) \). Evaluating from 0 to 10 gives \( PV = 5000-7000e^{-0.5} \approx 754.3 \), or about $754,000. The income itself totals \( \int_0^{10}(50 + 10t)\,dt = 1000 \), so waiting costs almost a quarter of its value (Figure 1). The same calculation underlies the net present value of any investment project with a continuous income stream.
Partial fractions
You can add \( \dfrac{2}{x-1}-\dfrac{1}{x + 3} \) to get \( \dfrac{x + 7}{(x-1)(x + 3)} \). For integration you need the reverse. The single fraction matches no rule, but each simple piece integrates to a logarithm. Splitting a fraction in this way is called expressing it in partial fractions.
| Denominator (fraction must be proper) | Form of the partial fractions |
|---|---|
| \( (ax + b)(cx + d) \) | \( \dfrac{A}{ax + b} + \dfrac{B}{cx + d} \) |
| \( (ax + b)(cx + d)^2 \) | \( \dfrac{A}{ax + b} + \dfrac{B}{cx + d} + \dfrac{C}{(cx + d)^2} \) |
| \( (ax + b)(x^2 + c^2) \) | \( \dfrac{A}{ax + b} + \dfrac{Bx + C}{x^2 + c^2} \) |
To find the constants, multiply through by the denominator to get an identity, substitute values of \( x \) that make factors zero, and compare coefficients for anything left over.
Express \( \dfrac{x + 7}{(x-1)(x + 3)} \) in partial fractions, and hence find the exact value of \( \displaystyle\int_2^3 \frac{x + 7}{(x-1)(x + 3)}\,dx \).
This is exactly the level of AP BC topic 6.12: two distinct linear factors, then logarithms.
(Cambridge 9709 Paper 3 level.) Express \( \dfrac{3x^2 + 3x + 3}{(x + 2)(x-1)^2} \) in partial fractions, and hence find the exact value of \( \displaystyle\int_2^4 \frac{3x^2 + 3x + 3}{(x + 2)(x-1)^2}\,dx \).
The answer is \( 2 + \ln\tfrac{27}{2} \approx 4.60 \).
Improper integrals
Can a region that stretches forever have a finite area? Sometimes. An improper integral has an infinite interval, or an integrand that is unbounded somewhere in the interval. You do the integral on a safe interval, then take a limit.
Evaluate \( \int_0^\infty x e^{-x}\,dx \).
The integral converges to 1 (Figure 2).
Evaluate \( \int_0^1 \ln x\,dx \).
The integral converges to \( -1 \). It is negative because \( \ln x < 0 \) on \( (0, 1) \): the region lies below the axis.
Improper integrals value things that never end. A perpetual bond, or a plot of land, pays \( R \) dollars a year forever. With continuous discounting at rate \( r \), its value today is \( \int_0^\infty Re^{-rt}\,dt = \lim_{b \to \infty}\frac{R}{r}(1-e^{-rb}) = \frac{R}{r} \). Payments of $6,000 a year at \( r = 0.03 \) are worth \( \frac{6000}{0.03} = \$200{,}000 \). Halve the interest rate and the value doubles, which is why land and long bonds are so sensitive to interest rates.
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. Find \( \int x e^x\,dx \). Show worked answer
\( \int x e^x\,dx = x e^x-\int e^x\,dx \).
\( = x e^x-e^x + C = (x-1)e^x + C \).
EasyQ2. Express \( \dfrac{5}{(x-2)(x + 3)} \) in partial fractions. Show worked answer
\( x = 2 \): \( 5 = 5A \), so \( A = 1 \). \( x = -3 \): \( 5 = -5B \), so \( B = -1 \).
\( \dfrac{5}{(x-2)(x + 3)} = \dfrac{1}{x-2}-\dfrac{1}{x + 3} \).
MediumQ3. Find the exact value of \( \int_0^{\pi/2} x\sin x\,dx \). Show worked answer
\( \int x\sin x\,dx = -x\cos x + \int \cos x\,dx = -x\cos x + \sin x \).
\( \Big[-x\cos x + \sin x\Big]_0^{\pi/2} = (0 + 1)-(0 + 0) = 1 \).
MediumQ4. Find \( \int \dfrac{4x + 1}{(x + 1)(x-2)}\,dx \). Show worked answer
\( x = -1 \): \( -3 = -3A \), so \( A = 1 \). \( x = 2 \): \( 9 = 3B \), so \( B = 3 \).
\( \int \left(\dfrac{1}{x + 1} + \dfrac{3}{x-2}\right)dx = \ln|x + 1| + 3\ln|x-2| + C \).
MediumQ5. Decide whether each integral converges, and evaluate it if it does: (a) \( \int_1^\infty \dfrac{4}{x^3}\,dx \), (b) \( \int_1^\infty \dfrac{1}{\sqrt{x}}\,dx \). Show worked answer
(b) \( \int_1^b x^{-1/2}\,dx = 2\sqrt{b}-2 \to \infty \). Diverges (a p-integral with \( p = \tfrac12 \le 1 \)).
ExamQ6. (AP BC style, no calculator.) (a) Find \( \int x e^{-2x}\,dx \). [3] (b) Hence evaluate \( \int_0^\infty x e^{-2x}\,dx \), or show that it diverges. Show the limit. [3] (c) Evaluate \( \int_2^\infty \dfrac{1}{x(x-1)}\,dx \), or show that it diverges. [3] Show worked answer
\( \int x e^{-2x}\,dx = -\tfrac12xe^{-2x} + \tfrac12\int e^{-2x}\,dx \). [A1]
\( = -\tfrac12xe^{-2x}-\tfrac14e^{-2x} + C = -\tfrac14(2x + 1)e^{-2x} + C \). [A1]
(b) \( \displaystyle\int_0^\infty x e^{-2x}\,dx = \lim_{b \to \infty}\Big[-\tfrac14(2x + 1)e^{-2x}\Big]_0^b \). [M1]
\( = \lim_{b \to \infty}\left(\tfrac14-\tfrac14(2b + 1)e^{-2b}\right) \). [A1]
\( (2b + 1)e^{-2b} \to 0 \), so the integral converges to \( \tfrac14 \). [A1]
(c) \( \dfrac{1}{x(x-1)} = \dfrac{1}{x-1}-\dfrac1x \). [B1]
\( \int_2^b = \Big[\ln\left|\tfrac{x-1}{x}\right|\Big]_2^b = \ln\tfrac{b-1}{b}-\ln\tfrac12 \). [M1]
As \( b \to \infty \), \( \ln\frac{b-1}{b} \to \ln 1 = 0 \), so the integral converges to \( \ln 2 \). [A1]
Total: 9 marks.
Check yourself
1. For \( \int x^2\ln x\,dx \), which choice of \( u \) works best?
2. What is the correct form of partial fractions for \( \dfrac{2x + 1}{(x + 1)(x-3)^2} \)?
3. What is \( \int_1^\infty \dfrac{1}{x^{1.5}}\,dx \)?
Your score: 0 out of 3
The short version
- AP: integration by parts, partial fractions and improper integrals are AP BC only. Cambridge P3 and IB HL test parts and partial fractions.
- Parts: \( \int u\,v’\,dx = uv-\int v\,u’\,dx \). Choose \( u \) to simplify when differentiated (LIATE); repeat for \( x^2 \); loop for \( e^{ax}\sin bx \) or \( e^{ax}\cos bx \).
- Partial fractions: one term per linear factor, two for a squared factor, \( \frac{Bx + C}{x^2 + c^2} \) for a quadratic factor. Divide first if the fraction is improper.
- Improper integrals are limits; \( \int_1^\infty x^{-p}\,dx \) converges exactly when \( p > 1 \). Check for blow-ups inside the interval.
- Economics: \( PV = \int_0^T R(t)e^{-rt}\,dt \), often by parts; a perpetual \( R \) per year is worth \( \frac{R}{r} \).
- The full chapter in Mathematics Made Simple has many more worked examples and a full set of practice questions with a complete answer key.
Further reading on EconTutorials
Related in-depth articles from our blog:
