Partial Fractions: How to Decompose and Integrate, Step by Step
Learn partial fraction decomposition for distinct linear, repeated linear and irreducible quadratic factors, the cover-up shortcut, and worked integrals.
By the PracticeCalculus team Published 7 min read
On this page
- What is partial fraction decomposition?
- Step 0: is the fraction proper?
- The partial fraction forms
- Case 1: distinct linear factors
- The cover-up method: a shortcut for linear factors
- Two ways to find the constants
- Case 2: repeated linear factors
- Case 3: irreducible quadratic factors
- Common partial fraction mistakes
- Quick reference: integrating each piece
- Make decomposition second nature
You can add \frac{3}{x-2} + \frac{2}{x+1} to get \frac{5x-1}{x^2-x-2} in a few lines. But if an integral hands you \int \frac{5x-1}{x^2-x-2}\,dx, no basic rule applies. Partial fractions runs that addition backward, breaking one hard fraction into simple pieces you can integrate on sight.
What is partial fraction decomposition?
A rational function is one polynomial divided by another. Partial fraction decomposition rewrites a rational function as a sum of simpler fractions whose denominators are the factors of the original denominator. For example:
Each piece on the right integrates to a natural log, so the integral becomes routine:
Step 0: is the fraction proper?
Partial fractions only works when the numerator's degree is less than the denominator's degree. If not, use polynomial long division first.
For example, \frac{x^2+1}{x^2-1} has equal degrees. Dividing gives
and only \frac{2}{x^2-1} needs to be decomposed.
The partial fraction forms
Factor the denominator completely. Each kind of factor contributes its own kind of term:
| Factor in the denominator | Terms in the decomposition |
|---|---|
| Distinct linear (x-a) | \frac{A}{x-a} |
| Repeated linear (x-a)^2 | \frac{A}{x-a} + \frac{B}{(x-a)^2} |
| Repeated linear (x-a)^3 | \frac{A}{x-a} + \frac{B}{(x-a)^2} + \frac{C}{(x-a)^3} |
| Irreducible quadratic x^2+bx+c | \frac{Bx + C}{x^2 + bx + c} |
A quadratic is irreducible when it does not factor over the real numbers, which happens when b^2 - 4c < 0. Examples are x^2 + 1 and x^2 + 2x + 5.
Case 1: distinct linear factors
Worked example 1
Evaluate \int \frac{5x-1}{x^2-x-2}\,dx.
Step 1. Check it is proper. Degree 1 over degree 2. Good.
Step 2. Factor the denominator. x^2 - x - 2 = (x-2)(x+1).
Step 3. Write the form.
Step 4. Clear denominators. Multiply both sides by (x-2)(x+1):
Step 5. Plug in convenient values. At x = 2 the B term vanishes: 9 = 3A, so A = 3. At x = -1 the A term vanishes: -6 = -3B, so B = 2.
Step 6. Integrate.
The cover-up method: a shortcut for linear factors
For a distinct linear factor (x-a), there is a one-line shortcut. Cover up that factor in the original fraction, then plug x = a into what is left.
For \frac{5x-1}{(x-2)(x+1)}:
- To find A over (x-2): cover (x-2), leaving \frac{5x-1}{x+1}. At x = 2: \frac{9}{3} = 3.
- To find B over (x+1): cover (x+1), leaving \frac{5x-1}{x-2}. At x = -1: \frac{-6}{-3} = 2.
Same answers, almost no algebra. It is exactly Step 5 done in your head.
Worked example 2: cover-up and long division together
Decompose \frac{2}{x^2-1} = \frac{2}{(x-1)(x+1)}.
- Cover (x-1), evaluate \frac{2}{x+1} at x = 1: A = 1.
- Cover (x+1), evaluate \frac{2}{x-1} at x = -1: B = -1.
Combined with the long division from Step 0:
Tip: the cover-up method gives the coefficient for any distinct linear factor, and for the highest power of a repeated factor. For the lower powers of a repeated factor and for quadratic factors, use another method.
Worked example 3: three distinct linear factors
Evaluate \int \frac{2x^2+6x-2}{x^3+x^2-2x}\,dx.
Step 1. Factor the denominator. Pull out x, then factor the quadratic:
Step 2. Write the form.
Step 3. Cover up each factor.
- Cover x, evaluate \frac{2x^2+6x-2}{(x-1)(x+2)} at x = 0: \frac{-2}{(-1)(2)} = 1, so A = 1.
- Cover (x-1), evaluate \frac{2x^2+6x-2}{x(x+2)} at x = 1: \frac{6}{3} = 2, so B = 2.
- Cover (x+2), evaluate \frac{2x^2+6x-2}{x(x-1)} at x = -2: \frac{-6}{6} = -1, so C = -1.
Step 4. Integrate.
With three linear factors, solving a system of equations would take several lines. The cover-up method takes three quick evaluations.
Worked example 4: a definite integral
Evaluate \int_2^3 \frac{2}{x^2-1}\,dx.
From example 2, \frac{2}{x^2-1} = \frac{1}{x-1} - \frac{1}{x+1}, so
Simplify with log rules: \ln 2 - \ln 4 = -\ln 2 and \ln 1 - \ln 3 = -\ln 3, so the value is -\ln 2 + \ln 3 = \ln\frac32 \approx 0.405.
Notice the interval [2, 3] stays away from the asymptotes at x = \pm 1. If a bound sat on an asymptote, this would be an improper integral and would need a limit.
Two ways to find the constants
You have now seen both standard methods. It helps to know when each one is faster.
- Plugging in roots (or cover-up). Substitute the root of each linear factor into the cleared equation. Each substitution kills every term but one, so you read off a constant immediately. This is the fastest method for distinct linear factors.
- Matching coefficients. Expand the right side, collect powers of x, and set each coefficient equal to the matching one on the left. This always works, and it is the only option for quadratic factors and for the lower powers of a repeated factor.
In practice, most students combine them: plug in roots to get as many constants as possible, then match one or two coefficients to finish.
Case 2: repeated linear factors
Worked example 5
Evaluate \int \frac{4x}{(x-1)(x+1)^2}\,dx.
Step 1. Write the form. The factor (x+1) is squared, so it gets two terms:
Step 2. Clear denominators.
Step 3. Plug in the roots. At x = 1: 4 = 4A, so A = 1. At x = -1: -4 = -2C, so C = 2.
Step 4. Match a coefficient for the last constant. The x^2 terms on the right are Ax^2 + Bx^2, and the left side has no x^2 term, so A + B = 0 and B = -1.
Step 5. Integrate each piece. The last term is a power, not a log:
The (x+1)^{-2} term integrates to \frac{(x+1)^{-1}}{-1}, which is where -\frac{2}{x+1} comes from.
Case 3: irreducible quadratic factors
Worked example 6
Evaluate \int \frac{2x^2+2x+1}{x(x^2+1)}\,dx.
Step 1. Write the form. x^2 + 1 cannot be factored, so it gets a linear numerator:
Step 2. Clear denominators and expand.
Step 3. Match coefficients. Constant: A = 1. x term: C = 2. x^2 term: A + B = 2, so B = 1.
Step 4. Split the quadratic piece.
The middle piece is a u-substitution with u = x^2+1, giving \tfrac12\ln(x^2+1). The last piece is a standard arctangent.
Step 5. Combine.
Tip: if the quadratic is something like x^2 + 2x + 5, complete the square to get (x+1)^2 + 4, then use \int \frac{du}{u^2 + a^2} = \frac1a\arctan\frac{u}{a} + C.
Common partial fraction mistakes
- Skipping long division. If the fraction is improper, the decomposition form is wrong and the constants will not solve consistently.
- Giving a repeated factor only one term. (x+1)^2 needs both \frac{B}{x+1} and \frac{C}{(x+1)^2}.
- Using a constant over a quadratic. An irreducible quadratic needs Bx + C on top, not just B.
- Integrating \frac{1}{(x+1)^2} as a log. It is a power: -\frac{1}{x+1}.
- Not factoring completely. x^3 - x = x(x-1)(x+1) has three linear factors, not one linear and one quadratic.
- Dropping absolute values inside the logarithms.
Quick reference: integrating each piece
| Piece | Integral |
|---|---|
| \frac{A}{x-a} | A\ln\lvert x-a\rvert + C |
| \frac{A}{(x-a)^n}, n\ge 2 | \frac{-A}{(n-1)(x-a)^{n-1}} + C |
| \frac{x}{x^2+a^2} | \tfrac12\ln(x^2+a^2) + C |
| \frac{1}{x^2+a^2} | \frac1a\arctan\frac{x}{a} + C |
Make decomposition second nature
Partial fractions is a procedure, and procedures stick through repetition. Once you have set up a dozen decompositions, choosing the right form and using the cover-up shortcut will feel automatic. Try the interactive lesson below: it checks each constant as you go and shows exactly where a setup went wrong.
Practice it now
Partial fractions
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson