Partial Fraction Decomposition Calculator

Enter the numerator (px + q) and quadratic denominator (ax² + bx + c) to split the rational function into partial fractions A/(x − r₁) + B/(x − r₂).

Quick Facts

Setup
(px + q) / (ax² + bx + c) = A/(x − r₁) + B/(x − r₂)
Valid when the denominator has two distinct real roots.
Roots
r = (−b ± √(b² − 4ac)) / (2a)
The quadratic formula; the discriminant b² − 4ac decides the case.
Repeated root
A/(x − r) + B/(x − r)²
Used when the discriminant equals zero.
Irreducible case
D < 0 → no real linear factors
The fraction cannot be split further over the real numbers.

Your Results

Calculated
Root x₁
-
First root of the denominator
Root x₂
-
Second root of the denominator
Coefficient A
-
Numerator over (x − r₁)
Coefficient B
-
Numerator over (x − r₂) [or (x − r)²]

Ready

Enter the numerator and denominator coefficients, then press Calculate.

How Partial Fraction Decomposition works

Partial fraction decomposition rewrites a "complicated" rational function as a sum of simpler fractions with lower-degree denominators. This calculator handles the common case of a linear numerator over a quadratic denominator: (px + q) / (ax² + bx + c). The technique is the reverse of combining fractions over a common denominator, and it is the standard first step for integrating rational functions, computing inverse Laplace transforms, and simplifying transfer functions in engineering.

Formula and method

First, factor the denominator using the quadratic formula: r = (−b ± √(b² − 4ac)) / (2a), where D = b² − 4ac is the discriminant. Three cases follow. If D > 0, there are two distinct real roots r1 and r2, so ax² + bx + c = a(x − r1)(x − r2), and the decomposition is (px + q)/(ax² + bx + c) = A/(x − r1) + B/(x − r2) with A = (p·r1 + q) / (a·(r1 − r2)) and B = (p·r2 + q) / (a·(r2 − r1)) — found by multiplying both sides by the denominator and substituting x = r1 and x = r2 (the Heaviside cover-up method). If D = 0, the denominator has one repeated root r = −b/(2a), giving ax² + bx + c = a(x − r)², and the decomposition becomes A/(x − r) + B/(x − r)² with A = p/a and B = q/a + A·r, found by matching coefficients of x and the constant term. If D < 0, the quadratic has no real roots — it is irreducible over the reals — so the fraction cannot be split into real linear terms at all.

Common sources of error

  • Forgetting the leading coefficient a: the denominator factors as a(x − r1)(x − r2), not (x − r1)(x − r2) — dropping the a scales both A and B incorrectly.
  • Sign errors in the roots: the quadratic formula's ± sign controls which root is r1 and which is r2; swapping them swaps A and B.
  • Treating a repeated root like two distinct roots: when D = 0, dividing by (r1 − r2) is a division by zero — the repeated-root form A/(x − r) + B/(x − r)² must be used instead.
  • Missing the improper-fraction case: if the numerator's degree were equal to or greater than the denominator's, you would need polynomial long division first — this calculator assumes a proper fraction (numerator degree less than 2).

Checking your result

To verify a decomposition, recombine A/(x − r1) + B/(x − r2) over the common denominator (x − r1)(x − r2) and confirm the numerator simplifies back to px + q. As a quick numeric check, plug in any convenient value of x (not equal to a root) into both the original fraction and the decomposed sum — the two should match to within rounding.

Applications

Partial fractions are used to integrate rational functions term by term in calculus, to invert Laplace and z-transforms in control theory and signal processing, and to simplify electrical circuit transfer functions before analyzing poles and residues. Recording the coefficients A and B alongside the roots lets you reconstruct or double-check the decomposition later.

Frequently Asked Questions

What is the formula for partial fraction decomposition of a quadratic denominator?
For (px + q) / (ax² + bx + c) with two distinct real roots r1 and r2, write ax² + bx + c = a(x − r1)(x − r2) and split the fraction into A/(x − r1) + B/(x − r2), where A = (p·r1 + q) / (a·(r1 − r2)) and B = (p·r2 + q) / (a·(r2 − r1)).
How do you find the roots of the denominator?
Use the quadratic formula: r = (−b ± √(b² − 4ac)) / (2a). The discriminant D = b² − 4ac tells you which case applies: D > 0 gives two distinct real roots, D = 0 gives one repeated root, and D < 0 gives a pair of complex roots.
What happens when the denominator has a repeated root?
When D = 0, the denominator factors as a(x − r)², and the decomposition takes the form A/(x − r) + B/(x − r)², where A = p/a and B = q/a + A·r.
Can every rational function be decomposed into real linear partial fractions?
No. If the discriminant is negative, the quadratic has no real roots (it is irreducible over the reals), so it cannot be split into real linear factors — the fraction (px + q) / (ax² + bx + c) is already in its simplest real form and only factors using complex numbers.