1. Why decompose at all
Here's the move in one line. Adding
$$ \frac{1}{x-1} + \frac{1}{x+2} \;=\; \frac{(x+2) + (x-1)}{(x-1)(x+2)} \;=\; \frac{2x+1}{(x-1)(x+2)} $$is straightforward — common denominator, add, done. Going the other way, from $\tfrac{2x+1}{(x-1)(x+2)}$ back to $\tfrac{1}{x-1} + \tfrac{1}{x+2}$, is the puzzle this topic solves.
Why bother? The decomposed form is much friendlier downstream. In calculus, $\int \tfrac{1}{x-1}\,dx$ and $\int \tfrac{1}{x+2}\,dx$ are both basic logs; the combined fraction is not. In differential equations, $\tfrac{1}{(s-1)(s+2)}$ has no entry in your Laplace-inverse table, but the pieces do. Partial fractions is the on-ramp that gets the expression into a form the next tool can use.
The process of rewriting a rational expression $\dfrac{P(x)}{Q(x)}$ as a sum of simpler rational expressions, each whose denominator is a single factor of $Q(x)$ (or a power of one).
2. Proper vs improper — divide first if you need to
Partial fractions only works on proper rational expressions: ones where the numerator's degree is strictly less than the denominator's. If $\deg P \geq \deg Q$, the expression is improper, and you have to long-divide first.
Improper example: $\dfrac{x^3 + x}{x^2 - 1}$. Numerator is degree 3, denominator is degree 2. Polynomial-long-divide:
$$ \frac{x^3 + x}{x^2 - 1} \;=\; x + \frac{2x}{x^2 - 1} $$Now the leftover $\tfrac{2x}{x^2-1}$ is proper, and you can decompose it. The polynomial part ($x$ in this example) stays untouched.
If you try to decompose an improper expression directly, the ansatz won't have enough unknowns to balance — there will be no consistent solution. The diagnostic is "I keep getting contradictions"; the fix is to long-divide.
3. Distinct linear factors
If $Q(x)$ factors into distinct linear terms — $Q(x) = (x - r_1)(x - r_2)\cdots(x - r_n)$, all $r_i$ different — set up one term per factor with an unknown constant on top:
$$ \frac{P(x)}{(x-r_1)(x-r_2)\cdots(x-r_n)} \;=\; \frac{A_1}{x-r_1} + \frac{A_2}{x-r_2} + \cdots + \frac{A_n}{x-r_n} $$Each $A_i$ is a number to find. That's it — distinct linear factors are the easiest case.
For instance,
$$ \frac{7x - 1}{(x-1)(x+2)} \;=\; \frac{A}{x-1} + \frac{B}{x+2} $$and the only job is to discover that $A = 2$ and $B = 5$. (We'll do that calculation in §6.)
4. Repeated linear factors
When a linear factor appears more than once — $(x-r)^k$ for some $k \geq 2$ — you need one term per power, all the way up:
$$ \frac{P(x)}{(x-r)^k \cdots} \;=\; \frac{A_1}{x-r} + \frac{A_2}{(x-r)^2} + \cdots + \frac{A_k}{(x-r)^k} + \cdots $$For example, $(x-1)^2$ in the denominator means you set up
$$ \frac{P(x)}{(x-1)^2 (x+1)} \;=\; \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{x+1} $$Two terms for the squared factor, one for the simple factor. If $(x-1)^3$ had shown up, you'd need three terms — $\tfrac{A}{x-1} + \tfrac{B}{(x-1)^2} + \tfrac{C}{(x-1)^3}$.
The most common mistake here is writing only $\tfrac{A}{(x-1)^2}$ for a squared factor and skipping the $\tfrac{A}{x-1}$ term. The ansatz becomes too narrow and there's no solution. Every power from 1 up to $k$ must appear.
5. Irreducible quadratic factors
A quadratic $ax^2 + bx + c$ is irreducible over the reals when its discriminant $b^2 - 4ac < 0$ — it has no real roots, so it doesn't factor into real linear pieces. Examples: $x^2 + 1$, $x^2 + x + 1$.
For each irreducible quadratic factor in the denominator, set up a term with a linear numerator:
$$ \frac{P(x)}{(x^2 + bx + c) \cdots} \;=\; \frac{Ax + B}{x^2 + bx + c} + \cdots $$Two unknowns now — both $A$ and $B$. A linear numerator is necessary because a quadratic denominator gives a fraction with two degrees of freedom; a constant on top wouldn't have enough flexibility.
Repeated irreducible quadratics work like repeated linear factors. $(x^2 + 1)^2$ in the denominator demands
$$ \frac{Ax + B}{x^2 + 1} + \frac{Cx + D}{(x^2 + 1)^2} $$One linear numerator for each power, up to the multiplicity.
Always confirm the quadratic really is irreducible before using the $\tfrac{Ax+B}{\text{quad}}$ ansatz. $x^2 - 4$ looks like a quadratic but factors as $(x-2)(x+2)$ — treat it as two distinct linear factors. Check the discriminant; trust nothing.
6. Solving for the coefficients
Once the ansatz is set up with unknown letters in the numerators, you turn it into an equation in $x$ by multiplying through by the original denominator. Then you solve for the unknowns. Two common techniques.
Technique A — Substitute clever values of $x$
If a denominator factor is $(x-r)$, plugging in $x = r$ zeros out every other term and lets you read off one constant immediately. This works cleanly for distinct linear factors.
Decompose $\dfrac{7x-1}{(x-1)(x+2)}$. Set up
$$ \frac{7x-1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2} $$Multiply by $(x-1)(x+2)$:
$$ 7x - 1 = A(x+2) + B(x-1) $$Put $x = 1$: $\;7 - 1 = A(3) + B(0) \Rightarrow A = 2$.
Put $x = -2$: $\;-14 - 1 = A(0) + B(-3) \Rightarrow B = 5$.
So $\dfrac{7x-1}{(x-1)(x+2)} = \dfrac{2}{x-1} + \dfrac{5}{x+2}$. Verify by re-adding.
Technique B — Equate coefficients
Expand the right-hand side, collect like powers of $x$, and equate the coefficient of each power on both sides. You get a linear system in the unknowns — exactly what §Gaussian Elimination is for. This always works, and it's the only option when repeated or quadratic factors block Technique A from picking off all the unknowns.
In practice, mix the two: use substitution for the obvious roots, then equate coefficients of one or two powers to clean up whatever's left.
7. The cover-up shortcut
For distinct linear factors, there's a one-line shortcut. To find the constant over $(x - r)$:
- Cover up the factor $(x - r)$ in the original denominator.
- Evaluate what's left at $x = r$.
That's $A$. Repeat for each linear factor.
Example: $\dfrac{7x-1}{(x-1)(x+2)}$. To get $A$ (the coefficient over $x-1$), cover $(x-1)$ and plug $x=1$ into what remains: $\dfrac{7(1) - 1}{1 + 2} = \dfrac{6}{3} = 2$. ✓ For $B$, cover $(x+2)$ and plug $x = -2$: $\dfrac{7(-2) - 1}{-2 - 1} = \dfrac{-15}{-3} = 5$. ✓
It's exactly Technique A above with the algebra suppressed.
Cover-up gives the constant over a simple linear factor — i.e. one that appears only to the first power. For a repeated factor $(x-r)^k$, it correctly delivers only the highest-power coefficient $A_k$. The lower ones $A_1, \ldots, A_{k-1}$ still need coefficient-equating. Irreducible quadratics are off-limits entirely.
8. Common pitfalls
If $\deg P \geq \deg Q$, divide first. If you skip this and try to decompose directly, the unknowns won't balance and you'll chase a contradiction that has no fix.
$(x-1)^3$ in the denominator needs three terms: $\tfrac{A}{x-1} + \tfrac{B}{(x-1)^2} + \tfrac{C}{(x-1)^3}$. Writing only the highest-power term collapses the ansatz and you'll get stuck.
$\tfrac{A}{x^2 + 1}$ is not flexible enough. The right ansatz over an irreducible quadratic is $\tfrac{Ax + B}{x^2 + 1}$ — two unknowns, linear numerator. Same for higher powers like $(x^2+1)^2$: linear numerator on each piece.
Always test the discriminant. $x^2 - 5x + 6$ looks quadratic but factors as $(x-2)(x-3)$ — use distinct linear factors. $x^2 + 2x + 5$ has $b^2 - 4ac = 4 - 20 < 0$, so it really is irreducible.
9. Worked examples
Example 1 · $\dfrac{1}{(x-1)(x+2)}$ — distinct linear factors
Setup. $\dfrac{1}{(x-1)(x+2)} = \dfrac{A}{x-1} + \dfrac{B}{x+2}$.
Multiply by $(x-1)(x+2)$: $\;1 = A(x+2) + B(x-1)$.
Cover-up.
- $x = 1$: $\;1 = A(3) \Rightarrow A = \tfrac{1}{3}$.
- $x = -2$: $\;1 = B(-3) \Rightarrow B = -\tfrac{1}{3}$.
Result.
$$ \frac{1}{(x-1)(x+2)} = \frac{1/3}{x-1} - \frac{1/3}{x+2} $$Check. Combine: $\tfrac{1}{3}\cdot\tfrac{(x+2)-(x-1)}{(x-1)(x+2)} = \tfrac{1}{3}\cdot\tfrac{3}{(x-1)(x+2)} = \tfrac{1}{(x-1)(x+2)}$. ✓
Example 2 · $\dfrac{1}{(x-1)^2(x+1)}$ — a repeated linear factor
Setup.
$$ \frac{1}{(x-1)^2(x+1)} = \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{x+1} $$Multiply by $(x-1)^2(x+1)$:
$$ 1 = A(x-1)(x+1) + B(x+1) + C(x-1)^2 $$Pick clever values.
- $x = 1$: $\;1 = B(2) \Rightarrow B = \tfrac{1}{2}$.
- $x = -1$: $\;1 = C(4) \Rightarrow C = \tfrac{1}{4}$.
$A$ doesn't fall out — it's the coefficient over the simple-once-but-also-repeated factor. Use a third value or equate a coefficient. Try $x = 0$:
$$ 1 = A(-1)(1) + B(1) + C(1) = -A + \tfrac{1}{2} + \tfrac{1}{4} \;\Rightarrow\; A = -\tfrac{1}{4} $$Result.
$$ \frac{1}{(x-1)^2(x+1)} = -\frac{1/4}{x-1} + \frac{1/2}{(x-1)^2} + \frac{1/4}{x+1} $$Example 3 · $\dfrac{x+1}{(x^2+1)(x-2)}$ — an irreducible quadratic
$x^2 + 1$ has no real roots, so it's irreducible. Set up with a linear numerator:
$$ \frac{x+1}{(x^2+1)(x-2)} = \frac{Ax + B}{x^2 + 1} + \frac{C}{x-2} $$Multiply through:
$$ x + 1 = (Ax + B)(x - 2) + C(x^2 + 1) $$Cover-up gets $C$. Put $x = 2$: $\;3 = C(5) \Rightarrow C = \tfrac{3}{5}$.
Equate coefficients for $A$ and $B$. Expand:
$$ x + 1 = Ax^2 - 2Ax + Bx - 2B + Cx^2 + C = (A + C)x^2 + (-2A + B)x + (-2B + C) $$Match powers:
- $x^2$: $\;0 = A + C \Rightarrow A = -\tfrac{3}{5}$.
- $x^1$: $\;1 = -2A + B \Rightarrow B = 1 - \tfrac{6}{5} = -\tfrac{1}{5}$.
- $x^0$: $\;1 = -2B + C = \tfrac{2}{5} + \tfrac{3}{5} = 1$. ✓ (Consistency check.)
Result.
$$ \frac{x+1}{(x^2+1)(x-2)} = \frac{-\tfrac{3}{5}x - \tfrac{1}{5}}{x^2 + 1} + \frac{3/5}{x - 2} $$