🔢 Partial Fraction Decomposition – Complete Guide
Partial fraction decomposition is the technique of rewriting a rational expression — a quotient of two polynomials — as a sum of simpler fractions. It is one of the most important algebraic tools in calculus, engineering, and signal processing, turning complex integrals and transforms into manageable pieces.
What Is a Rational Expression?
A rational expression has the form P(x) / Q(x) where both P(x) (numerator) and Q(x) (denominator) are polynomials. The expression is proper when the degree of P is strictly less than the degree of Q, and improper otherwise.
How the Decomposition Works
The process follows six well-defined steps, each of which this calculator performs automatically:
- Parse polynomials — convert your input strings into coefficient arrays.
- Check if proper — if not, perform polynomial long division to extract a quotient and a proper remainder.
- Factor the denominator — apply the rational root theorem to find all linear factors, then detect any irreducible quadratic factors.
- Build the template — assign unknown constants (A, B, C…) according to the type and multiplicity of each factor.
- Set up and solve the linear system — multiply through, compare coefficients of equal powers of x, and solve by Gaussian elimination.
- Write the final expression — substitute the solved constants back into the template.
Decomposition Templates by Factor Type
| Factor Type | Factor in Denominator | Template Terms |
|---|---|---|
| Distinct Linear | (x − a) | A / (x − a) |
| Repeated Linear | (x − a)ⁿ | A₁/(x−a) + A₂/(x−a)² + ··· + Aₙ/(x−a)ⁿ |
| Irreducible Quadratic | x² + bx + c(disc < 0) | (Bx + C) / (x² + bx + c) |
| Repeated Quadratic | (x² + bx + c)ⁿ | (B₁x+C₁)/(…) + ··· + (Bₙx+Cₙ)/(…)ⁿ |
Worked Example – Distinct Linear Factors
Decompose (5x + 1) / ((x − 1)(x + 2)):
(5x + 1) / ((x−1)(x+2)) = A/(x−1) + B/(x+2)
Multiply through: 5x + 1 = A(x+2) + B(x−1)
x = 1: 6 = 3A → A = 2
x = −2: −9 = −3B → B = 3
Result: 2/(x−1) + 3/(x+2)Worked Example – Repeated Linear Factor
Decompose (7x + 4) / ((x − 3)²(x + 1)):
7x + 4 = A(x−3)(x+1) + B(x+1) + C(x−3)²
x = 3: 25 = 4B → B = 25/4
x = −1: −3 = 16C → C = −3/16
Compare x²: A + C = 0 → A = 3/16Worked Example – Irreducible Quadratic
Decompose (2x² + 3) / ((x − 1)(x² + 4)):
2x² + 3 = A(x²+4) + (Bx+C)(x−1)
x = 1: 5 = 5A → A = 1
Expand and compare coefficients:
x²: 2 = A + B → B = 1
x¹: 0 = −B + C → C = 1
Result: 1/(x−1) + (x+1)/(x²+4)Applications of Partial Fractions
Integration
The most common use is in calculus. Each simple term integrates to a logarithm or inverse-tangent, making otherwise intractable integrals routine:
∫ (5x+1)/((x−1)(x+2)) dx
= ∫ 2/(x−1) dx + ∫ 3/(x+2) dx
= 2 ln|x−1| + 3 ln|x+2| + CInverse Laplace Transforms
Control-system engineers and signal-processing specialists decompose transfer functions using partial fractions to apply standard Laplace tables and recover time-domain responses. A factor (s − a) corresponds to the exponential e^(at), while irreducible quadratics yield damped sinusoids.
Z-Transforms and Discrete Systems
Exactly the same technique applies to Z-transforms in digital signal processing, where the variable is z instead of s or x.
Input Tips
✅ You can enter polynomials in expanded form: x^2 + 3x - 4
✅ Or in factored form: (x - 1)(x + 4) — the tool expands it automatically.
✅ Use ^ for powers: x^3, (x+2)^2
✅ Implicit multiplication is supported: 3x, 2(x-1)
❌ Multi-variable, trigonometric, or exponential expressions are not supported — polynomials only.
x ≠ 1, x ≠ −2) in the result so you know which x-values are excluded.Why Coefficient Comparison?
This calculator uses the coefficient comparison method (also called the method of undetermined coefficients): after clearing denominators, both sides are polynomials that must be identical. Setting the coefficients of each power of x equal gives a square linear system that can be solved by Gaussian elimination — a numerically stable and general approach that handles all factor types uniformly.