Partial Fraction Decomposition Calculator (Free)

AlgebraFreeNo sign-up

A partial fraction decomposition calculator rewrites one rational function as a sum of simpler fractions. For (5x − 4)/((x − 1)(x − 2)), cover up (x − 1) and put x = 1: A = 1/(−1) = −1. Cover up (x − 2) and put x = 2: B = 6/1 = 6. So the answer is −1/(x − 1) + 6/(x − 2).

Partial fraction decomposition
Type the denominator expanded (x^3 − x) or factored ((x − 1)^2(x^2 + 1)); the calculator factors it either way. Use ^ for powers.
Try:
Partial fractions
−1/(x − 1) + 3/(x − 1)² + (x − 1)/(x² + 1)

(x² + 2x + 3)/((x − 1)²(x² + 1)) = −1/(x − 1) + 3/(x − 1)² + (x − 1)/(x² + 1)
Repeated linear, power 1−1/(x − 1)
Repeated linear, power 23/(x − 1)²
Irreducible quadratic(x − 1)/(x² + 1)
✓ Check: adding the partial fractions back over (x − 1)²(x² + 1) gives numerator x² + 2x + 3. At x = 2 the original equals 11/5 and the decomposition equals 11/5.
Show steps
  1. Start with (x² + 2x + 3)/(x⁴ − 2x³ + 2x² − 2x + 1).
  2. Factor the denominator: x⁴ − 2x³ + 2x² − 2x + 1 = (x − 1)²(x² + 1). (x − 1)²: repeated linear factor (power 2); (x² + 1): irreducible quadratic factor (discriminant −4 < 0).
  3. Write one term for every power of every factor; a linear factor gets a constant on top, a quadratic gets a linear numerator: (x² + 2x + 3)/((x − 1)²(x² + 1)) = A/(x − 1) + B/(x − 1)² + (Cx + D)/(x² + 1).
  4. Cover-up shortcut for the highest power of each linear factor: multiply by that factor and substitute its root. B: cover up (x − 1)² and put x = 1: B = 6/2 = 3.
  5. Multiply both sides by (x − 1)²(x² + 1): x² + 2x + 3 = A·(x − 1)(x² + 1) + B·(x² + 1) + Cx·(x − 1)² + D·(x − 1)². Expand and match the coefficient of each power of x:
    x³: A + C = 0x²: −A + B − 2C + D = 1x: A + C − 2D = 2constant: −A + B + D = 3
  6. Solve this 4 × 4 linear system: A = −1, B = 3, C = 1, D = −1.
  7. Put the values back: −1/(x − 1) + 3/(x − 1)² + (x − 1)/(x² + 1).
  8. Check by recombining: the fractions add back to the original, and at x = 2 both sides equal 11/5.

Partial Fraction Decomposition Calculator (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the partial fraction decomposition calculator

  1. On Rational expression, type the numerator and the denominator. The denominator can be expanded (x^3 + 4x) or factored ((x − 1)^2(x^2 + 1)); use ^ for powers.
  2. For the classic textbook case, open Distinct roots (cover-up) and type the numerator and the roots of the denominator, such as 1, 2.
  3. Press Decompose. You get the decomposition with exact fractions, each term labeled by factor type, a recombination check, and the full working.

The calculator cancels common factors, divides first when the fraction is improper, factors the denominator over the rational numbers (including quadratic pairs such as x⁴ + 4 = (x² − 2x + 2)(x² + 2x + 2)), and finds every coefficient exactly.

Which terms each factor gives

After the denominator is fully factored, every factor contributes terms to the answer:

Factor in the denominator Terms in the decomposition
Distinct linear (x − a) A/(x − a)
Repeated linear (x − a)³ A/(x − a) + B/(x − a)² + C/(x − a)³
Irreducible quadratic x² + bx + c (Ax + B)/(x² + bx + c)
Repeated quadratic (x² + bx + c)² (Ax + B)/(x² + bx + c) + (Cx + D)/(x² + bx + c)²

A quadratic is irreducible when it has no rational roots, for example when b² − 4c < 0. The number of unknown coefficients always equals the degree of the denominator.

How to do partial fraction decomposition

  1. Check the degrees. If the numerator’s degree is at least the denominator’s, the fraction is improper: use polynomial long division first and decompose only the remainder.
  2. Factor the denominator completely into linear and irreducible quadratic factors.
  3. Write the form from the table above, with unknowns A, B, C, …
  4. Solve for the unknowns. Use the cover-up method for linear factors, then multiply both sides by the denominator and match the coefficients of each power of x for the rest.
  5. Check by adding the fractions back over the common denominator, or by plugging in a value of x.

The cover-up method

For a non-repeated linear factor (x − a), cover that factor in the original fraction and substitute x = a into what is left. The result is its coefficient. It also gives the coefficient of the highest power of a repeated linear factor. The other coefficients of repeated factors, and the numerators of quadratic factors, come from matching coefficients; the calculator shows that linear system and its solution.

Worked examples

Distinct linear factors

For (x + 7)/((x + 1)(x − 3)): at x = −1, A = 6/(−4) = −3/2; at x = 3, B = 10/4 = 5/2. So (x + 7)/((x + 1)(x − 3)) = −3/(2(x + 1)) + 5/(2(x − 3)). Check at x = 0: the original is 7/(−3) = −7/3, and −3/2 − 5/6 = −7/3.

A repeated linear factor

For (3x + 5)/(x + 2)², write A/(x + 2) + B/(x + 2)². Then 3x + 5 = A(x + 2) + B. Matching x terms gives A = 3, and the constants give 2A + B = 5, so B = −1. The answer is 3/(x + 2) − 1/(x + 2)².

An irreducible quadratic factor

For (2x² + x + 4)/(x³ + 4x), factor x³ + 4x = x(x² + 4). Write A/x + (Bx + C)/(x² + 4). Cover-up at x = 0 gives A = 4/4 = 1. Then 2x² + x + 4 = (x² + 4) + (Bx + C)x, so B = 1 and C = 1. The answer is 1/x + (x + 1)/(x² + 4).

An improper fraction

For (x³ + 2)/(x² − 1), divide first: x³ + 2 = x(x² − 1) + (x + 2). Decompose (x + 2)/((x + 1)(x − 1)) by cover-up: −1/(2(x + 1)) and 3/(2(x − 1)). So (x³ + 2)/(x² − 1) = x − 1/(2(x + 1)) + 3/(2(x − 1)).

Partial fractions in integration

Partial fractions are mainly a Calculus 2 tool: each simple term has a standard antiderivative. For example, 1/(x² − 1) = ½[1/(x − 1) − 1/(x + 1)], so ∫ 1/(x² − 1) dx = ½ ln|x − 1| − ½ ln|x + 1| + C.

  • ∫ A/(x − a) dx = A ln|x − a| + C
  • ∫ A/(x − a)ⁿ dx = −A/((n − 1)(x − a)ⁿ⁻¹) + C for n ≥ 2
  • ∫ (x + 1)/(x² + 4) dx = ½ ln(x² + 4) + ½ arctan(x/2) + C

The same decompositions are used for inverse Laplace transforms and for sums that telescope.

Common mistakes to avoid

Mistake Fix
Decomposing an improper fraction directly Divide first; only the remainder over the denominator is split.
One term for a repeated factor (x − a)² needs both A/(x − a) and B/(x − a)².
A constant over a quadratic factor An irreducible quadratic needs a linear numerator Ax + B.
Wrong sign in the cover-up value For (x + 2), substitute x = −2, not 2.
Not checking the answer Add the fractions back, or test one value of x on both sides.

Checking homework with the calculator

Before entering a problem, make sure the denominator is typed exactly, with ^ for powers and parentheses around each factor. Work the problem by hand, then compare each coefficient with the calculator’s steps. If they differ, the setup step (which terms you wrote) is the usual culprit. For practice, try 4/((x − 1)(x + 1)), whose answer is 2/(x − 1) − 2/(x + 1).

Partial fraction decomposition practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the partial fraction decomposition of 1/((x − 1)(x + 1))?

Found a mistake? Let us know!

2. Using the cover-up method on (3x + 1)/((x − 1)(x + 2)), what is the coefficient of 1/(x − 1)?

Found a mistake? Let us know!

3. Which form is correct for (2x + 3)/(x − 4)²?

Found a mistake? Let us know!

4. Which form is correct for (x + 5)/(x(x² + 9))?

Found a mistake? Let us know!

5. What must you do first with (x³ + 1)/(x² − 4)?

Found a mistake? Let us know!

6. How many unknown coefficients does the decomposition of a fraction with denominator (x − 1)²(x² + 1) have?

Found a mistake? Let us know!

7. What is (3x + 5)/(x + 2)² in partial fractions?

Found a mistake? Let us know!

8. Which quadratic is irreducible over the real numbers?

Found a mistake? Let us know!

9. What is ∫ 1/((x − 1)(x + 2)) dx?

Found a mistake? Let us know!

10. What is x/((x − 2)(x − 3)) in partial fractions?

Found a mistake? Let us know!

Frequently asked questions

What is partial fraction decomposition?

It is the reverse of adding fractions: a rational function such as (5x − 4)/((x − 1)(x − 2)) is split into simpler fractions, here −1/(x − 1) + 6/(x − 2), whose denominators are the factors of the original denominator.

When do you use partial fraction decomposition?

Mostly to integrate rational functions, and also for inverse Laplace transforms, telescoping series and some differential equations. The simple pieces are much easier to work with than the original fraction.

Is partial fraction decomposition calculus?

The technique itself is algebra and appears in precalculus. It is taught most heavily in Calculus 2 as an integration method, for example ∫ 3/((x − 1)(x + 2)) dx = ln|x − 1| − ln|x + 2| + C.

Why does partial fraction decomposition work?

A proper rational function can always be written as a unique sum of terms, one for each power of each irreducible factor of its denominator. Because the form is unique, matching coefficients always gives exactly one solution.

Is partial fraction decomposition hard?

Distinct linear factors are quick with the cover-up method. Repeated and quadratic factors take more algebra because you solve a small linear system, and most errors come from writing the wrong form. The steps above show each part.

Related calculators

More algebra calculators

Browse all 541 calculators

Related to This Article

What people say about "Partial Fraction Decomposition Calculator With Steps"?

No one replied yet.

Leave a Reply