About the Partial Fraction Decomposition Calculator
This partial fraction decomposition calculator rewrites a rational function P(x)/Q(x) as a sum of simpler fractions. Enter the numerator and denominator as ordinary polynomials — the denominator can be expanded (x^3 + x) or factored ((x − 1)^2(x + 2)) — and you get the decomposition with exact fractional coefficients, the general form with unknowns A, B, C…, the factored denominator and, for improper fractions, the polynomial part from long division.
It is built for calculus students integrating rational functions, for differential equations and Laplace transform work where inverse transforms need partial fractions, and for anyone checking a cover-up or equating-coefficients calculation by hand. Distinct linear factors, repeated linear factors, irreducible quadratic factors and repeated quadratics are all handled.
The decomposition is over the rational numbers: the denominator is factored exactly, and a quadratic such as x² − 2 or x² + 1 that has no rational roots is kept as a quadratic factor. Coefficients are found by solving the equating-coefficients system with exact fraction arithmetic, so there is no rounding.
How to use the partial fraction decomposition calculator
- 1Enter the numerator polynomial, e.g. x + 5.
- 2Enter the denominator in expanded or factored form, e.g. (x - 1)^2 (x + 2).
- 3Read the decomposition and the general form with A, B, C….
- 4Check the coefficient values and the factor type of each term in the table.
- 5Integrate or inverse-transform each simple term separately.
Formula and method
If the numerator's degree is at least the denominator's, long division first gives a polynomial S(x) plus a proper fraction. The denominator is then factored into linear factors (x − r) and irreducible quadratics. Each linear factor appearing k times contributes A₁/(x − r) + A₂/(x − r)² + … + Aₖ/(x − r)ᵏ; each quadratic factor appearing k times contributes terms (B₁x + C₁)/(quadratic) up to the k-th power.
Multiplying both sides by Q(x) and equating the coefficients of each power of x gives a square linear system in the unknowns, which always has exactly one solution. This calculator solves it with exact rational arithmetic, then rescales each factor to integer coefficients for display, so 1/(x − 1/2) appears as 2/(2x − 1).
- S(x)
- Polynomial part from long division (improper fractions only)
- r
- Rational root of the denominator
- k
- Multiplicity of a repeated factor
- A, B, C
- Unknown coefficients solved for
Worked examples
(x + 5) / ((x − 1)²(x + 2)) — repeated linear factor
Write (x + 5) = A(x − 1)² + B(x − 1)(x + 2) + C(x + 2). x = 1 gives 6 = 3C, so C = 2; x = −2 gives 3 = 9A, so A = 1/3; matching x² coefficients gives A + B = 0, so B = −1/3.
(5x + 1) / (x² + x − 2) — distinct linear factors
x² + x − 2 = (x + 2)(x − 1). By cover-up, at x = −2: (5·(−2) + 1)/(−2 − 1) = 3, and at x = 1: (5 + 1)/(1 + 2) = 2. So the fraction is 3/(x + 2) + 2/(x − 1).
(3x² + x + 4) / (x³ + x) — irreducible quadratic
x³ + x = x(x² + 1), and x² + 1 has no real roots. Setting 3x² + x + 4 = A(x² + 1) + (Bx + C)x gives A = 4 (from x = 0), then B = 3 − 4 = −1 and C = 1, so the quadratic term is (−x + 1)/(x² + 1).
(x³ + 1) / (x² − 1) — improper fraction
Long division gives x³ + 1 = x(x² − 1) + (x + 1). The remainder x + 1 cancels the factor (x + 1) of the denominator, so the proper part is (x + 1)/((x − 1)(x + 1)) = 1/(x − 1).
Frequently asked questions
When can you use partial fraction decomposition?+
It applies to any rational function — a ratio of two polynomials. If the numerator degree is greater than or equal to the denominator degree, do polynomial long division first and decompose the proper remainder fraction.
How do you handle repeated factors?+
A factor (x − r) that appears k times needs k terms: A₁/(x − r) + A₂/(x − r)² + … + Aₖ/(x − r)ᵏ. A repeated quadratic factor likewise needs a (Bx + C) numerator for each power.
What numerator goes over a quadratic factor?+
An irreducible quadratic factor such as x² + 1 gets a linear numerator Bx + C, because the numerator of each term must have lower degree than its own denominator factor.
What is the cover-up method?+
For a distinct linear factor (x − r), cover that factor in the denominator and evaluate the rest of the fraction at x = r; the result is its coefficient. It is a fast shortcut but does not directly give the lower powers of repeated factors.
Why is partial fraction decomposition used in calculus?+
Each simple term integrates easily: A/(x − r) gives A·ln|x − r|, A/(x − r)ᵏ gives a power, and (Bx + C)/(x² + px + q) gives a logarithm plus an arctangent. It is also how inverse Laplace transforms are computed.