🧮
🧮 Math & statistics

Partial Fraction Decomposition Calculator (linear, repeated & quadratic factors)

Results update as you type.

Your numbers

Understanding the partial fraction decomposition calculator — concept and principle

This calculator splits a rational expression P(x)/Q(x) into a sum of simpler fractions, one group for each factor of the denominator. Partial fractions are used to integrate rational functions in calculus, to find inverse Laplace and z-transforms, and to simplify algebraic expressions.

Partial fractions of (5x−4)/((x−2)(x+1))Split one fraction into two÷Numerator5x − 4Denominator(x−2)(x+1)5x − 4 = A(x + 1) + B(x − 2)x = 2: 6 = 3A · x = −1: −9 = −3BDecomposition2/(x−2) + 3/(x+1)CoefficientsA = 2 · B = 3
Putting each root into the identity finds each coefficient at once.

How it is calculated

  1. If deg P ≥ deg Q, divide first: P/Q = polynomial + R/Q.
  2. Write one term per factor of Q:
  1. Multiply both sides by Q, expand, and equate coefficients of each power of x. This gives a linear system for the unknowns, which the calculator solves. Simple fractions are shown exactly.

The principle

Partial fractions reverse the addition of fractions. When you add A/(x − 2) + B/(x + 1), the common denominator is (x − 2)(x + 1) and the numerator is A(x + 1) + B(x − 2). Decomposition asks which A and B produce a given numerator. Because two polynomials are equal for all x only if their coefficients match, comparing coefficients turns the problem into simple linear equations. The number of unknowns always equals the degree of Q, so the system has exactly one solution when the factors are correct.

Worked example

Default inputs: P(x) = 5x − 4, Q(x) = (x − 2)(x + 1).

  1. deg P = 1 < deg Q = 2, so no division is needed.
  2. Set up 5x − 4 = A(x + 1) + B(x − 2).
  3. Coefficients: x-terms A + B = 5; constants A − 2B = −4.
  4. Subtract: 3B = 9, so B = 3 and A = 2.
  5. Result: 2/(x − 2) + 3/(x + 1). The denominator multiplied out is x² − x − 2, and there were 2 unknowns.

Shortcut check: put x = 2 into 5x − 4 = A(x + 1) + …, giving 6 = 3A, so A = 2.

How to read the result

Each term corresponds to one factor of the denominator, so you can integrate or invert them one by one: here the integral is 2 ln|x − 2| + 3 ln|x + 1| + C. If a polynomial part appears, it came from long division and must be kept. Coefficients shown as decimals mean the exact values are not simple fractions.

Common mistakes

Keep in mind: Enter the denominator already factored. A quadratic factor that actually has real roots should be split into linear factors first, or the decomposition will not be in its simplest form.

Frequently asked questions

Why do partial fractions help with integration?

Each simple term has a known integral, such as a logarithm or an arctangent, while the original fraction does not.

What is the cover-up method?

For a non-repeated linear factor, cover that factor and evaluate the rest at its root. It gives the same A directly.

Can every rational function be decomposed?

Yes, over the real numbers, once the denominator is factored into linear and irreducible quadratic factors.

Sources: OpenStax, College Algebra 2e (2021), §7.4 Partial Fractions · OpenStax, Calculus Volume 2 (2016), §3.4 Partial Fractions

Checked 9 Nov 2026. OpenStax, College Algebra 2e (2021), §7.4 Partial Fractions (non-repeated and repeated linear factors, irreducible quadratic factors); OpenStax, Calculus Volume 2 (2016), §3.4 Partial Fractions (divide first when deg P ≥ deg Q; forms for repeated and quadratic factors; equating coefficients).

🧮 All math & statistics tools →🌍 Calculators by country →