Partial Fraction Decomposition Calculator

Enter numerator and denominator polynomial coefficients. The calculator checks properness, performs polynomial division when needed, factors practical real denominators, builds the complete partial-fraction template, solves the unknown coefficients and verifies the identity.

Decomposition result

Fraction type0
Denominator factors0
Verification0
Partial fraction decomposition0

Use comma-separated real polynomial coefficients. Example: 5,3 over 1,0,-1 represents (5x + 3)/(x² − 1).

Calculation breakdown

Numerator P(x)0
Denominator Q(x)0
Polynomial part0
Proper remainder0
Factored denominator0
Unknown coefficients solved0
Identity check0

Step-by-step decomposition

Ready
Enter P(x) and Q(x), then calculate.

What is partial fraction decomposition?

Partial fraction decomposition rewrites a rational function as a polynomial part, when necessary, plus a sum of simpler rational fractions. The simpler pieces are built from the real linear and irreducible quadratic factors of the denominator.

The technique is especially useful in calculus because many rational-function integrals become straightforward after decomposition. It also appears in differential equations, Laplace-transform work, algebra and other areas where a complicated rational expression is easier to handle as a sum of simpler terms.

The first rule: make the rational function proper

A rational function P(x)/Q(x) is proper when the degree of P is less than the degree of Q. If the numerator degree is greater than or equal to the denominator degree, perform polynomial long division first:

P(x) / Q(x) = S(x) + R(x) / Q(x)

where S(x) is the polynomial quotient and the remainder R(x) has lower degree than Q(x). Only the proper remainder fraction is decomposed into partial fractions.

Important: skipping polynomial division is one of the most common partial-fraction mistakes. An improper rational function generally cannot be represented by the standard proper partial-fraction template alone.

Factor the denominator completely over the real numbers

After making the fraction proper, factor Q(x). For ordinary real partial fractions, the denominator is expressed as powers of real linear factors and irreducible quadratic factors. The factor type determines the numerator form required in the decomposition.

Denominator factorRequired partial-fraction terms
Distinct linear (ax + b)A / (ax + b)
Repeated linear (ax + b)ⁿA₁/(ax+b) + A₂/(ax+b)² + … + Aₙ/(ax+b)ⁿ
Irreducible quadratic q(x)(Ax + B) / q(x)
Repeated irreducible quadratic q(x)ⁿ(A₁x+B₁)/q + … + (Aₙx+Bₙ)/qⁿ

Distinct linear factors

If the denominator factors into different linear factors, assign one constant numerator to each factor. For example:

(5x + 3)/(x² − 1) = A/(x − 1) + B/(x + 1)

Because x² − 1 = (x − 1)(x + 1), multiply through by the common denominator:

5x + 3 = A(x + 1) + B(x − 1)

Expanding and matching coefficients gives A + B = 5 and A − B = 3, so A = 4 and B = 1:

(5x + 3)/(x² − 1) = 4/(x − 1) + 1/(x + 1)

Repeated linear factors

A repeated factor requires a term for every power from 1 through the full multiplicity. If the denominator contains (x − 1)³, the template must include:

A/(x − 1) + B/(x − 1)² + C/(x − 1)³

Using only the highest power loses degrees of freedom and usually makes the coefficient equations impossible to satisfy.

Irreducible quadratic factors

A real quadratic ax² + bx + c is irreducible over the real numbers when it has no real roots. Its numerator must be a general linear expression, not merely a constant:

(Ax + B)/(ax² + bx + c)

This is necessary because the numerator degree must be one less than the degree of the quadratic denominator factor. For example, x² + 1 is irreducible over the reals, so a decomposition involving that factor needs a numerator such as Ax + B.

Repeated irreducible quadratics

If an irreducible quadratic appears with multiplicity n, include a linear numerator over each power:

(A₁x+B₁)/q(x) + (A₂x+B₂)/q(x)² + … + (Aₙx+Bₙ)/q(x)ⁿ

This is the quadratic analogue of the repeated-linear rule. Every power must be represented.

How coefficients are solved

After writing the complete template, multiply both sides by the original denominator. The denominators disappear and you obtain a polynomial identity. Expand the right-hand side, collect equal powers of x and set matching coefficients equal.

This produces a linear system in the unknown partial-fraction coefficients. SonoCalculator constructs that system numerically and solves it with Gaussian elimination. It then recombines the result and checks the identity at several safe test points.

Cover-up method versus coefficient matching

For distinct linear factors, the Heaviside cover-up method can quickly find constants by substituting roots of the denominator. It is elegant and fast in the cases where it applies.

Coefficient matching is more general. It works with repeated linear factors and irreducible quadratics as well. A strong calculator therefore cannot rely only on cover-up; it needs a general system-solving method for the broader family of decompositions.

Worked example with a repeated factor

Consider:

2x/(x − 1)²

The correct template is:

A/(x − 1) + B/(x − 1)²

Clear the denominator:

2x = A(x − 1) + B

Expand:

2x = Ax − A + B

Matching coefficients gives A = 2 and −A + B = 0, so B = 2:

2x/(x − 1)² = 2/(x − 1) + 2/(x − 1)²

Worked example with an irreducible quadratic

Take:

(x² + 1)/(x³ + x)

The denominator factors as x(x² + 1). Because x is linear and x² + 1 is irreducible over the reals, the template is:

A/x + (Bx + C)/(x² + 1)

After clearing denominators:

x² + 1 = A(x² + 1) + x(Bx + C)

Comparing coefficients yields A = 1, B = 0 and C = 0, so this particular expression simplifies to 1/x. The example also illustrates why simplification and common-factor cancellation matter before interpreting a decomposition.

Improper fraction example

Suppose the numerator degree is higher:

x²/(x − 1)

Polynomial division gives:

x²/(x − 1) = x + 1 + 1/(x − 1)

The polynomial part x + 1 is part of the final answer. Only the remainder fraction 1/(x − 1) is already in partial-fraction form.

Why factor cancellation matters

If numerator and denominator share a polynomial factor, the rational expression can often be simplified before decomposition. Algebraically, cancellation changes the displayed denominator but not the function on points where the original expression was defined.

There is one subtlety: the original domain still excludes zeros of the original denominator, even if a common factor cancels. In symbolic algebra, the simplified expression and original rational function agree on the original domain but can differ in how a removable discontinuity is displayed.

Exact answers and numerical browser calculations

Hand algebra often produces exact integers or rational numbers. A browser calculator that factors general real polynomials may also encounter irrational roots and floating-point approximations. SonoCalculator cleans coefficients that are extremely close to integers or zero and labels the verification based on numerical tolerance.

For classroom problems designed to factor cleanly, results should normally display clean coefficients. For high-degree polynomials with difficult irrational or complex structure, a full computer algebra system can offer more exact symbolic capabilities than a lightweight client-side calculator.

What denominators can this calculator handle?

This tool is designed for practical polynomial rational functions. It handles common distinct and repeated real linear factors, irreducible quadratic factors, improper fractions and mixtures of these when the denominator can be reliably resolved within its browser-side factoring limits.

Inputs are polynomial coefficient lists rather than free-form expressions. This avoids ambiguous parsing and makes signs, missing powers and decimal coefficients explicit. For example, x³ − x is entered as 1, 0, −1, 0.

Why coefficient input can be better than free-form text

Expression boxes are convenient, but they must correctly interpret multiplication, exponent syntax, implicit multiplication, parentheses and unary signs. Coefficient entry is less flashy but more deterministic for polynomial tools.

It also makes missing powers visible. The polynomial 3x³ + 2 must be entered as 3, 0, 0, 2, preserving the zero coefficients for x² and x.

How partial fractions help with integration

One of the main reasons students learn decomposition is to integrate rational functions. A complicated fraction can split into terms whose antiderivatives are familiar, such as logarithmic forms from linear denominators and arctangent/logarithmic combinations from irreducible quadratics.

Decomposition itself is an algebraic identity. Integration is a later operation. Keeping those steps separate makes it easier to check whether an integration error came from the decomposition or from the antiderivative.

Partial fractions in Laplace transforms

Inverse Laplace-transform problems frequently produce rational expressions in the transform variable. Decomposing them into simpler fractions lets you match terms to standard transform pairs. Repeated factors correspond to different time-domain forms than simple factors, so multiplicity matters.

Common partial-fraction mistakes

How to verify a decomposition

The strongest check is to combine the partial fractions over a common denominator and confirm that the numerator simplifies to the original proper numerator. Equivalently, after clearing denominators, both sides should be the same polynomial identity.

A numerical check at several points is useful as an additional safeguard, but test points must avoid denominator zeros. SonoCalculator performs such a verification after solving the coefficient system.

Frequently asked questions

What is partial fraction decomposition?

It rewrites a rational function as a sum of simpler rational terms based on the factors of the denominator, plus a polynomial part if the original fraction is improper.

When do I need polynomial long division first?

When the numerator degree is greater than or equal to the denominator degree.

What do I put over a repeated linear factor?

Include one constant-numerator term for every power of the factor from 1 through its multiplicity.

What numerator goes over an irreducible quadratic?

A general linear numerator Ax + B.

Can a repeated quadratic appear?

Yes. Include a separate linear numerator over every increasing power of that quadratic factor.

Is the cover-up method always valid?

No. It is especially convenient for distinct linear factors, while repeated factors and irreducible quadratics require more general coefficient-solving methods.

Why does the calculator ask for coefficients?

Coefficient input avoids expression-parsing ambiguity and preserves missing powers explicitly.

Can I enter negative and decimal coefficients?

Yes. Use ordinary comma-separated signed real numbers.

Why should I verify a decomposition?

Recombining the result confirms that the solved coefficients reproduce the original rational function on its domain.

What if the denominator is too complicated to factor reliably?

The calculator will report that limitation rather than inventing a decomposition. A full symbolic computer algebra system is more appropriate for unusually difficult high-degree cases.

Final note: a correct partial-fraction solution depends on four things in order: make the fraction proper, factor the denominator, write the complete template for every factor and multiplicity, then solve and verify the coefficients. This calculator keeps those stages visible so the answer is useful for learning rather than functioning as a black box.