Free, with every step shown

Partial Fractions Calculator (Partial Fraction Decomposition)

Enter a numerator and a denominator to get the partial fraction decomposition with exact fractions, the factored denominator and every step. For example (5x − 3)/(x² − 2x − 3) = 3/(x − 3) + 2/(x + 1), and repeated factors work too: (3x + 5)/((x − 1)²(x + 2)) = 1/(9(x − 1)) + 8/(3(x − 1)²) − 1/(9(x + 2)).

Factored or expanded denominators both work, up to degree 10.
Examples:
Partial fraction decomposition of (5x − 3)/(x² − 2x − 3)

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

Factored denominator

(x − 3)(x + 1)

Constants

A = 3, B = 2

Check: x = 0.37: 0.319169604 = 0.319169604 · x = 1.91: -2.065008355 = -2.065008355 · x = -2.73: -1.679629574 = -1.679629574

Step-by-Step Solution
  1. Start with (5x − 3) / (x² − 2x − 3).
  2. deg P = 1 < deg Q = 2: the fraction is already proper, so no division is needed.
  3. Factor the denominator over the rationals: x² − 2x − 3 = (x − 3)(x + 1).
  4. Set up the form — a constant over each distinct linear factor: 5x − 3 / (x − 3)(x + 1) = A/(x − 3) + B/(x + 1).
  5. Cover-up (Heaviside) method for the simple linear factors: substitute x = 3, x = −1 after multiplying through by the denominator.
  6. Multiply both sides by the denominator and match the coefficients of each power of x: A = 3, B = 2.
  7. Result: 3/(x − 3) + 2/(x + 1). Check at x = 0.37: both sides equal 0.3191696.
Explain the steps with AI

Worked examples

Example 1: Distinct linear factors

Decompose (5x − 3)/(x² − 2x − 3).

  1. Factor: x² − 2x − 3 = (x − 3)(x + 1)
  2. 5x − 3 = A(x + 1) + B(x − 3)
  3. x = 3: 12 = 4A → A = 3; x = −1: −8 = −4B → B = 2

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

Example 2: Repeated linear factor

Decompose (3x + 5)/((x − 1)²(x + 2)).

  1. 3x + 5 = A(x − 1)(x + 2) + B(x + 2) + C(x − 1)²
  2. x = 1: 8 = 3B → B = 8/3; x = −2: −1 = 9C → C = −1/9
  3. Compare x² terms: 0 = A + C → A = 1/9

1/(9(x − 1)) + 8/(3(x − 1)²) − 1/(9(x + 2))

Example 3: Irreducible quadratic factor

Decompose (2x² + x + 4)/(x(x² + 4)).

  1. 2x² + x + 4 = A(x² + 4) + (Bx + C)x
  2. x = 0: 4 = 4A → A = 1
  3. Compare x² and x: 2 = A + B → B = 1; 1 = C

1/x + (x + 1)/(x² + 4)

Example 4: Improper fraction (long division first)

Decompose (x³ + 2x)/(x² − 1).

  1. Divide: x³ + 2x = x(x² − 1) + 3x
  2. Decompose 3x/((x − 1)(x + 1)) = A/(x − 1) + B/(x + 1)
  3. x = 1: A = 3/2; x = −1: B = 3/2

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

How the Partial Fractions Calculator Works

1. Exact arithmetic: coefficients are stored as exact fractions, never decimals, so answers like 8/3 and −1/9 are exact.

2. Factor the denominator: rational roots are found with the rational root theorem; what remains is split into irreducible quadratics (including quartics such as x⁴ + 5x² + 4 = (x² + 1)(x² + 4)).

3. Solve for the constants: the template A/(x − a) + … + (Bx + C)/(x² + bx + c) is multiplied out and the coefficients are matched, giving a linear system solved exactly by Gaussian elimination.

4. Check: the original and decomposed functions are compared at several x values.

Stuck on a step, or have a word problem?

Press Explain the steps with AI under any answer and the MathAI GPT math solver opens with your numbers already filled in, then explains the method line by line and answers follow-up questions. You can also type or photograph the whole question. On your phone, use MathAI GPT for iPhone or MathAI GPT for Android.

Partial Fractions Calculator FAQ

What is partial fraction decomposition?

It rewrites a rational function P(x)/Q(x) as a sum of simpler fractions whose denominators are the factors of Q(x). For example (5x − 3)/(x² − 2x − 3) = 3/(x − 3) + 2/(x + 1). It is used to integrate rational functions and to find inverse Laplace transforms.

How do I set up partial fractions for repeated and quadratic factors?

Each linear factor (x − a) gets A/(x − a). A repeated factor (x − a)ᵏ gets A₁/(x − a) + A₂/(x − a)² + … + Aₖ/(x − a)ᵏ. An irreducible quadratic factor (x² + bx + c) gets (Bx + C)/(x² + bx + c), and a repeated quadratic gets one such term for each power.

What if the degree of the numerator is not smaller than the denominator?

Do polynomial long division first. The quotient is a polynomial part and only the remainder is decomposed. For (x³ + 2x)/(x² − 1) the quotient is x and the remainder 3x gives 3/(2(x − 1)) + 3/(2(x + 1)).

What is the cover-up method?

For a non-repeated linear factor (x − a), cover that factor in the denominator and substitute x = a into what is left. For (5x − 3)/((x − 3)(x + 1)), A = (15 − 3)/(3 + 1) = 3 and B = (−5 − 3)/(−1 − 3) = 2. The calculator solves the full linear system exactly, so it also handles repeated and quadratic factors.

Related calculators

Link to or cite this page

Copy this URL into your resource list, syllabus, LibGuide or assignment:

https://mathaigpt.com/calculators/partial-fractions-calculator

MathAI GPT. (2026). Partial Fractions Calculator. https://mathaigpt.com/calculators/partial-fractions-calculator