How to use the partial fraction calculator
- Type the numerator and denominator as polynomials. The denominator can be expanded (
x^3 + x) or factored (x(x^2 + 1)). - The calculator divides first if the fraction is improper, factors the denominator, writes the A, B, C… form, builds the coefficient equations and solves them exactly.
- Every answer is checked by evaluating the original fraction and the decomposition at test values with exact fractions.
Partial fraction rules
Write the denominator as a product of linear and irreducible quadratic factors. Each factor contributes terms like these:
Repeated linear factor (ax + b)ⁿ: A₁/(ax + b) + A₂/(ax + b)² + … + Aₙ/(ax + b)ⁿ
Irreducible quadratic (ax² + bx + c): (Bx + C)/(ax² + bx + c)
Repeated quadratic (ax² + bx + c)ⁿ: (B₁x + C₁)/(ax² + bx + c) + … + (Bₙx + Cₙ)/(ax² + bx + c)ⁿ
If the numerator's degree is equal to or higher than the denominator's, do polynomial long division first and decompose only the remainder. The total number of unknowns always equals the degree of the denominator.
Worked example
Decompose (3x + 5) / (x² − x − 2).
- Factor: x² − x − 2 = (x + 1)(x − 2).
- Set up: (3x + 5)/((x + 1)(x − 2)) = A/(x + 1) + B/(x − 2).
- Multiply by the denominator: 3x + 5 = A(x − 2) + B(x + 1).
- Compare coefficients: x: A + B = 3; constant: −2A + B = 5. So A = −2/3 and B = 11/3.
- Answer: −2/(3(x + 1)) + 11/(3(x − 2)).
Shortcut (cover-up method): for a distinct linear factor, set x to its root. With x = 2: 11 = 3B, so B = 11/3. With x = −1: 2 = −3A, so A = −2/3. This works only for non-repeated linear factors; the calculator always solves the full system, so repeated and quadratic factors are handled too.
More examples
- Repeated factor: (5x − 4)/((x − 1)(x + 2)²) = 1/(9(x − 1)) − 1/(9(x + 2)) + 14/(3(x + 2)²).
- Quadratic factor: (2x² + 3)/(x(x² + 1)) = 3/x − x/(x² + 1).
- Improper fraction: x³/(x² − 1) = x + 1/(2(x − 1)) + 1/(2(x + 1)).
- Laplace transforms: (s + 3)/(s² + 3s + 2) = 2/(s + 1) − 1/(s + 2), so the inverse transform is 2e⁻ᵗ − e⁻²ᵗ.
Why partial fractions are useful
- Integration: each simple term integrates directly: A/(x − a) gives A ln|x − a|, and (Bx + C)/(x² + k²) gives logarithm and arctangent terms.
- Inverse Laplace and z-transforms in differential equations and control systems.
- Series and sums: telescoping sums such as 1/(n(n + 1)) = 1/n − 1/(n + 1).
Limits of this calculator
It works over the rational numbers. A quadratic such as x² − 5 is kept as one factor, because its roots ±√5 are irrational. A factor that can't be split into rational linear or quadratic pieces, such as x³ − 2, is reported instead of being guessed.
Simplify an ordinary fraction with the fraction calculator, find common factors with the GCF calculator, or solve a linear system by matrices with the matrix inverse calculator. More math calculators.
Sources
Frequently asked questions
What is partial fraction decomposition?
Rewriting a rational expression (a polynomial over a polynomial) as a sum of simpler fractions whose denominators are the factors of the original denominator. For example, (3x + 5)/(x² − x − 2) = −2/(3(x + 1)) + 11/(3(x − 2)).
How do you do partial fractions step by step?
1) If the numerator's degree is not lower than the denominator's, divide first. 2) Factor the denominator into linear and irreducible quadratic factors. 3) Write one term per factor (and per power of a repeated factor) with unknown numerators A, B, C…. 4) Multiply both sides by the denominator and compare coefficients (or substitute roots). 5) Solve for the unknowns.
How do you handle repeated factors?
A factor raised to the power n needs n terms, one for each power. For (x + 2)², write A/(x + 2) + B/(x + 2)². For example, (5x − 4)/((x − 1)(x + 2)²) = 1/(9(x − 1)) − 1/(9(x + 2)) + 14/(3(x + 2)²).
What if the denominator has a quadratic that doesn't factor?
Give that factor a linear numerator Bx + C. For example, (2x² + 3)/(x(x² + 1)) = A/x + (Bx + C)/(x² + 1), which works out to 3/x − x/(x² + 1).
What if the fraction is improper?
Divide first. x³/(x² − 1) = x + x/(x² − 1), and then decompose the remainder: x/(x² − 1) = 1/(2(x − 1)) + 1/(2(x + 1)).
Can I use s instead of x for Laplace transforms?
Yes. Use any single letter as the variable. (s + 3)/(s² + 3s + 2) = 2/(s + 1) − 1/(s + 2), whose inverse Laplace transform is 2e⁻ᵗ − e⁻²ᵗ.
Why does the calculator say a factor can't be split?
It factors over the rational numbers. A cubic such as x³ − 2 has no rational roots and no rational quadratic factor, so it can't be broken into partial fractions with rational coefficients. Splitting it would need irrational or complex numbers.