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 (and in IB AA HL), 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.

Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.

Keep the absolute value bars in logarithms and include +C+ C on every indefinite integral.

H1. (Foundations) Write each fraction as a sum of partial fractions. Check by recombining.

  • (a) x+11(x−1)(x+2)\dfrac{x + 11}{(x - 1)(x + 2)}, using the zero-substitution (cover-up) method
  • (b) 3x+1x(x+1)\dfrac{3x + 1}{x(x + 1)}, by expanding and equating coefficients

H2. (Foundations) Find each integral.

  • (a) ∫6x2−9 dx\displaystyle\int \frac{6}{x^2 - 9}\,dx
  • (b) ∫1(2x+1)(x+1) dx\displaystyle\int \frac{1}{(2x + 1)(x + 1)}\,dx

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

H4. (Core) The curve y=1(x+1)(x+3)y = \dfrac{1}{(x + 1)(x + 3)} lies above the xx-axis for x≥0x \ge 0. Find the exact area between the curve and the xx-axis from x=0x = 0 to x=2x = 2. Write your answer as a single logarithm, then give a decimal to 3 places.

H5. (Core) (AP style) No calculator. Which of the following is ∫x+7(x−1)(x+3) dx\displaystyle\int \frac{x + 7}{(x - 1)(x + 3)}\,dx?

  • A) −ln⁡∣x−1∣+2ln⁡∣x+3∣+C-\ln|x - 1| + 2\ln|x + 3| + C
  • B) 2ln⁡∣x−1∣−ln⁡∣x+3∣+C2\ln|x - 1| - \ln|x + 3| + C
  • C) 2ln⁡∣x−1∣+ln⁡∣x+3∣+C2\ln|x - 1| + \ln|x + 3| + C
  • D) ln⁡∣x2+2x−3∣+C\ln\left|x^2 + 2x - 3\right| + C

H6. (Core) (IB style) Let f(x)=2x2+3x−1x2−1f(x) = \dfrac{2x^2 + 3x - 1}{x^2 - 1} for x>1x \gt 1.

  • (a) Express f(x)f(x) in the form p+Ax−1+Bx+1p + \dfrac{A}{x - 1} + \dfrac{B}{x + 1}, where pp, AA and BB are integers.
  • (b) Hence find the exact value of ∫23f(x) dx\displaystyle\int_2^3 f(x)\,dx, giving your answer in the form a+ln⁡ba + \ln b, where aa and bb are rational.

H7. (Challenge) A student finds ∫5(x+2)(3−x) dx\displaystyle\int \frac{5}{(x + 2)(3 - x)}\,dx like this:

”5=A(3−x)+B(x+2)5 = A(3 - x) + B(x + 2). At x=−2x = -2, A=1A = 1. At x=3x = 3, B=1B = 1. So the answer is ln⁡(x+2)+ln⁡(3−x)+C\ln(x + 2) + \ln(3 - x) + C.”

The constants are right, but the final answer has two errors.

  • (a) Identify both errors and explain why each one matters.
  • (b) Write the correct answer.
  • (c) Check your answer by differentiating it.

H8. (Challenge) Let kk be a constant, and suppose

kx+1(x−1)(x+2)=Ax−1+Bx+2\frac{kx + 1}{(x - 1)(x + 2)} = \frac{A}{x - 1} + \frac{B}{x + 2}
  • (a) Find AA and BB in terms of kk.
  • (b) Find the value of kk that makes B=0B = 0. What happens to the original fraction for that kk?
  • (c) Find the value of kk that makes A=BA = B. For that kk, find ∫kx+1(x−1)(x+2) dx\displaystyle\int \frac{kx + 1}{(x - 1)(x + 2)}\,dx in two ways, by partial fractions and by uu-substitution, and explain why the answers agree.

H9. (Challenge) Show that ∫122x(x+1)(x+2) dx=ln⁡3227\displaystyle\int_1^2 \frac{2}{x(x + 1)(x + 2)}\,dx = \ln\frac{32}{27}. Then explain, without a calculator, why the answer must be positive, and check that 3227\dfrac{32}{27} agrees with this.

H10. (Challenge) After a rainstorm, water flows into a reservoir at a rate of r(t)=600(t+1)(t+4)r(t) = \dfrac{600}{(t + 1)(t + 4)} cubic metres per hour, where tt is the time in hours after the rain stops. (The rate is hypothetical.)

  • (a) Show that the total amount of water that flows in during the first TT hours is 200ln⁡4(T+1)T+4200\ln\dfrac{4(T + 1)}{T + 4} cubic metres.
  • (b) How much water flows in during the first 2 hours? Give an exact answer and a decimal to the nearest cubic metre.
  • (c) Explain why the total inflow stays below 200ln⁡4≈277200\ln 4 \approx 277 cubic metres, no matter how long you wait.
  • (d) Find the exact time when the total inflow reaches 200200 cubic metres, and give it to the nearest hundredth of an hour.