Partial Fractions Calculator
Simplify / decompose rational expressions.
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
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))?
What is (x+1)/(x²−1) in partial fractions?
How do you handle an improper fraction like (x³+2)/(x²−1)?
What is the decomposition when the denominator has x²+1?
What happens with an irreducible cubic like x³+x+1?
Can it split x²−2 into real linear factors?
Can it split x²+1?
What happens with x⁴+1?
How do I check a decomposition?
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 YouTubeVariables on both sides — example
Khan Academy
Worked example to check against solver output.
Watch on YouTube
- Systems of Linear Equations
Math is Fun
Two-variable systems for simultaneous equation calculators.
- Elementary Algebra 2e
OpenStax
Free algebra textbook for equations and polynomials.