Partial fraction decomposition rewrites a rational function — a polynomial divided by a polynomial — as a sum of simpler fractions whose denominators are the factors of the original denominator. It is the standard first move when you need to integrate a rational function, take an inverse Laplace transform, sum a telescoping series or solve a recurrence: is hard to integrate as it stands, but integrates to two logarithms at once.
Type the numerator and the denominator , expanded or already factored. The calculator works entirely with exact fractions, never decimals. It cancels any common factor, performs polynomial long division when the fraction is improper, factors the denominator over the rational numbers (rational roots with their multiplicities, then irreducible quadratic factors, repeated ones included), sets up the decomposition with unknown coefficients, builds the linear system by equating coefficients, solves it and prints the result together with every intermediate line.
It handles the four textbook cases: distinct linear factors, repeated linear factors, irreducible quadratic factors and repeated quadratic factors. When contains an irreducible factor of degree three or more over the rationals — , for instance — no decomposition with rational coefficients into linear and quadratic pieces exists, and the calculator says so.
How to use this calculator
- Enter the numerator , for example
5x - 4orx^3. Powers use^; you can also type a list of coefficients from the highest degree. - Enter the denominator , expanded (
x^2 - x - 2) or factored ((x-1)^2(x^2+1)). - Read the decomposition. Below it you get the form with letters , their values, the factored denominator and, for an improper fraction, the polynomial part.
- Open the steps to follow the method exactly as you would write it by hand: division, factoring, setting up, equating coefficients, solving.
Fractional coefficients such as x/2 are accepted; decimals are converted to exact fractions (0.5 becomes 1/2).
The formula
If , first divide: with . Then factor and write one group of terms per factor:
A linear factor repeated times contributes constants; an irreducible quadratic factor (, or more generally no rational root) repeated times contributes linear numerators. In total there are exactly unknowns.
Multiplying both sides by gives a polynomial identity. Equating the coefficients of produces a square linear system that always has a unique solution, so the decomposition is unique. For distinct linear factors there is a shortcut, the cover-up method: for the factor .
Worked example
Distinct linear factors. : the denominator factors as . Write and multiply out: . With : , so ; with : , so . Result: .
Irreducible quadratic factor. .
Repeated linear factor. .
Improper fraction. : long division gives with remainder , then splits into halves: .
Repeated quadratic factor. .
Why partial fractions matter for integration
Every term of a decomposition has a known antiderivative: , for , and a quadratic term splits into a logarithm plus an arctangent after completing the square. That is why integral tables and computer algebra systems reduce any rational function to partial fractions first. The same decomposition gives inverse Laplace and z-transforms term by term in control theory and signal processing, and turns sums like into telescoping series.
Once you have the decomposition here, the integral calculator can integrate each simple term, and the polynomial calculator checks the long division or the factorization.
Limits of this calculator
The denominator is factored over the rational numbers. Linear factors come from the rational root theorem; the remaining part must split into quadratics with rational coefficients. Quadratics such as are kept whole (their roots are irrational), which is the usual textbook convention over . A denominator like or , whose real factorization needs irrational coefficients, is reported instead of being approximated. Degrees are limited to 12 for the denominator and 30 for the numerator.
Frequently asked questions
What is partial fraction decomposition?
It is the rewriting of a rational function P(x)/Q(x) as a polynomial plus a sum of fractions whose denominators are powers of the factors of Q(x). For example (5x − 4)/(x² − x − 2) = 2/(x − 2) + 3/(x + 1).
What do I do when the degree of the numerator is not smaller?
Divide first. Polynomial long division gives a quotient S(x) and a remainder R(x) of lower degree; only R(x)/Q(x) is decomposed, and the quotient is added in front. The calculator does this automatically, as with x³/(x² − 1) = x + x/(x² − 1).
How do repeated factors work?
A factor raised to the power m needs one term for each power from 1 to m: (x − 1)² gives A/(x − 1) + B/(x − 1)², and (x² + 1)² gives (Ax + B)/(x² + 1) + (Cx + D)/(x² + 1)².
What is an irreducible quadratic factor?
A second-degree factor that cannot be split into linear factors with rational coefficients, such as x² + 1 or x² + x + 1 (negative discriminant). Its partial fraction has a linear numerator, Bx + C, instead of a constant.
Is the decomposition unique?
Yes. Once the denominator is factored, the coefficients are fixed: the system obtained by equating coefficients has exactly one solution. Two correct methods (substituting values of x or equating coefficients) always give the same answer.
Why does the calculator refuse some denominators?
If Q(x) contains a factor of degree 3 or more that cannot be factored over the rationals, such as x³ − 2, the decomposition would need irrational or complex coefficients. The tool works with exact rational arithmetic and reports that case instead of giving approximate decimals.
Sources
- OpenStax — Precalculus 2e, §9.4 Partial Fractions
- OpenStax — Calculus Volume 2, §3.4 Partial Fractions
- NIST Digital Library of Mathematical Functions §1.2(iii) — Partial fractions
Last updated: