TExcelTAD
Home › School Calculus: Limits, Derivatives & Integrals › Integrating Rational Functions via Linear Partial Fractions

Integrating Rational Functions via Linear Partial Fractions

Integrating a rational function—a ratio of two polynomials P(x)Q(x)\frac{P(x)}{Q(x)}—often looks intimidating when the denominator is a quadratic or higher-degree polynomial. Unless the numerator happens to be the exact derivative of the denominator, direct uu-substitution fails.

In elementary algebra, you learned how to combine several simple fractions into one compound fraction by finding a common denominator:

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

In calculus, we run this process in reverse! We decompose a complicated fraction into a sum of simple building blocks called partial fractions. Each individual piece integrates effortlessly into either a natural logarithm or a power function.


1. Concepts & Paper Visuals

Proper vs. Improper Rational Functions

Before writing down any partial fraction decomposition, you must check the degrees of the numerator and denominator:

                  deg(P) ≥ deg(Q)                         deg(P) < deg(Q)
              [ IMPROPER FRACTION ]                    [ PROPER FRACTION ]
                       │                                        │
                       ▼ Long Division                          ▼
          P(x) / Q(x) = S(x) + R(x) / Q(x)             Proceed directly to
                       │                               Partial Fraction Setup!
                       ▼
           Integrate polynomial S(x),
           then decompose R(x) / Q(x)
  • Proper Rational Function: deg⁡(P)<deg⁡(Q)\deg(P) < \deg(Q). You can proceed directly to partial fractions.
  • Improper Rational Function: deg⁡(P)≥deg⁡(Q)\deg(P) \ge \deg(Q). You must first perform polynomial long division on paper to separate the polynomial quotient S(x)S(x) from the remainder R(x)Q(x)\frac{R(x)}{Q(x)}.

2. Decomposition Templates for Linear Factors

Once the rational fraction is proper, factor the denominator Q(x)Q(x) completely. In high school calculus, the factors are linear:

Case 1: Distinct Linear Factors

If the denominator factors into distinct linear terms:

Q(x)=(x−a1)(x−a2)⋯(x−an)Q(x) = (x - a_1)(x - a_2)\cdots(x - a_n)

Assign a single unknown constant (A,B,C,…A, B, C, \dots) over each distinct factor:

P(x)Q(x)=Ax−a1+Bx−a2+⋯+Nx−an\frac{P(x)}{Q(x)} = \frac{A}{x - a_1} + \frac{B}{x - a_2} + \cdots + \frac{N}{x - a_n}

Case 2: Repeated Linear Factors

If a linear factor is repeated kk times as (x−a)k(x - a)^k, it generates kk separate partial fractions with ascending powers:

P(x)(x−a)k=A1x−a+A2(x−a)2+⋯+Ak(x−a)k\frac{P(x)}{(x - a)^k} = \frac{A_1}{x - a} + \frac{A_2}{(x - a)^2} + \cdots + \frac{A_k}{(x - a)^k}

3. Two Paper Methods for Finding Constants

Method A: The Heaviside Cover-Up Method (Fastest Exam Technique)

For distinct linear factors, you can find each constant in seconds:

  1. Multiply both sides by the denominator (x−a)(x - a) you wish to isolate.
  2. Mentally (or with your thumb) "cover up" the factor (x−a)(x - a) in the original fraction.
  3. Substitute x=ax = a into the remaining expression:
    A=P(x)all other factors of Q(x)∣x=aA = \left. \frac{P(x)}{\text{all other factors of } Q(x)} \right|_{x = a}

Method B: Equating Coefficients (Universal System)

  1. Multiply the entire equation by the common denominator Q(x)Q(x) to eliminate all fractions.
  2. Expand the right-hand side and collect like powers of xx (x2x^2, xx, and constants).
  3. Set the coefficients of matching powers from both sides equal to each other.
  4. Solve the resulting system of linear equations.

4. Fundamental Integration Formulas for Partial Fractions

Once the constants are determined, integration is immediate:

┌─────────────────────────────────────────────────────────────────────────────┐
│                    PARTIAL FRACTION INTEGRATION RULES                       │
│                                                                             │
│  Degree 1 Denominators (Logarithmic):                                       │
│      ∫ [ A / (x - a) ] dx = A · ln|x - a| + C                               │
│                                                                             │
│  Higher Power Denominators (Power Rule, NOT Logarithmic!):                  │
│      ∫ [ B / (x - a)² ] dx = ∫ B(x - a)⁻² dx = - B / (x - a) + C             │
│      ∫ [ C / (x - a)ⁿ ] dx = - C / [ (n - 1)(x - a)ⁿ⁻¹ ] + C   (for n > 1)  │
└─────────────────────────────────────────────────────────────────────────────┘

5. Step-by-Step Notebook Examples

Example 1: Distinct Linear Factors with the Cover-Up Method

Problem: Evaluate the indefinite integral on paper:

∫5x−3x2−2x−3 dx\int \frac{5x - 3}{x^2 - 2x - 3} \, dx

Solution:

Step 1: Check degrees & Factor Denominator

  • deg⁡(numerator)=1\deg(\text{numerator}) = 1 and deg⁡(denominator)=2\deg(\text{denominator}) = 2. It is already a proper fraction.
  • Factor the quadratic denominator:
    x2−2x−3=(x−3)(x+1)x^2 - 2x - 3 = (x - 3)(x + 1)

Step 2: Set up Partial Fractions

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

Step 3: Solve for AA and BB using the Cover-Up Method

  • To find AA: Cover up (x−3)(x - 3) and evaluate at x=3x = 3:
    A=5x−3x+1∣x=3=5(3)−33+1=15−34=124=3A = \left. \frac{5x - 3}{x + 1} \right|_{x = 3} = \frac{5(3) - 3}{3 + 1} = \frac{15 - 3}{4} = \frac{12}{4} = 3
  • To find BB: Cover up (x+1)(x + 1) and evaluate at x=−1x = -1:
    B=5x−3x−3∣x=−1=5(−1)−3−1−3=−5−3−4=−8−4=2B = \left. \frac{5x - 3}{x - 3} \right|_{x = -1} = \frac{5(-1) - 3}{-1 - 3} = \frac{-5 - 3}{-4} = \frac{-8}{-4} = 2

Thus, the partial fraction decomposition is:

5x−3x2−2x−3=3x−3+2x+1\frac{5x - 3}{x^2 - 2x - 3} = \frac{3}{x - 3} + \frac{2}{x + 1}

Step 4: Integrate term by term

∫5x−3x2−2x−3 dx=∫(3x−3+2x+1) dx=3∫1x−3 dx+2∫1x+1 dx=3ln⁡∣x−3∣+2ln⁡∣x+1∣+C\begin{aligned} \int \frac{5x - 3}{x^2 - 2x - 3} \, dx &= \int \left( \frac{3}{x - 3} + \frac{2}{x + 1} \right) \, dx \\ &= 3 \int \frac{1}{x - 3} \, dx + 2 \int \frac{1}{x + 1} \, dx \\ &= 3\ln|x - 3| + 2\ln|x + 1| + C \end{aligned}

(Optionally, apply logarithm power laws: ln⁡(∣x−3∣3⋅(x+1)2)+C\ln\left(|x - 3|^3 \cdot (x + 1)^2\right) + C).


Example 2: Improper Rational Function (Long Division First)

Problem: Evaluate the indefinite integral:

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

Solution:

Step 1: Check degrees deg⁡(numerator)=3≥deg⁡(denominator)=2\deg(\text{numerator}) = 3 \ge \deg(\text{denominator}) = 2. Because the fraction is improper, we must perform polynomial long division first!

Step 2: Polynomial Long Division on Paper Divide (x3+0x2+0x+2)(x^3 + 0x^2 + 0x + 2) by (x2−1)(x^2 - 1):

x3÷x2=xx(x2−1)=x3−x(x3+2)−(x3−x)=x+2(remainder)\begin{aligned} x^3 \div x^2 &= x \\ x(x^2 - 1) &= x^3 - x \\ (x^3 + 2) - (x^3 - x) &= x + 2 \quad (\text{remainder}) \end{aligned}

Therefore:

x3+2x2−1=x+x+2x2−1\frac{x^3 + 2}{x^2 - 1} = x + \frac{x + 2}{x^2 - 1}

Step 3: Decompose the Proper Remainder Factor the denominator: x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1).

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

Using the cover-up method:

  • For AA (x=1x = 1):
    A=x+2x+1∣x=1=1+21+1=32A = \left. \frac{x + 2}{x + 1} \right|_{x = 1} = \frac{1 + 2}{1 + 1} = \frac{3}{2}
  • For BB (x=−1x = -1):
    B=x+2x−1∣x=−1=−1+2−1−1=1−2=−12B = \left. \frac{x + 2}{x - 1} \right|_{x = -1} = \frac{-1 + 2}{-1 - 1} = \frac{1}{-2} = -\frac{1}{2}

Thus:

x3+2x2−1=x+3/2x−1−1/2x+1\frac{x^3 + 2}{x^2 - 1} = x + \frac{3/2}{x - 1} - \frac{1/2}{x + 1}

Step 4: Integrate All Terms

∫x3+2x2−1 dx=∫x dx+32∫1x−1 dx−12∫1x+1 dx=12x2+32ln⁡∣x−1∣−12ln⁡∣x+1∣+C\begin{aligned} \int \frac{x^3 + 2}{x^2 - 1} \, dx &= \int x \, dx + \frac{3}{2} \int \frac{1}{x - 1} \, dx - \frac{1}{2} \int \frac{1}{x + 1} \, dx \\ &= \frac{1}{2} x^2 + \frac{3}{2}\ln|x - 1| - \frac{1}{2}\ln|x + 1| + C \end{aligned}

Example 3: Repeated Linear Factor

Problem: Evaluate the indefinite integral:

∫2x+7(x+2)2 dx\int \frac{2x + 7}{(x + 2)^2} \, dx

Solution:

Step 1: Set up the Repeated Factor Template Since (x+2)(x + 2) is squared, it generates powers 11 and 22:

2x+7(x+2)2=Ax+2+B(x+2)2\frac{2x + 7}{(x + 2)^2} = \frac{A}{x + 2} + \frac{B}{(x + 2)^2}

Step 2: Clear Denominators and Equate Coefficients Multiply both sides by (x+2)2(x + 2)^2:

2x+7=A(x+2)+B2x + 7 = A(x + 2) + B

Expand the right-hand side:

2x+7=Ax+(2A+B)2x + 7 = Ax + (2A + B)

Equate matching coefficients on paper:

  • x1x^1 coefficient:
    A=2A = 2
  • Constant term (x0x^0):
    2A+B=7  ⟹  2(2)+B=7  ⟹  4+B=7  ⟹  B=32A + B = 7 \implies 2(2) + B = 7 \implies 4 + B = 7 \implies B = 3

Thus:

2x+7(x+2)2=2x+2+3(x+2)2\frac{2x + 7}{(x + 2)^2} = \frac{2}{x + 2} + \frac{3}{(x + 2)^2}

Step 3: Integrate Both Pieces

∫(2x+2+3(x+2)2) dx=2∫1x+2 dx+3∫(x+2)−2 dx\int \left( \frac{2}{x + 2} + \frac{3}{(x + 2)^2} \right) \, dx = 2 \int \frac{1}{x + 2} \, dx + 3 \int (x + 2)^{-2} \, dx
  1. First term is logarithmic:
    2∫1x+2 dx=2ln⁡∣x+2∣2 \int \frac{1}{x + 2} \, dx = 2\ln|x + 2|
  2. Second term is a power rule (n=−2n = -2):
    3∫(x+2)−2 dx=3⋅(x+2)−1−1=−3x+23 \int (x + 2)^{-2} \, dx = 3 \cdot \frac{(x + 2)^{-1}}{-1} = -\frac{3}{x + 2}

Step 4: Combine Results

=2ln⁡∣x+2∣−3x+2+C= 2\ln|x + 2| - \frac{3}{x + 2} + C

6. Common Mistakes & Paper Traps

[!CAUTION] Trap 1: Forgetting Polynomial Long Division. When evaluating ∫x2+1x2−4 dx\int \frac{x^2 + 1}{x^2 - 4} \, dx, students often skip straight to Ax−2+Bx+2\frac{A}{x - 2} + \frac{B}{x + 2}. This is completely wrong! Because the degrees are equal (2=22 = 2), you must first divide:

x2+1x2−4=1+5x2−4\frac{x^2 + 1}{x^2 - 4} = 1 + \frac{5}{x^2 - 4}

Missing the polynomial quotient term (1→x1 \to x) produces an incorrect answer.

[!WARNING] Trap 2: Integrating 1(x−a)2\frac{1}{(x-a)^2} as a Logarithm. A frequent exam blunder is writing ∫1(x+2)2 dx=ln⁡∣(x+2)2∣\int \frac{1}{(x + 2)^2} \, dx = \ln|(x + 2)^2|. Only degree 1 in the denominator integrates to a logarithm! Any higher power (x−a)−n(x - a)^{-n} (n≥2n \ge 2) must be integrated with the Power Rule:

∫(x−a)−2 dx=−(x−a)−1=−1x−a\int (x - a)^{-2} \, dx = -(x - a)^{-1} = -\frac{1}{x - a}

[!WARNING] Trap 3: Omitting Intermediate Powers of Repeated Factors. For a denominator like (x−1)3(x - 1)^3, your decomposition must include all three ascending powers:

Ax−1+B(x−1)2+C(x−1)3\frac{A}{x - 1} + \frac{B}{(x - 1)^2} + \frac{C}{(x - 1)^3}

Omitting the lower powers will make it impossible to solve the linear system.


7. Pencil & Paper Practice

Solve these problems on paper before checking the full solutions below.

Practice 1

Evaluate the indefinite integral on paper:

∫7x−4x2−4 dx\int \frac{7x - 4}{x^2 - 4} \, dx

Practice 2

Evaluate the indefinite integral on paper:

∫4x−1(x−1)2 dx\int \frac{4x - 1}{(x - 1)^2} \, dx

Solutions to Practice Problems

Solution to Practice 1:

  1. Check degrees & Factor: deg⁡(num)=1<deg⁡(den)=2\deg(\text{num}) = 1 < \deg(\text{den}) = 2 (proper). Denominator: x2−4=(x−2)(x+2)x^2 - 4 = (x - 2)(x + 2).
  2. Partial Fractions:
    7x−4(x−2)(x+2)=Ax−2+Bx+2\frac{7x - 4}{(x - 2)(x + 2)} = \frac{A}{x - 2} + \frac{B}{x + 2}
  3. Solve constants via Cover-Up:
    • At x=2x = 2: A=7(2)−42+2=104=52A = \frac{7(2) - 4}{2 + 2} = \frac{10}{4} = \frac{5}{2}.
    • At x=−2x = -2: B=7(−2)−4−2−2=−18−4=92B = \frac{7(-2) - 4}{-2 - 2} = \frac{-18}{-4} = \frac{9}{2}.
  4. Integrate:
    ∫(5/2x−2+9/2x+2) dx=52ln⁡∣x−2∣+92ln⁡∣x+2∣+C\int \left( \frac{5/2}{x - 2} + \frac{9/2}{x + 2} \right) \, dx = \frac{5}{2}\ln|x - 2| + \frac{9}{2}\ln|x + 2| + C

Solution to Practice 2:

  1. Template:
    4x−1(x−1)2=Ax−1+B(x−1)2\frac{4x - 1}{(x - 1)^2} = \frac{A}{x - 1} + \frac{B}{(x - 1)^2}
  2. Clear Denominators:
    4x−1=A(x−1)+B=Ax+(B−A)4x - 1 = A(x - 1) + B = Ax + (B - A)
    Equate coefficients:
    • A=4A = 4
    • B−A=−1  ⟹  B−4=−1  ⟹  B=3B - A = -1 \implies B - 4 = -1 \implies B = 3
  3. Integrate:
    ∫(4x−1+3(x−1)2) dx=4ln⁡∣x−1∣−3x−1+C\int \left( \frac{4}{x - 1} + \frac{3}{(x - 1)^2} \right) \, dx = 4\ln|x - 1| - \frac{3}{x - 1} + C

Test yourself

What is the correct partial fraction decomposition template for x+5(x−2)(x+3)2\frac{x + 5}{(x - 2)(x + 3)^2}?

  1. Ax−2+B(x+3)2\frac{A}{x - 2} + \frac{B}{(x + 3)^2}
  2. Ax−2+Bx+3+C(x+3)2\frac{A}{x - 2} + \frac{B}{x + 3} + \frac{C}{(x + 3)^2}
  3. Ax−2+Bx+C(x+3)2\frac{A}{x - 2} + \frac{Bx + C}{(x + 3)^2}
  4. Ax−2+Bx+3\frac{A}{x - 2} + \frac{B}{x + 3}

Before decomposing 2x3−x+4x2+3x+2\frac{2x^3 - x + 4}{x^2 + 3x + 2} into partial fractions on paper, what must be done first?

  1. Apply the Heaviside cover-up method directly.
  2. Perform polynomial long division because the degree of the numerator (3) is greater than or equal to the degree of the denominator (2).
  3. Integrate using uu-substitution with u=x2+3x+2u = x^2 + 3x + 2.
  4. Multiply both the numerator and denominator by xx.

What is the antiderivative ∫5(x−4)2 dx\int \frac{5}{(x - 4)^2} \, dx?

  1. 5ln⁡∣(x−4)2∣+C5\ln|(x - 4)^2| + C
  2. 5x−4+C\frac{5}{x - 4} + C
  3. −5x−4+C-\frac{5}{x - 4} + C
  4. 52ln⁡∣x−4∣+C\frac{5}{2}\ln|x - 4| + C