Skip to content

Partial Fraction Decomposition Calculator

Decompose a rational function into partial fractions with exact fractions and steps: long division, factoring the denominator, setting up and solving for the coefficients.

Calculator Details

Partial fractions:4/x − 3/(x − 1) + 5/(x − 1)^2See results ↓

A polynomial: x^2 + 4, 3x + 11, (x + 1)^2

Expanded or factored, degree up to 6: x^3 - 2x^2 + x or x(x - 1)^2

The letter used in the polynomials (s for Laplace transforms)

Your Results

Partial fractions: 4/x − 3/(x − 1) + 5/(x − 1)^2

Partial fractions

4/x − 3/(x − 1) + 5/(x − 1)^2

Denominator: x(x − 1)^2

Coefficients

A = 4, B = −3, C = 5

Check

Recombines exactly

Exact fractions throughout

(x^2 + 4) / (x^3 − 2x^2 + x) = 4/x − 3/(x − 1) + 5/(x − 1)^2, with the denominator factored as x(x − 1)^2.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Each partial fraction
Set up asNumeratorOver
(A)/x4x
(B)/(x − 1)−3(x − 1)
(C)/(x − 1)^25(x − 1)^2

How This Calculator Works

How it's calculated

A proper rational function (numerator of lower degree than the denominator) can be split into simple fractions, one for each power of each factor of the denominator: a constant over each linear factor and a linear numerator over each irreducible quadratic. The unknown numerators are found by multiplying through and matching coefficients. Everything is done with exact fractions.

  1. Factor the denominator over the rationals: x^3 − 2x^2 + x = x(x − 1)^2.
  2. Write one term for each power of each factor: the fraction = A/x + B/(x − 1) + C/(x − 1)^2.
  3. Multiply both sides by x(x − 1)^2 and match the coefficients of x^0 … x^2: 3 equations in 3 unknowns.
  4. Solve: A = 4, B = −3, C = 5.
  5. Check: adding the terms back over x(x − 1)^2 gives x^2 + 4 again.

Frequently Asked Questions

What is partial fraction decomposition?

Rewriting a fraction of polynomials as a sum of simpler fractions whose denominators are the factors of the original denominator. For example, (3x + 11)/(x² − x − 6) = 4/(x − 3) − 1/(x + 2). It is the reverse of adding fractions over a common denominator.

Why is it useful?

Simple fractions are easy to integrate (∫ A/(x − a) dx = A ln|x − a|), to invert in Laplace transforms (A/(s − a) ↔ Ae^{at}) and to expand into series. In calculus courses it is the standard way to integrate rational functions.

What if the numerator’s degree is too high?

Divide first. When the numerator’s degree is greater than or equal to the denominator’s, polynomial long division gives a polynomial part plus a proper remainder fraction, and only the remainder is split. (x³ + 2)/(x² − 1) = x + (x + 2)/(x² − 1).

How do repeated factors work?

A factor that appears k times needs k terms, one for each power: (x − 1)² gives A/(x − 1) + B/(x − 1)². The same applies to repeated quadratics: (x² + 1)² gives (Ax + B)/(x² + 1) + (Cx + D)/(x² + 1)².

What about quadratic factors that don’t factor?

A quadratic with no real roots (negative discriminant, like x² + 1) or with irrational roots stays as it is, and its term gets a linear numerator: (Ax + B)/(x² + 1). This calculator factors over the rational numbers, so x² − 2 is also kept as a quadratic factor.

Which denominators can it handle?

Any polynomial with rational coefficients up to degree 6 that splits into linear and quadratic factors over the rationals: x(x − 1)², x⁴ + 5x² + 6, x⁶ − 1 and so on. A factor such as x³ − 2, which has no rational roots and no quadratic factor, can’t be split further with rational numbers, and the calculator says so.

How do I type the polynomials?

Use x (or the variable you choose), numbers, + − * ^ and brackets: 3x^2 - 2x + 1, (x - 1)^2(x^2 + 1). Multiplication can be implied, and fractions and decimals are allowed as coefficients (x/2, 0.5x). Division by another polynomial is not allowed inside a box: put the numerator and denominator in their own boxes.

Exact rational arithmetic throughout (no rounding); the result is checked by recombining the terms. The denominator is factored over the rational numbers (rational root theorem, then quadratic factors by Kronecker's method) up to degree 6. Not included: factoring over the real or complex numbers (irrational or complex roots stay inside quadratic factors), irreducible factors of degree 3 or more, symbolic coefficients (letters other than the variable), and the integral of the result.

Partial Fraction Decomposition Calculator with Steps

By FindMySum · Last reviewed

Partial fraction decomposition splits a fraction of two polynomials into a sum of simpler fractions, one for each factor of the denominator. It is the standard first step for integrating rational functions in calculus and for inverse Laplace transforms in engineering. This calculator does it exactly, with fractions rather than decimals: it divides if the fraction is improper, factors the denominator over the rational numbers, sets up the terms, solves for the unknown coefficients and checks the answer by recombining. Its opening example is (x² + 4)/(x(x − 1)²).

Step 1: make the fraction proper

Partial fractions only work when the numerator's degree is less than the denominator's. If it isn't, divide first with polynomial long division:

P(x)/Q(x) = S(x) + R(x)/Q(x), with deg R < deg Q

For example, (x³ + 2)/(x² − 1): x² − 1 goes into x³ exactly x times, leaving x³ + 2 − x(x² − 1) = x + 2. So the fraction is x + (x + 2)/(x² − 1), and only the remainder is decomposed.

Step 2: factor the denominator

Next, factor Q completely into linear factors and quadratic factors that can't be split. The calculator does this exactly over the rational numbers:

  • it takes out any power of x;
  • it tests every candidate root p/q allowed by the rational root theorem (p divides the constant term, q divides the leading coefficient) and divides each root out as many times as it goes;
  • for what is left, it searches for quadratic factors with integer coefficients (Kronecker's method).

x⁶ − 1, for instance, becomes (x + 1)(x − 1)(x² − x + 1)(x² + x + 1). A factor such as x³ − 2, with no rational roots and no quadratic factor, can't be split using rational numbers, and the calculator reports it rather than guessing with decimals.

Step 3: write one term per factor

The form of each term depends on the factor (OpenStax's four cases):

  1. Distinct linear factor (x − a): one term A/(x − a).
  2. Repeated linear factor (x − a)ᵏ: k terms, A₁/(x − a) + A₂/(x − a)² + … + Aₖ/(x − a)ᵏ.
  3. Irreducible quadratic (x² + bx + c): one term (Bx + C)/(x² + bx + c), with a linear numerator.
  4. Repeated quadratic (x² + bx + c)ᵏ: k terms with linear numerators.

The number of unknowns always equals the degree of the denominator.

Step 4: solve for the coefficients

Multiply both sides by the factored denominator. The left side becomes the numerator; the right side becomes a polynomial whose coefficients involve the unknowns. Matching the coefficients of each power of x gives a system of linear equations, which the calculator solves exactly with Gaussian elimination.

Worked example: (x² + 4)/(x(x − 1)²)

The denominator has a single factor x and a repeated factor (x − 1)², so:

(x² + 4)/(x(x − 1)²) = A/x + B/(x − 1) + C/(x − 1)²

Multiplying by x(x − 1)²:

x² + 4 = A(x − 1)² + Bx(x − 1) + Cx

Substituting convenient values is quickest by hand. At x = 0: 4 = A, so A = 4. At x = 1: 5 = C. Comparing the x² coefficients: 1 = A + B, so B = −3. The result:

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

Matching all the coefficients instead gives three equations (for x², x and the constant) and the same answer; that is the method the calculator uses, because it works for every case.

Step 5: check

Adding the terms back over the common denominator must give the original numerator: 4(x − 1)² − 3x(x − 1) + 5x = 4x² − 8x + 4 − 3x² + 3x + 5x = x² + 4. The calculator does this check exactly every time.

Fractions in the answer

When a coefficient is a fraction, the calculator writes the term in the usual textbook style, multiplying the denominator instead of nesting fractions. For 1/((x − 1)(x² + 1)) the coefficients are A = 1/2, B = −1/2 and C = −1/2, shown as:

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

Factors with a leading coefficient keep their integer form, so 1/(4x² − 4x + 1) is shown as 1/(2x − 1)².

Using the result

Each term has a standard integral: ∫ 4/x dx = 4 ln|x|, ∫ −3/(x − 1) dx = −3 ln|x − 1| and ∫ 5/(x − 1)² dx = −5/(x − 1), so the example integrates to 4 ln|x| − 3 ln|x − 1| − 5/(x − 1) + C. In Laplace-transform work, choose s as the variable: each A/(s − a) term corresponds to Ae^(at).

Limits

The calculator works with rational coefficients and denominators up to degree 6 that split into linear and quadratic factors over the rationals. It doesn't factor over the real or complex numbers, handle letters as coefficients, or integrate the result for you.

More questions

What is the cover-up method?

A shortcut for distinct linear factors, credited to Oliver Heaviside. To find the coefficient over (x − a), cover that factor in the original fraction and substitute x = a into what's left. For (3x + 11)/((x + 2)(x − 3)), covering (x − 3) and putting x = 3 gives 20/5 = 4. It needs adjusting for repeated factors.

How do partial fractions help with integrals?

Each simple fraction has a standard integral: ∫ A/(x − a) dx = A ln|x − a| + C, ∫ A/(x − a)ⁿ dx = −A/((n − 1)(x − a)ⁿ⁻¹) + C, and quadratic terms give a logarithm plus an arctangent. So after decomposing, the integral of any rational function can be written down term by term.

Are partial fractions used in engineering?

Constantly, in control systems and signal processing. A system's transfer function is a ratio of polynomials in s; splitting it into partial fractions gives terms like A/(s + a) whose inverse Laplace transforms are exponentials Ae^(−at). Choose s as the variable to work in that notation.

Is the decomposition unique?

Yes. Once the denominator is factored into irreducible factors, there is exactly one set of coefficients that works, so any correct method gives the same answer, though it may be written with fractions arranged differently, such as 3/(2(x − 1)) versus (3/2)/(x − 1).

What does it mean that a factor is irreducible over the rationals?

It can't be written as a product of lower-degree polynomials with rational coefficients. x² + 1 and x² − 2 are irreducible over the rationals (x² − 2 has irrational roots ±√2), while x² − 1 = (x − 1)(x + 1) is not. Over the real numbers every polynomial splits into linear and quadratic factors, but finding them can need irrational numbers.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy