AP Calculus BC

Partial Fractions: Integrating with Linear Factors

Partial fractions rewrites a proper rational function whose denominator factors into distinct linear factors as a sum of constants over those factors, such as A/(x - 1) + B/(x + 2). Solve for the constants, then integrate each piece as a natural log. If the numerator's degree is too high, do long division first.

What the method does

Adding fractions combines several simple fractions into one complicated fraction. Partial fraction decomposition runs that process backward. For example, putting 1x−1−1x+2\frac{1}{x - 1} - \frac{1}{x + 2} over a common denominator gives (x+2)−(x−1)(x−1)(x+2)=3(x−1)(x+2)\frac{(x + 2) - (x - 1)}{(x - 1)(x + 2)} = \frac{3}{(x - 1)(x + 2)}. Read right to left, the single fraction on the right has been split into two pieces that each integrate to a natural log.

Topic 6.12, Integrating Using Linear Partial Fractions, is a BC-only topic. This guide covers denominators that factor into linear factors with no factor repeated. In that case every factor gets one constant over it:

N(x)(x−r1)(x−r2)=Ax−r1+Bx−r2\frac{N(x)}{(x - r_1)(x - r_2)} = \frac{A}{x - r_1} + \frac{B}{x - r_2}

Three different linear factors work the same way with three constants AA, BB, and CC.

Three checks before you decompose

  1. Look for a substitution. In ∫2xx2−1 dx\int \frac{2x}{x^2 - 1}\,dx the numerator is the derivative of the denominator, so u=x2−1u = x^2 - 1 gives ln⁡∣x2−1∣+C\ln|x^2 - 1| + C in one step.
  2. Compare degrees. The setup above works only for a proper fraction, where the numerator's degree is less than the denominator's. If it is not proper, do long division first and decompose the remainder fraction.
  3. Factor the denominator completely. You need different linear factors, such as x2+2x=x(x+2)x^2 + 2x = x(x + 2) or x2−x−2=(x−2)(x+1)x^2 - x - 2 = (x - 2)(x + 1).

If the denominator is a quadratic with no real roots, such as x2+4x^2 + 4, it has no linear factors and this method does not apply. Completing the square and the arctangent form handle that case. The partial fractions vs long division page compares when each rewrite is needed.

Solving for the constants

Write the decomposition with unknown constants, then multiply both sides by the full denominator to clear every fraction. For 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} this gives

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

This equation holds for every value of xx, so you can choose convenient values. There are two standard ways to finish.

MethodHow it worksBest when
Substitute the rootsPlug in each value of xx that makes a factor zero. Each substitution removes all but one constant.The factors are linear and all different, which is every problem in this guide
Equate coefficientsExpand the right side, then match the coefficient of xx and the constant term on both sides. Solve the system.You want an independent check

With the roots: x=1x = 1 gives 6=3A6 = 3A, so A=2A = 2, and x=−2x = -2 gives −9=−3B-9 = -3B, so B=3B = 3. With coefficients: 5x+1=(A+B)x+(2A−B)5x + 1 = (A + B)x + (2A - B), so A+B=5A + B = 5 and 2A−B=12A - B = 1, which gives the same A=2A = 2 and B=3B = 3.

Integrating the pieces

Each piece is a constant over a linear factor, and each integrates to a natural log with an absolute value:

∫Ax−r dx=Aln⁡∣x−r∣+C∫Aax+b dx=Aaln⁡∣ax+b∣+C\int \frac{A}{x - r}\,dx = A\ln|x - r| + C \qquad \int \frac{A}{ax + b}\,dx = \frac{A}{a}\ln|ax + b| + C

The second form matters when a factor has a coefficient on xx. For instance ∫32x+1 dx=32ln⁡∣2x+1∣+C\int \frac{3}{2x + 1}\,dx = \frac{3}{2}\ln|2x + 1| + C, where the 12\frac{1}{2} comes from the substitution u=2x+1u = 2x + 1.

For a definite integral, evaluate each log at the bounds and combine with log rules where it simplifies the answer. Make sure no root of the denominator lies in the interval of integration. If one does, the integrand is unbounded there and the integral is improper.

This technique returns in Unit 7. Separating variables in a logistic differential equation produces 1P(L−P)\frac{1}{P(L - P)}, and partial fractions is the step that makes it integrable.

Common mistakes

  • Decomposing an improper fraction. If the numerator's degree is not smaller, the constants will not work out. Divide first.
  • Dropping the absolute value bars in ln⁡∣x−r∣\ln|x - r|.
  • Forgetting the 1a\frac{1}{a} when the factor is ax+bax + b.
  • Sign errors when substituting a negative root. Write out each factor's value before multiplying.
  • Using partial fractions when a direct substitution was available, which costs time.
  • Stopping after finding AA and BB. The decomposition is the setup; the integral still has to be written and evaluated.

Quick check

After solving for the constants, recombine in your head or on paper. For A=2A = 2 and B=3B = 3: 2(x+2)+3(x−1)=5x+12(x + 2) + 3(x - 1) = 5x + 1, which matches the original numerator.

Worked examples

Worked example

Two linear factors

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

  1. Run the checks. The numerator has degree 11 and the denominator has degree 22, so the fraction is proper. The denominator is already factored into two different linear factors.
  2. Set up the decomposition: 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) to get 5x+1=A(x+2)+B(x−1)5x + 1 = A(x + 2) + B(x - 1).
  3. Substitute x=1x = 1: 6=3A6 = 3A, so A=2A = 2. Substitute x=−2x = -2: −9=−3B-9 = -3B, so B=3B = 3.
  4. Rewrite the integral: ∫(2x−1+3x+2)dx\int \left(\frac{2}{x - 1} + \frac{3}{x + 2}\right)dx.
  5. Integrate each piece: 2ln⁡∣x−1∣+3ln⁡∣x+2∣+C2\ln|x - 1| + 3\ln|x + 2| + C.

2ln⁡∣x−1∣+3ln⁡∣x+2∣+C2\ln|x - 1| + 3\ln|x + 2| + C

Worked example

A definite integral that needs factoring

Evaluate ∫12x+4x2+2x dx\int_1^2 \frac{x + 4}{x^2 + 2x}\,dx.

  1. Factor the denominator: x2+2x=x(x+2)x^2 + 2x = x(x + 2). The roots 00 and −2-2 are outside [1,2][1, 2], so the integrand is continuous on the interval.
  2. Set up: x+4x(x+2)=Ax+Bx+2\frac{x + 4}{x(x + 2)} = \frac{A}{x} + \frac{B}{x + 2}, so x+4=A(x+2)+Bxx + 4 = A(x + 2) + Bx.
  3. Substitute x=0x = 0: 4=2A4 = 2A, so A=2A = 2. Substitute x=−2x = -2: 2=−2B2 = -2B, so B=−1B = -1. Check: 2(x+2)−x=x+42(x + 2) - x = x + 4.
  4. Integrate: ∫12(2x−1x+2)dx=[2ln⁡∣x∣−ln⁡∣x+2∣]12\int_1^2 \left(\frac{2}{x} - \frac{1}{x + 2}\right)dx = \left[2\ln|x| - \ln|x + 2|\right]_1^2.
  5. Evaluate: at x=2x = 2 the value is 2ln⁡2−ln⁡4=02\ln 2 - \ln 4 = 0, since 2ln⁡2=ln⁡42\ln 2 = \ln 4. At x=1x = 1 the value is 2ln⁡1−ln⁡3=−ln⁡32\ln 1 - \ln 3 = -\ln 3. The difference is 0−(−ln⁡3)=ln⁡30 - (-\ln 3) = \ln 3.

ln⁡3≈1.099\ln 3 \approx 1.099

Worked example

Long division first, then partial fractions

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

  1. Compare degrees. Both are degree 22, so the fraction is improper and needs division. Since 2(x2−x−2)=2x2−2x−42(x^2 - x - 2) = 2x^2 - 2x - 4, subtracting from the numerator leaves 3x3x. So 2x2+x−4x2−x−2=2+3xx2−x−2\frac{2x^2 + x - 4}{x^2 - x - 2} = 2 + \frac{3x}{x^2 - x - 2}.
  2. Factor the denominator of the remainder fraction: x2−x−2=(x−2)(x+1)x^2 - x - 2 = (x - 2)(x + 1).
  3. Set up: 3x(x−2)(x+1)=Ax−2+Bx+1\frac{3x}{(x - 2)(x + 1)} = \frac{A}{x - 2} + \frac{B}{x + 1}, so 3x=A(x+1)+B(x−2)3x = A(x + 1) + B(x - 2).
  4. Substitute x=2x = 2: 6=3A6 = 3A, so A=2A = 2. Substitute x=−1x = -1: −3=−3B-3 = -3B, so B=1B = 1. Check: 2(x+1)+(x−2)=3x2(x + 1) + (x - 2) = 3x.
  5. Integrate: ∫(2+2x−2+1x+1)dx=2x+2ln⁡∣x−2∣+ln⁡∣x+1∣+C\int \left(2 + \frac{2}{x - 2} + \frac{1}{x + 1}\right)dx = 2x + 2\ln|x - 2| + \ln|x + 1| + C.

2x+2ln⁡∣x−2∣+ln⁡∣x+1∣+C2x + 2\ln|x - 2| + \ln|x + 1| + C

Frequently asked questions

When should I use partial fractions?

Use it on a rational function when no substitution works, the fraction is proper, and the denominator factors into different linear factors. If the fraction is improper, divide first. If the numerator is a multiple of the derivative of the denominator, use substitution.

Why do the answers have absolute values inside the logs?

Because ∫1u du=ln⁡∣u∣+C\int \frac{1}{u}\,du = \ln|u| + C. The function 1x−r\frac{1}{x - r} is defined on both sides of x=rx = r, where x−rx - r can be negative, and ln⁡\ln needs a positive input. The absolute value makes the antiderivative valid on either side.

Is partial fractions on the AP Calculus AB exam?

It is not part of the AB course. Topic 6.12, Integrating Using Linear Partial Fractions, is listed as a BC-only topic in the course framework.