Skip to content
Family Table Math
Auto

Integration Using Partial Fractions

You know how to add fractions: 2x−2+3x+1\dfrac{2}{x - 2} + \dfrac{3}{x + 1} combines into one fraction, 5x−4(x−2)(x+1)\dfrac{5x - 4}{(x - 2)(x + 1)}. Partial fractions runs that backwards. Integrating the combined fraction looks hard, but each simple piece just integrates to a logarithm. In AP Calculus BC, partial fractions are used for denominators that factor into distinct (non-repeating) linear factors, and they are the key step in solving the logistic differential equation.

If the denominator factors into different linear factors, write one simple fraction for each factor, with an unknown constant on top:

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

Three factors means three constants: …x(x−1)(x+2)=Ax+Bx−1+Cx+2\dfrac{\ldots}{x(x - 1)(x + 2)} = \dfrac{A}{x} + \dfrac{B}{x - 1} + \dfrac{C}{x + 2}.

This only works directly when the fraction is proper: the degree of the top is less than the degree of the bottom.

Multiply both sides by the whole denominator to clear the fractions:

5x−4=A(x+1)+B(x−2)5x - 4 = A(x + 1) + B(x - 2)

This must be true for every xx, so substitute the values that make each factor zero:

  • x=2x = 2:   6=3A\;6 = 3A, so A=2A = 2.
  • x=−1x = -1:   −9=−3B\;-9 = -3B, so B=3B = 3.

(You can also expand and match the coefficients of xx and the constants. That gives the same answer, but the zero-substitution method is usually faster.)

Each piece is a logarithm, using ∫1x−a dx=ln⁡∣x−a∣+C\displaystyle\int \frac{1}{x - a}\,dx = \ln|x - a| + C:

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

Keep the absolute value bars. You can combine logs with the log laws if you like, for example ln⁡∣x−2∣−ln⁡∣x+2∣=ln⁡∣x−2x+2∣\ln|x - 2| - \ln|x + 2| = \ln\left|\dfrac{x - 2}{x + 2}\right|.

If the top’s degree is greater than or equal to the bottom’s, do long division first. You get a polynomial plus a proper fraction, and only the proper fraction needs partial fractions.

Before splitting, check for something quicker. If the numerator is a constant multiple of the derivative of the denominator, uu-substitution gives a log in one step: ∫2x+1x2+x−6 dx=ln⁡∣x2+x−6∣+C\displaystyle\int \frac{2x + 1}{x^2 + x - 6}\,dx = \ln\left|x^2 + x - 6\right| + C. Partial fractions are for when the denominator factors but substitution doesn’t fit. (A denominator that doesn’t factor, like x2+4x^2 + 4, calls for an arctangent instead.)

Find ∫5x−4(x−2)(x+1) dx\displaystyle\int \frac{5x - 4}{(x - 2)(x + 1)}\,dx.

Solution. From the Key ideas, 5x−4(x−2)(x+1)=2x−2+3x+1\dfrac{5x - 4}{(x - 2)(x + 1)} = \dfrac{2}{x - 2} + \dfrac{3}{x + 1}.

Check by recombining: 2(x+1)+3(x−2)(x−2)(x+1)=5x−4(x−2)(x+1)\dfrac{2(x + 1) + 3(x - 2)}{(x - 2)(x + 1)} = \dfrac{5x - 4}{(x - 2)(x + 1)}. ✓

∫5x−4(x−2)(x+1) dx=2ln⁡∣x−2∣+3ln⁡∣x+1∣+C\int \frac{5x - 4}{(x - 2)(x + 1)}\,dx = 2\ln|x - 2| + 3\ln|x + 1| + C

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

Solution. Factor the difference of squares: x2−4=(x−2)(x+2)x^2 - 4 = (x - 2)(x + 2). Set up

4(x−2)(x+2)=Ax−2+Bx+2⇒4=A(x+2)+B(x−2)\frac{4}{(x - 2)(x + 2)} = \frac{A}{x - 2} + \frac{B}{x + 2} \quad\Rightarrow\quad 4 = A(x + 2) + B(x - 2)
  • x=2x = 2:   4=4A\;4 = 4A, so A=1A = 1.
  • x=−2x = -2:   4=−4B\;4 = -4B, so B=−1B = -1.
∫(1x−2−1x+2)dx=ln⁡∣x−2∣−ln⁡∣x+2∣+C=ln⁡∣x−2x+2∣+C\int \left(\frac{1}{x - 2} - \frac{1}{x + 2}\right)dx = \ln|x - 2| - \ln|x + 2| + C = \ln\left|\frac{x - 2}{x + 2}\right| + C

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

Solution. Top and bottom both have degree 2, so divide first. Since x2+3=(x2−1)+4x^2 + 3 = (x^2 - 1) + 4,

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

Now split the proper part: 4=A(x+1)+B(x−1)4 = A(x + 1) + B(x - 1).

  • x=1x = 1:   4=2A\;4 = 2A, so A=2A = 2.
  • x=−1x = -1:   4=−2B\;4 = -2B, so B=−2B = -2.
∫(1+2x−1−2x+1)dx=x+2ln⁡∣x−1∣−2ln⁡∣x+1∣+C\int \left(1 + \frac{2}{x - 1} - \frac{2}{x + 1}\right)dx = x + 2\ln|x - 1| - 2\ln|x + 1| + C

Evaluate ∫01x+5(x+1)(x+2) dx\displaystyle\int_0^1 \frac{x + 5}{(x + 1)(x + 2)}\,dx.

Solution. Write x+5=A(x+2)+B(x+1)x + 5 = A(x + 2) + B(x + 1).

  • x=−1x = -1:   4=A\;4 = A.
  • x=−2x = -2:   3=−B\;3 = -B, so B=−3B = -3.
∫01(4x+1−3x+2)dx=[4ln⁡∣x+1∣−3ln⁡∣x+2∣]01=(4ln⁡2−3ln⁡3)−(4ln⁡1−3ln⁡2)=7ln⁡2−3ln⁡3≈1.556\begin{aligned} \int_0^1 \left(\frac{4}{x + 1} - \frac{3}{x + 2}\right)dx &= \Big[4\ln|x + 1| - 3\ln|x + 2|\Big]_0^1 \\ &= (4\ln 2 - 3\ln 3) - (4\ln 1 - 3\ln 2) \\ &= 7\ln 2 - 3\ln 3 \approx 1.556 \end{aligned}

Skipping long division. Partial fractions only work on proper fractions. If the top’s degree is at least the bottom’s, divide first, or the constants won’t come out.

Forgetting to factor the denominator. 4x2−4\dfrac{4}{x^2 - 4} doesn’t look like it has two pieces until you factor x2−4=(x−2)(x+2)x^2 - 4 = (x - 2)(x + 2).

Plugging in the wrong value. To find the constant over x+2x + 2, substitute x=−2x = -2 (the value that makes x+2x + 2 zero), not x=2x = 2.

Losing the coefficient of x inside the log. ∫12x+1 dx=12ln⁡∣2x+1∣+C\displaystyle\int \frac{1}{2x + 1}\,dx = \tfrac{1}{2}\ln|2x + 1| + C, not ln⁡∣2x+1∣+C\ln|2x + 1| + C. Divide by the coefficient of xx, as with any linear substitution.

Dropping absolute values or the + C. ln⁡∣x−2∣\ln|x - 2| needs its absolute value bars, since x−2x - 2 can be negative. And indefinite answers still need +C+ C.

Splitting when substitution is quicker. If the top is the derivative of the bottom (or a constant multiple of it), uu-substitution gives the answer in one line. Both methods give equivalent answers, but one is much faster.

1. (Warm-up) Write 5(x−1)(x+4)\dfrac{5}{(x - 1)(x + 4)} as a sum of partial fractions.

Solution

5=A(x+4)+B(x−1)5 = A(x + 4) + B(x - 1). At x=1x = 1: 5=5A5 = 5A, so A=1A = 1. At x=−4x = -4: 5=−5B5 = -5B, so B=−1B = -1.

5(x−1)(x+4)=1x−1−1x+4\frac{5}{(x - 1)(x + 4)} = \frac{1}{x - 1} - \frac{1}{x + 4}

2. (Warm-up) Find ∫1x(x+1) dx\displaystyle\int \frac{1}{x(x + 1)}\,dx.

Solution

1=A(x+1)+Bx1 = A(x + 1) + Bx. At x=0x = 0: A=1A = 1. At x=−1x = -1: 1=−B1 = -B, so B=−1B = -1.

∫(1x−1x+1)dx=ln⁡∣x∣−ln⁡∣x+1∣+C=ln⁡∣xx+1∣+C\int \left(\frac{1}{x} - \frac{1}{x + 1}\right)dx = \ln|x| - \ln|x + 1| + C = \ln\left|\frac{x}{x + 1}\right| + C

3. (Warm-up) Find ∫3x2−x−2 dx\displaystyle\int \frac{3}{x^2 - x - 2}\,dx.

Solution

Factor: x2−x−2=(x−2)(x+1)x^2 - x - 2 = (x - 2)(x + 1). Then 3=A(x+1)+B(x−2)3 = A(x + 1) + B(x - 2). At x=2x = 2: 3=3A3 = 3A, A=1A = 1. At x=−1x = -1: 3=−3B3 = -3B, B=−1B = -1.

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

4. (Core) Find ∫x+1x2+5x+6 dx\displaystyle\int \frac{x + 1}{x^2 + 5x + 6}\,dx.

Solution

Factor: x2+5x+6=(x+2)(x+3)x^2 + 5x + 6 = (x + 2)(x + 3). Then x+1=A(x+3)+B(x+2)x + 1 = A(x + 3) + B(x + 2).

  • x=−2x = -2: −1=A-1 = A.
  • x=−3x = -3: −2=−B-2 = -B, so B=2B = 2.
∫(−1x+2+2x+3)dx=−ln⁡∣x+2∣+2ln⁡∣x+3∣+C\int \left(-\frac{1}{x + 2} + \frac{2}{x + 3}\right)dx = -\ln|x + 2| + 2\ln|x + 3| + C

5. (Core) Evaluate ∫352x2−4 dx\displaystyle\int_3^5 \frac{2}{x^2 - 4}\,dx.

Solution

2=A(x+2)+B(x−2)2 = A(x + 2) + B(x - 2). At x=2x = 2: A=12A = \tfrac{1}{2}. At x=−2x = -2: B=−12B = -\tfrac{1}{2}.

∫352x2−4 dx=12[ln⁡∣x−2∣−ln⁡∣x+2∣]35=12[(ln⁡3−ln⁡7)−(ln⁡1−ln⁡5)]=12ln⁡157≈0.381\begin{aligned} \int_3^5 \frac{2}{x^2 - 4}\,dx &= \frac{1}{2}\Big[\ln|x - 2| - \ln|x + 2|\Big]_3^5 \\ &= \frac{1}{2}\Big[(\ln 3 - \ln 7) - (\ln 1 - \ln 5)\Big] \\ &= \frac{1}{2}\ln\frac{15}{7} \approx 0.381 \end{aligned}

6. (Core) Find ∫x3x2−1 dx\displaystyle\int \frac{x^3}{x^2 - 1}\,dx.

Solution

The top has the larger degree, so divide: x3=x(x2−1)+xx^3 = x(x^2 - 1) + x, so x3x2−1=x+xx2−1\dfrac{x^3}{x^2 - 1} = x + \dfrac{x}{x^2 - 1}.

Split x(x−1)(x+1)\dfrac{x}{(x - 1)(x + 1)}: x=A(x+1)+B(x−1)x = A(x + 1) + B(x - 1). At x=1x = 1: A=12A = \tfrac{1}{2}. At x=−1x = -1: B=12B = \tfrac{1}{2}.

∫(x+1/2x−1+1/2x+1)dx=x22+12ln⁡∣x−1∣+12ln⁡∣x+1∣+C\int \left(x + \frac{1/2}{x - 1} + \frac{1/2}{x + 1}\right)dx = \frac{x^2}{2} + \frac{1}{2}\ln|x - 1| + \frac{1}{2}\ln|x + 1| + C

(The substitution u=x2−1u = x^2 - 1 also works on xx2−1\dfrac{x}{x^2 - 1} and gives 12ln⁡∣x2−1∣\tfrac{1}{2}\ln\left|x^2 - 1\right|, which is the same thing.)

7. (Core) Find ∫x2+2x(x−1)(x+2) dx\displaystyle\int \frac{x^2 + 2}{x(x - 1)(x + 2)}\,dx.

Solution

Three distinct factors: x2+2=A(x−1)(x+2)+Bx(x+2)+Cx(x−1)x^2 + 2 = A(x - 1)(x + 2) + Bx(x + 2) + Cx(x - 1).

  • x=0x = 0: 2=−2A2 = -2A, so A=−1A = -1.
  • x=1x = 1: 3=3B3 = 3B, so B=1B = 1.
  • x=−2x = -2: 6=6C6 = 6C, so C=1C = 1.
∫(−1x+1x−1+1x+2)dx=−ln⁡∣x∣+ln⁡∣x−1∣+ln⁡∣x+2∣+C\int \left(-\frac{1}{x} + \frac{1}{x - 1} + \frac{1}{x + 2}\right)dx = -\ln|x| + \ln|x - 1| + \ln|x + 2| + C

8. (Challenge) Evaluate ∫01x2x2+3x+2 dx\displaystyle\int_0^1 \frac{x^2}{x^2 + 3x + 2}\,dx. Give an exact answer and a decimal to 3 places.

Solution

Equal degrees, so divide: x2=(x2+3x+2)−(3x+2)x^2 = (x^2 + 3x + 2) - (3x + 2), giving 1−3x+2(x+1)(x+2)1 - \dfrac{3x + 2}{(x + 1)(x + 2)}.

Split: 3x+2=A(x+2)+B(x+1)3x + 2 = A(x + 2) + B(x + 1). At x=−1x = -1: A=−1A = -1. At x=−2x = -2: −4=−B-4 = -B, B=4B = 4. So

x2x2+3x+2=1−(−1x+1+4x+2)=1+1x+1−4x+2\frac{x^2}{x^2 + 3x + 2} = 1 - \left(\frac{-1}{x + 1} + \frac{4}{x + 2}\right) = 1 + \frac{1}{x + 1} - \frac{4}{x + 2}∫01(1+1x+1−4x+2)dx=[x+ln⁡∣x+1∣−4ln⁡∣x+2∣]01=(1+ln⁡2−4ln⁡3)−(0+0−4ln⁡2)=1+5ln⁡2−4ln⁡3≈0.071\begin{aligned} \int_0^1 \left(1 + \frac{1}{x + 1} - \frac{4}{x + 2}\right)dx &= \Big[x + \ln|x + 1| - 4\ln|x + 2|\Big]_0^1 \\ &= (1 + \ln 2 - 4\ln 3) - (0 + 0 - 4\ln 2) \\ &= 1 + 5\ln 2 - 4\ln 3 \approx 0.071 \end{aligned}

9. (Challenge) In a logistic model you need ∫1P(10−P) dP\displaystyle\int \frac{1}{P(10 - P)}\,dP, where 0<P<100 \lt P \lt 10. Find it.

Solution

1=A(10−P)+BP1 = A(10 - P) + BP. At P=0P = 0: A=110A = \tfrac{1}{10}. At P=10P = 10: B=110B = \tfrac{1}{10}.

∫1P(10−P) dP=110∫(1P+110−P)dP=110(ln⁡P−ln⁡(10−P))+C=110ln⁡P10−P+C\int \frac{1}{P(10 - P)}\,dP = \frac{1}{10}\int \left(\frac{1}{P} + \frac{1}{10 - P}\right)dP = \frac{1}{10}\Big(\ln P - \ln(10 - P)\Big) + C = \frac{1}{10}\ln\frac{P}{10 - P} + C

Watch the sign: ∫110−P dP=−ln⁡∣10−P∣\displaystyle\int \frac{1}{10 - P}\,dP = -\ln|10 - P|, because the inside has derivative −1-1. Since 0<P<100 \lt P \lt 10, both PP and 10−P10 - P are positive, so no absolute values are needed. This is exactly the step used to solve the logistic equation.