Partial Fractions Calculator

Simplify / decompose rational expressions.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a fraction of polynomials and get its partial-fraction decomposition with exact coefficients, the system that was solved, and a check that the pieces add back to the original. (3x+5)/((x−1)²(x+2)) = 8/(3(x−1)²) + 1/(9(x−1)) − 1/(9(x+2)).

How to use

1
Step 1
Type the rational expression, for example (3*x+5)/((x-1)^2*(x+2)).
2
Step 2
Leave the variable as x, or change it.
3
Step 3
Optionally set Factor over to Reals or Complex numbers to split irreducible quadratics and higher factors further.
4
Step 4
Press Calculate and read the steps: factor, set up, solve, result, check.

How it works

If the numerator's degree is at least the denominator's, divide first, so (x³+2)/(x²−1) becomes x plus a proper fraction. Common factors are cancelled, then the denominator is factored. The denominator is factored completely over the rationals. Each distinct linear factor gets A/(x−r); a repeated factor gets one term for every power up to its multiplicity; an irreducible quadratic gets (Bx+C)/(quadratic), an irreducible cubic gets (Bx²+Cx+D)/(cubic), and so on for higher degrees, each over every power it appears with. Clearing denominators and comparing coefficients of each power gives a linear system, which is solved exactly with fractions. The result is recombined over the common denominator and compared with the original, both exactly and at test points. Over the reals, a quadratic whose roots are quadratic surds is split exactly (1/(x²−2) = √2/(4(x−√2)) − √2/(4(x+√2))), and x⁴+1 becomes two real quadratics containing √2; roots that cannot be written with square roots, such as those of x³+x+1, are shown as rounded decimals and labelled approximate. Over the complex numbers, x²+1 splits as (x−i)(x+i).

P(x)/((x−a)(x−b)) = A/(x−a) + B/(x−b)      P/((x−a)²) = A/(x−a) + B/(x−a)²      P/(x²+px+q) = (Bx+C)/(x²+px+q)

Worked example

A repeated linear factor

Input
(3*x+5)/((x-1)^2*(x+2))
Output
-1/(9*(x + 2)) + 1/(9*(x - 1)) + 8/(3*(x - 1)^2)
Walkthrough
The denominator has factors (x+2) and (x−1)² so the template is A/(x+2) + B/(x−1) + C/(x−1)². Matching coefficients of 1, x and x² gives A = −1/9, B = 1/9 and C = 8/3. Recombining over (x−1)²(x+2) returns 3x+5, which the tool confirms.

Limitations

  • The denominator can have degree at most 12 after common factors cancel. Larger degrees, or coefficients that overflow exact arithmetic, are rejected with a message.
  • The input must be a rational function of one variable with numeric coefficients: polynomials combined with + − × ÷ and whole-number powers. Roots, trig, exp, log and extra symbols are not accepted.
  • The default answer is exact and uses rational coefficients only, so x³−2 and x³+x+1 stay whole with a quadratic numerator. Real and complex modes are optional.
  • Exact surds appear only for quadratic factors and for even quartics such as x⁴+1. Roots of other irreducible factors (cubics, x⁴−2 and similar) are rounded to 8 decimal places and clearly labelled approximate; the check there is numeric rather than exact.
  • If the search for a smaller rational factor of a degree-4-or-higher denominator factor hits its work limit, the factor is kept whole and a note says so. The decomposition is still correct but may not be the finest split.
  • Linear factors are shown with integer coefficients, so 2x²+x−1 uses (2x − 1) and (x + 1), with the leftover constant folded into the numerators. Results use * and ^ for products and powers.

Questions

What is the partial fraction decomposition of 1/(x(x+1))?
1/x − 1/(x + 1).
What is (x+1)/(x²−1) in partial fractions?
1/(x − 1). The factor x + 1 cancels first, so nothing is left to split.
How do you handle an improper fraction like (x³+2)/(x²−1)?
Divide first: x − 1/(2(x+1)) + 3/(2(x−1)). The quotient is x and the remainder is split; the division is shown as a step.
What is the decomposition when the denominator has x²+1?
1/((x+1)(x²+1)) = 1/(2(x+1)) + (−x+1)/(2(x²+1)); the quadratic gets a linear numerator Bx+C.
What happens with an irreducible cubic like x³+x+1?
It is kept whole and gets a numerator of degree 2: 1/(x(x³+x+1)) = 1/x − (x²+1)/(x³+x+1). Switch to Reals to see its real root as a decimal, labelled approximate.
Can it split x²−2 into real linear factors?
Yes, in Reals mode: 1/(x²−2) = √2/(4(x−√2)) − √2/(4(x+√2)), exact with sqrt(2) left unevaluated.
Can it split x²+1?
In Complex mode: 1/(x²+1) = −i/(2(x−i)) + i/(2(x+i)).
What happens with x⁴+1?
Over the rationals it stays whole. Over the reals it splits into (x²+√2x+1)(x²−√2x+1): 1/(x⁴+1) = (√2x+2)/(4(x²+√2x+1)) + (−√2x+2)/(4(x²−√2x+1)).
How do I check a decomposition?
The tool does it for you: the rational form is recombined exactly, and the final answer is compared with the original at 10 or more test points. Over the reals and complex numbers the check is numeric.

Features

  • Exact fractions
  • Repeated, quadratic, cubic and higher factors
  • Optional real (surd/decimal) and complex modes
  • Recombination check

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • What are variables, expressions, and equations?

    Khan Academy

    Language of algebra before using equation solvers.

    Watch on YouTube
  • Variables on both sides — example

    Khan Academy

    Worked example to check against solver output.

    Watch on YouTube