/

Fraction Decomposition Calculator — Partial Fraction Decomposition with Steps

Fraction Decomposition Calculator — Partial Fraction Decomposition with Steps
Algebra Tool

Fraction Decomposition Calculator

Enter any rational function P(x)/Q(x) and get the complete partial fraction decomposition — factored denominator, classified roots, residue-solved constants, and full step-by-step working for all three cases: distinct roots, repeated roots, and irreducible quadratic factors.

Partial Fraction Decomposition Calculator
P(x) / Q(x) = partial fractions
f(x) =
(2*x+3)/(x^2-1)Full fraction
1/(x*(x+1))Product denom
x/(x^2+4*x+4)Repeated root
(x^2+1)/(x^3-x)Cubic denom
1/(x^2+1)Irred. quadratic
3/(x*(x+1)^2)Repeated factor

⚠️ Use * for multiplication, ^ for powers, parentheses for grouping. Denominator must have degree ≥ 1. For improper fractions the calculator performs long division automatically.

Distinct roots: (2x+3)/(x²−1)
1/(x(x+1))
Repeated: x/(x+2)²
3/(x(x+1)²)
Cubic: (x²+1)/(x³−x)
Irred. quad
3 distinct roots
1/(x²(x+1))
Error

Partial Fraction Decomposition

f(x)
=
Factored Denominator & Root Classification
Step-by-Step Decomposition
Verification — Recombined Result
The Three Cases of Partial Fraction Decomposition
1 Distinct Linear Factors A/(x−r₁) + B/(x−r₂) + ···

When Q(x) has n distinct (non-repeating) real roots r₁, r₂, …, rₙ — that is, Q(x) = (x−r₁)(x−r₂)···(x−rₙ) — the decomposition takes one term per root:

P(x) / [(x−r₁)(x−r₂)···(x−rₙ)] = A₁/(x−r₁) + A₂/(x−r₂) + ··· + Aₙ/(x−rₙ)

Residue formula (fastest method): Aₖ = P(rₖ) / Q'(rₖ) — multiply both sides by (x−rₖ) and substitute x = rₖ.

Example: 1/(x²−1) = 1/[(x−1)(x+1)]

A = lim(x→1) [(x−1)·1/(x−1)(x+1)] = 1/2  |  B = lim(x→−1) [(x+1)·1/(x−1)(x+1)] = −1/2

Result: 1/(2(x−1)) − 1/(2(x+1))

2 Repeated Linear Factors A/(x−r) + B/(x−r)² + ··· + N/(x−r)ⁿ

When (x−r) appears with multiplicity n in Q(x), you need n separate terms — one for each power from 1 to n:

P(x) / (x−r)ⁿ = A₁/(x−r) + A₂/(x−r)² + ··· + Aₙ/(x−r)ⁿ

Find Aₙ first (the highest power): multiply both sides by (x−r)ⁿ and set x = r. Then differentiate both sides and substitute x = r to find Aₙ₋₁, and so on.

Example: x/(x+2)² = x/(x²+4x+4)

Multiply by (x+2)²: x = A(x+2) + B → B = −2 (x=−2), A = 1 (coeff of x)

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

3 Irreducible Quadratic Factors (Ax+B)/(x²+bx+c)

When Q(x) contains a factor x²+bx+c with discriminant b²−4c < 0 (no real roots), you cannot factor further over the reals. Use a linear numerator Ax+B for that term:

P(x) / [(x−r)(x²+bx+c)] = A/(x−r) + (Bx+C)/(x²+bx+c)

Find A by residue at x = r. Then clear denominators and equate coefficients to find B and C.

Integration: ∫(Bx+C)/(x²+bx+c) dx → complete the square → arctan form.

Laplace connection: (Bx+C)/(s²+ω²) ↔ B·cos(ωt) + (C/ω)·sin(ωt)

4 Mixed & Improper Fractions Polynomial + partial fractions

If deg(P) ≥ deg(Q), the fraction is improper. First perform polynomial long division:

P(x)/Q(x) = quotient(x) + remainder(x)/Q(x)

The remainder has lower degree than Q(x), so it can be decomposed normally. The quotient integrates as a polynomial directly.

Example: x³/(x²−1) = x + x/(x²−1) = x + 1/(2(x−1)) − 1/(2(x+1))

Mixed denominators: When Q(x) has distinct roots, repeated roots AND an irreducible quadratic, apply all three cases simultaneously. Equate coefficients to solve the full linear system.

What Is Partial Fraction Decomposition?

This fraction decomposition calculator computes the complete partial fraction decomposition of any rational function P(x)/Q(x), showing the factored denominator, classified roots, solved constants via the residue method, and verified final result.

Partial fraction decomposition (also called fraction decomposition or partial fraction expansion) is an algebraic technique that rewrites a complex rational function as a sum of simpler fractions — each with a linear or irreducible quadratic denominator. It is the algebraic inverse of adding fractions with different denominators.

P(x)/Q(x) = A₁/(x−r₁) + A₂/(x−r₂) + ··· + (Bx+C)/(x²+bx+c) + ··· Each term is simpler — directly integrable and Laplace-invertible

The technique is fundamental to two major areas of mathematics:

  • Integration of rational functions: Every rational function can be integrated once decomposed — each partial fraction integrates to a logarithm, power, or arctangent.
  • Inverse Laplace transforms: Nearly every inverse Laplace transform uses partial fractions to break F(s) into table-lookup entries. See our Inverse Laplace Transform Calculator which uses this exact engine.

Key prerequisite — proper fraction: Partial fractions only work directly when deg(P) < deg(Q). If deg(P) ≥ deg(Q), divide first using polynomial long division to get a polynomial remainder, then decompose the remainder.

Step-by-Step Method for Partial Fraction Decomposition

Follow these five steps systematically to decompose any rational function:

  1. Check the degree: If deg(P) ≥ deg(Q), perform long division first. Work with the remainder only.
  2. Factor the denominator Q(x): Factor completely into linear factors (x−r) and irreducible quadratic factors (x²+bx+c with b²−4c < 0).
  3. Write the decomposition template: Assign A/(x−r) for each distinct linear factor, A₁/(x−r)+A₂/(x−r)² for repeated factors, and (Ax+B)/(x²+bx+c) for irreducible quadratics.
  4. Solve for the constants: Clear the denominators (multiply both sides by Q(x)), then either substitute roots (residue method) or expand and equate coefficients.
  5. Verify: Recombine the partial fractions by adding them back. The result must equal the original P(x)/Q(x).

Complete Worked Example: (2x+3)/(x²−1)

  1. Check degree: deg(2x+3) = 1 < deg(x²−1) = 2 ✓ (proper — no long division needed)
  2. Factor denominator: x²−1 = (x−1)(x+1), roots: r₁ = 1 (distinct), r₂ = −1 (distinct)
  3. Template: (2x+3)/[(x−1)(x+1)] = A/(x−1) + B/(x+1)
  4. Residues:
    A = lim(x→1) [(x−1)·(2x+3)/((x−1)(x+1))] = (2+3)/(1+1) = 5/2
    B = lim(x→−1) [(x+1)·(2x+3)/((x−1)(x+1))] = (−2+3)/(−1−1) = −1/2
  5. Result: (5/2)/(x−1) + (−1/2)/(x+1)
  6. Verify: (5/2)(x+1) + (−1/2)(x−1) = (5x/2+5/2) + (−x/2+1/2) = 4x/2 + 6/2 = 2x+3 ✓

The Three Cases — Distinct, Repeated, and Irreducible Quadratic Factors

Case 1: Distinct Linear Factors

This is the simplest and most common case. Every root of Q(x) is different, and all roots are real. The residue formula gives each constant directly without any system of equations.

Aₖ = P(rₖ) / ∏(j≠k) (rₖ − rⱼ) Residue at each distinct root — substitute the root value after clearing the factor

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

  1. Three distinct roots: r₁=1, r₂=−2, r₃=3
  2. A = (2·1+1)/((1+2)(1−3)) = 3/(3·(−2)) = −1/2
  3. B = (2·(−2)+1)/((−2−1)(−2−3)) = −3/((−3)(−5)) = −1/5
  4. C = (2·3+1)/((3−1)(3+2)) = 7/(2·5) = 7/10
  5. Result: −1/(2(x−1)) − 1/(5(x+2)) + 7/(10(x−3))

Case 2: Repeated Linear Factors

A root r of multiplicity n requires n terms. The "cover-up" residue method gives the coefficient of the highest power 1/(x−r)ⁿ directly. Lower-power coefficients require differentiation or equating coefficients.

Example: 3/(x(x+1)²)

  1. Roots: r₁=0 (multiplicity 1), r₂=−1 (multiplicity 2)
  2. Template: A/x + B/(x+1) + C/(x+1)²
  3. Multiply by x(x+1)²: 3 = A(x+1)² + Bx(x+1) + Cx
  4. x=0: 3 = A(1)² → A = 3
  5. x=−1: 3 = C(−1) → C = −3
  6. Equate x² coefficients: 0 = A+B → B = −3
  7. Result: 3/x − 3/(x+1) − 3/(x+1)²

Case 3: Irreducible Quadratic Factors

An irreducible quadratic x²+bx+c (where b²−4c < 0) contributes a linear numerator Ax+B, not just a constant. This is where the "completing the square" technique is needed for subsequent integration, and where Laplace transforms yield sine and cosine terms.

Example: (x²+1)/(x³−x) = (x²+1)/(x(x−1)(x+1))

  1. All roots distinct and real: r₁=0, r₂=1, r₃=−1
  2. A = (0+1)/(0−1)(0+1) = 1/(−1) = −1
  3. B = (1+1)/(1·(1+1)) = 2/2 = 1
  4. C = (1+1)/((−1)(−1−1)) = 2/(−1·−2) = 1
  5. Result: −1/x + 1/(x−1) + 1/(x+1)

Example with True Irreducible Quadratic: 1/((x−1)(x²+1))

  1. x²+1 has discriminant 0−4 = −4 < 0 — irreducible over reals
  2. Template: A/(x−1) + (Bx+C)/(x²+1)
  3. A = 1/(1²+1) = 1/2 (residue at x=1)
  4. Clear denominators: 1 = A(x²+1) + (Bx+C)(x−1)
  5. Equate x² coeff: 0 = A+B → B = −1/2
  6. Equate x⁰ coeff: 1 = A−C → C = A−1 = −1/2
  7. Result: 1/(2(x−1)) + (−x/2 − 1/2)/(x²+1)
  8. Integration: ∫result dx = (1/2)ln|x−1| − (1/4)ln(x²+1) − (1/2)arctan(x) + C

Partial Fraction Decomposition and Integration

Once a rational function is decomposed, each term integrates using one of these standard forms. This is why partial fractions are the gateway to integrating all rational functions — use our Antiderivative Calculator to verify each integral term.

Partial Fraction Term∫ (term) dxCondition
A/(x−r)A·ln|x−r| + CDistinct linear
A/(x−r)²−A/(x−r) + CRepeated (n=2)
A/(x−r)ⁿ−A/((n−1)(x−r)ⁿ⁻¹) + CRepeated (n≥2)
(Ax+B)/(x²+k²)(A/2)ln(x²+k²) + (B/k)arctan(x/k) + CIrred. quadratic
1/(x²+bx+c)Complete the square → arctan formIrred. quadratic

Partial Fraction Decomposition and Inverse Laplace Transforms

Partial fraction decomposition is the most important computational technique in Laplace transform theory. When solving differential equations via Laplace transforms, the solution appears as a rational function of s. Decomposing it exposes individual table-lookup entries.

Key Laplace table entries after partial fraction decomposition:
A/(s−a) → A·eᵃᵗ  |  A/(s−a)² → A·t·eᵃᵗ  |  ω/(s²+ω²) → sin(ωt)  |  s/(s²+ω²) → cos(ωt)

Inverse Laplace Example: F(s) = (2s+3)/(s²−1)

  1. Decompose: (2s+3)/((s−1)(s+1)) = (5/2)/(s−1) + (−1/2)/(s+1)
  2. Laplace table: (5/2)/(s−1) → (5/2)eᵗ and (−1/2)/(s+1) → (−1/2)e⁻ᵗ
  3. Result: f(t) = (5/2)eᵗ − (1/2)e⁻ᵗ

→ Try this in our Inverse Laplace Transform Calculator

Common Mistakes in Fraction Decomposition

Mistake 1 — Using a Constant for an Irreducible Quadratic

  • ❌ Wrong: 1/((x−1)(x²+1)) = A/(x−1) + B/(x²+1)
  • ✅ Correct: A/(x−1) + (Bx+C)/(x²+1) — linear numerator required

Mistake 2 — Missing Terms for Repeated Roots

  • ❌ Wrong: 1/(x(x+1)²) = A/x + B/(x+1)²
  • ✅ Correct: A/x + B/(x+1) + C/(x+1)² — need ALL powers from 1 to n

Mistake 3 — Not Checking Degree First

  • ❌ Wrong: directly decomposing x³/(x²−1)
  • ✅ Correct: divide first → x + x/(x²−1) → then decompose x/(x²−1)

Mistake 4 — Arithmetic Error in Residue Calculation

  • Always substitute the root into P(x)/[Q(x)/(x−r)], not into Q(x) alone
  • Double-check by recombining the partial fractions at the end

Mistake 5 — Treating a Factorable Quadratic as Irreducible

  • ❌ Wrong: treating (x²−1) as irreducible → writing (Ax+B)/(x²−1)
  • ✅ Correct: b²−4c = 0−(−4) = 4 > 0, so x²−1 = (x−1)(x+1) — distinct real roots
  • Always check the discriminant: b²−4c. If < 0 → irreducible. If ≥ 0 → factor further.

Worked Examples — Full Decomposition Solutions

1. 1/(x(x+1)) — Two distinct roots

  1. Roots: r₁=0, r₂=−1
  2. A = 1/(0+1) = 1  |  B = 1/(−1) = −1
  3. Answer: 1/x − 1/(x+1)
  4. Check: (x+1−x)/(x(x+1)) = 1/(x(x+1)) ✓

2. 1/(x²(x+1)) — Repeated root at 0

  1. Template: A/x + B/x² + C/(x+1)
  2. Multiply by x²(x+1): 1 = Ax(x+1) + B(x+1) + Cx²
  3. x=0: B=1  |  x=−1: C=1
  4. x² coeff: 0 = A+C → A=−1
  5. Answer: −1/x + 1/x² + 1/(x+1)

3. (x+1)/(x²+x+1) — Pure irreducible quadratic

  1. Discriminant: 1−4 = −3 < 0 → irreducible, no real roots
  2. Template: (Ax+B)/(x²+x+1)
  3. This IS already a partial fraction — degree 1 over degree 2, cannot factor further
  4. For integration: complete the square → x²+x+1 = (x+1/2)²+3/4 → arctan form
  5. Answer: Already in simplest form — (x+1)/(x²+x+1)

4. (x²+1)/(x³−x) = (x²+1)/(x(x−1)(x+1))

  1. A = (0+1)/(0)(something) — use residue properly: multiply by x, set x=0: A = (0+1)/((0−1)(0+1)) = 1/(−1) = −1
  2. B = (1+1)/((1)(1+1)) = 2/2 = 1
  3. C = (1+1)/((−1)(−1−1)) = 2/2 = 1
  4. Answer: −1/x + 1/(x−1) + 1/(x+1)

Frequently Asked Questions

What is partial fraction decomposition?
Partial fraction decomposition rewrites a rational function P(x)/Q(x) as a sum of simpler fractions with linear or irreducible quadratic denominators. For example, 1/(x²−1) = 1/(2(x−1)) − 1/(2(x+1)). It is essential for integrating rational functions and computing inverse Laplace transforms.
When can I use partial fraction decomposition?
When P(x)/Q(x) is proper — deg(P) < deg(Q). If deg(P) ≥ deg(Q), first perform polynomial long division to get a polynomial plus a proper remainder, then decompose the remainder. The calculator handles this automatically.
What are the three cases in partial fraction decomposition?
Case 1 — Distinct linear factors: Q(x) = (x−r₁)(x−r₂)···(x−rₙ) gives A/(x−r₁) + B/(x−r₂) + ···. Case 2 — Repeated linear factors: (x−r)ⁿ gives A₁/(x−r) + A₂/(x−r)² + ··· + Aₙ/(x−r)ⁿ. Case 3 — Irreducible quadratic: x²+bx+c with b²−4c < 0 gives (Ax+B)/(x²+bx+c).
How do you find the constants A, B, C?
Two methods: (1) Residue method — for each distinct root rₖ, multiply both sides by (x−rₖ) and substitute x=rₖ. Fast for distinct linear factors. (2) Equating coefficients — expand the right side, collect by powers of x, and solve the resulting linear system. Needed for repeated roots and irreducible quadratics.
How is fraction decomposition used in integration?
After decomposing P(x)/Q(x), each partial fraction integrates directly: ∫A/(x−r)dx = A·ln|x−r|+C, ∫A/(x−r)ⁿdx = −A/((n−1)(x−r)ⁿ⁻¹)+C, and ∫(Ax+B)/(x²+bx+c)dx uses the arctan form after completing the square. See our Antiderivative Calculator for step-by-step integration.
How does partial fraction decomposition relate to inverse Laplace transforms?
Partial fractions are the core step in nearly every inverse Laplace transform. Decomposing F(s) into simple fractions exposes table-lookup entries: A/(s−a) → Aeᵃᵗ, A/(s−a)² → Ateᵃᵗ, ω/(s²+ω²) → sin(ωt). Without partial fractions, inverse Laplace transforms of multi-pole rational functions are intractable.
What is an irreducible quadratic factor?
A quadratic x²+bx+c is irreducible over the reals when its discriminant b²−4c < 0 — meaning it has no real roots (only complex conjugate roots). Examples: x²+1 (discriminant −4), x²+x+1 (discriminant −3). These cannot be factored into real linear factors and contribute a linear numerator (Ax+B) in the partial fraction template.
Can every rational function be decomposed into partial fractions?
Yes. By the Fundamental Theorem of Algebra, every polynomial factors completely over the complex numbers. Over the real numbers, every polynomial factors into linear and irreducible quadratic factors. Therefore every proper rational function can be written as a finite sum of partial fractions with linear and irreducible quadratic denominators.
What is the difference between partial fraction decomposition and fraction decomposition?
They refer to the same technique. "Partial fraction decomposition" is the formal mathematical term. "Fraction decomposition" or "decomposition calculator" are the common shorthand terms. Both describe breaking a complex rational function into a sum of simpler partial fractions.

Related Calculators

ℒ⁻¹

Inverse Laplace Transforms

Partial fraction decomposition is the core step. Decompose F(s), then look up each term in the Laplace table.

Open Calculator
Quick Reference
A/(x−r₁) + B/(x−r₂) Distinct linear factors
A/(x−r) + B/(x−r)² Repeated factor (n=2)
(Ax+B)/(x²+bx+c) Irreducible quadratic
Aₖ = P(rₖ)/Q'(rₖ) Residue formula
∫A/(x−r)dx = A·ln|x−r| Integration result
b²−4c < 0 → irreducible Discriminant check
Most Common
1/(x(x+1))
(2x+3)/(x²−1)
x/(x+2)²
3/(x(x+1)²)
(x²+1)/(x³−x)
1/(x²(x+1))
1/(x²−1)
(2x+1)/3 roots

Integrate the Result

Use partial fractions to split, then integrate each term with our Antiderivative Calculator.

Antiderivative Calc

Share This Tool

Share the Fraction Decomposition Calculator!

Free chemistry, physics, biology & math calculators with step-by-step solutions. Trusted by 100,000+ students. Solve any science problem instantly!

Newsletter

Subscribe to our Newsletter to be updated. We promise not to spam.

Copyright © 2026 SciSolveLab. All Rights Reserved

Scroll to Top