Math Core

Lesson 2.3 · Advanced Integration

Partial fractions

You know that 1x−1−1x\dfrac{1}{x - 1} - \dfrac{1}{x} combines into 1x(x−1)\dfrac{1}{x(x - 1)}. Partial fractions runs that addition backward: it splits a rational function into simpler fractions, each of which integrates to a natural log. On the AP Calculus BC exam, you need this for denominators that factor into distinct linear factors, and it shows up again when you solve the logistic differential equation.

The idea

Each simple fraction Ax−a\dfrac{A}{x - a} has an easy antiderivative, Aln⁡∣x−a∣+CA\ln\lvert x - a\rvert + C. So if you can rewrite a complicated fraction as a sum of these, the integral is finished.

Partial fraction decomposition (distinct linear factors)

If p(x)p(x) has smaller degree than (x−a)(x−b)(x - a)(x - b) and a≠ba \ne b, then there are constants AA and BB with

p(x)(x−a)(x−b)=Ax−a+Bx−b,\frac{p(x)}{(x - a)(x - b)} = \frac{A}{x - a} + \frac{B}{x - b},

and therefore

∫p(x)(x−a)(x−b) dx=Aln⁡∣x−a∣+Bln⁡∣x−b∣+C.\int \frac{p(x)}{(x - a)(x - b)}\,dx = A\ln\lvert x - a\rvert + B\ln\lvert x - b\rvert + C.

The same pattern extends to three or more distinct linear factors.

Finding A and B

Here is the procedure, step by step.

  1. Check the degree. The numerator must have lower degree than the denominator. If it doesn't, divide first.
  2. Factor the denominator into linear factors.
  3. Write the decomposition with unknown constants AA, BB, and so on.
  4. Clear denominators by multiplying both sides by the full denominator.
  5. Solve for the constants. The fastest way is to substitute the roots of the denominator, since each root makes all but one term vanish.

Worked example: Decomposing a fraction

Decompose 5x−1(x+1)(x−2)\dfrac{5x - 1}{(x + 1)(x - 2)}.

Write

5x−1(x+1)(x−2)=Ax+1+Bx−2.\frac{5x - 1}{(x + 1)(x - 2)} = \frac{A}{x + 1} + \frac{B}{x - 2}.

Multiply both sides by (x+1)(x−2)(x + 1)(x - 2):

5x−1=A(x−2)+B(x+1).5x - 1 = A(x - 2) + B(x + 1).
  • Let x=2x = 2: 9=3B9 = 3B, so B=3B = 3.
  • Let x=−1x = -1: −6=−3A-6 = -3A, so A=2A = 2.

So 5x−1(x+1)(x−2)=2x+1+3x−2\dfrac{5x - 1}{(x + 1)(x - 2)} = \dfrac{2}{x + 1} + \dfrac{3}{x - 2}.

Tip

Check a decomposition by plugging in any convenient value that isn't a root. With x=0x = 0 above: the left side is −1(1)(−2)=12\dfrac{-1}{(1)(-2)} = \dfrac{1}{2}, and the right side is 21+3−2=12\dfrac{2}{1} + \dfrac{3}{-2} = \dfrac{1}{2}. They match.

You can also expand the right side and match coefficients. In the example, A(x−2)+B(x+1)=(A+B)x+(−2A+B)A(x - 2) + B(x + 1) = (A + B)x + (-2A + B), so A+B=5A + B = 5 and −2A+B=−1-2A + B = -1. Solving gives the same A=2A = 2, B=3B = 3. Substituting roots is usually quicker, but matching coefficients is a useful backup.

Integrating

Once the fraction is split, each piece is a log.

Worked example: An indefinite integral

Find ∫dxx2−1\displaystyle\int \frac{dx}{x^2 - 1}.

Factor: x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1). Write 1(x−1)(x+1)=Ax−1+Bx+1\dfrac{1}{(x - 1)(x + 1)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 1}, so 1=A(x+1)+B(x−1)1 = A(x + 1) + B(x - 1).

  • x=1x = 1: 1=2A1 = 2A, so A=12A = \tfrac{1}{2}.
  • x=−1x = -1: 1=−2B1 = -2B, so B=−12B = -\tfrac{1}{2}.
∫dxx2−1=12ln⁡∣x−1∣−12ln⁡∣x+1∣+C=12ln⁡∣x−1x+1∣+C.\int \frac{dx}{x^2 - 1} = \frac{1}{2}\ln\lvert x - 1\rvert - \frac{1}{2}\ln\lvert x + 1\rvert + C = \frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C.

Worked example: A definite integral

Evaluate ∫23dxx2−x\displaystyle\int_2^3 \frac{dx}{x^2 - x}.

Factor: x2−x=x(x−1)x^2 - x = x(x - 1). From 1=A(x−1)+Bx1 = A(x - 1) + Bx: x=0x = 0 gives A=−1A = -1, and x=1x = 1 gives B=1B = 1. So the integrand is 1x−1−1x\dfrac{1}{x - 1} - \dfrac{1}{x}.

∫23(1x−1−1x)dx=[ln⁡(x−1)−ln⁡x]23=(ln⁡2−ln⁡3)−(0−ln⁡2)=2ln⁡2−ln⁡3=ln⁡43.\int_2^3 \left(\frac{1}{x - 1} - \frac{1}{x}\right)dx = \Big[\ln(x - 1) - \ln x\Big]_2^3 = (\ln 2 - \ln 3) - (0 - \ln 2) = 2\ln 2 - \ln 3 = \ln\frac{4}{3}.

The interval [2,3][2, 3] stays away from the roots 00 and 11, so the integrand is continuous there and the Fundamental Theorem applies.

Common mistake

Partial fractions only works on proper fractions. For x2+2x2−x\dfrac{x^2 + 2}{x^2 - x}, you cannot write Ax+Bx−1\dfrac{A}{x} + \dfrac{B}{x - 1} right away, because no choice of AA and BB produces an x2x^2 term in the numerator. Divide first.

Improper fractions: divide first

Worked example: Long division, then partial fractions

Find ∫x2+2x2−x dx\displaystyle\int \frac{x^2 + 2}{x^2 - x}\,dx.

The degrees are equal, so divide: x2+2=1⋅(x2−x)+(x+2)x^2 + 2 = 1\cdot(x^2 - x) + (x + 2), which gives

x2+2x2−x=1+x+2x(x−1).\frac{x^2 + 2}{x^2 - x} = 1 + \frac{x + 2}{x(x - 1)}.

Now decompose the remainder: x+2=A(x−1)+Bxx + 2 = A(x - 1) + Bx. At x=0x = 0, 2=−A2 = -A, so A=−2A = -2. At x=1x = 1, 3=B3 = B.

∫(1−2x+3x−1)dx=x−2ln⁡∣x∣+3ln⁡∣x−1∣+C.\int \left(1 - \frac{2}{x} + \frac{3}{x - 1}\right)dx = x - 2\ln\lvert x\rvert + 3\ln\lvert x - 1\rvert + C.

Why this matters for logistic growth

The logistic differential equation dPdt=kP(M−P)\dfrac{dP}{dt} = kP(M - P) separates into ∫dPP(M−P)=∫k dt\displaystyle\int \frac{dP}{P(M - P)} = \int k\,dt. The left side is a partial fractions integral with distinct linear factors PP and M−PM - P. Solving it is exactly how the familiar logistic formula is derived, which you will see in the differential equations unit.

Practice

Practice 1

Given x+7(x−1)(x+3)=Ax−1+Bx+3\dfrac{x + 7}{(x - 1)(x + 3)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 3}, find AA.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Given 4x+2x2+x−2=Ax−1+Bx+2\dfrac{4x + 2}{x^2 + x - 2} = \dfrac{A}{x - 1} + \dfrac{B}{x + 2}, find BB.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

∫2x2−4x+3 dx=\displaystyle\int \frac{2}{x^2 - 4x + 3}\,dx =

Practice 4

Evaluate ∫01dx(x+1)(x+2)\displaystyle\int_0^1 \frac{dx}{(x + 1)(x + 2)}. Give an exact answer.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

For x>0x > 0, find the antiderivative F(x)F(x) of f(x)=1x(x+1)f(x) = \dfrac{1}{x(x + 1)} that satisfies F(1)=0F(1) = 0.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 6

Evaluate ∫35x+1x2−3x+2 dx\displaystyle\int_3^5 \frac{x + 1}{x^2 - 3x + 2}\,dx. Give an exact answer.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

∫x2x2−1 dx=\displaystyle\int \frac{x^2}{x^2 - 1}\,dx =

Practice 8

Evaluate ∫123x2+3x dx\displaystyle\int_1^2 \frac{3}{x^2 + 3x}\,dx. Give an exact answer.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.