Skip to content
Math & Scientific

Partial Fractions Calculator

Partial Fractions Calculator

Split a rational function into simple partial fractions — with the cover-up steps shown line by line.

Numerator: px + q
Denominator: (x − a)(x − b), two different linear factors

A Partial Fractions Calculator breaks a rational function — one polynomial divided by another — into a sum of simpler fractions that are much easier to work with. A fraction like (3x + 5) / ((x − 1)(x + 2)) looks intimidating, but it is exactly equal to (8/3)/(x − 1) + (1/3)/(x + 2), and each of those pieces can be integrated, graphed, or analyzed on its own. This calculator performs that split for the most common case, a linear numerator over two different linear factors, and shows every step of the classic cover-up method so you can follow the logic instead of just copying an answer.

What the Partial Fractions Calculator Does

Partial fraction decomposition rewrites a complicated rational expression as a sum of fractions with simple denominators. The calculator takes a numerator of the form px + q and a denominator of the form (x − a)(x − b), where a and b are different numbers, and finds the two constants A and B such that (px + q)/((x − a)(x − b)) = A/(x − a) + B/(x − b). It displays the finished decomposition as the headline result, then walks through the cover-up method: substituting x = a to isolate A, substituting x = b to isolate B, and finally verifying that A + B equals p. When all your inputs are whole numbers, the answers are shown as exact fractions like 8/3, alongside their decimal values.

How to Use the Partial Fractions Calculator

Start with the numerator. If your fraction is (3x + 5)/((x − 1)(x + 2)), the numerator is 3x + 5, so enter 3 for p (the coefficient of x) and 5 for q (the constant term). Next, look at the denominator factors. Each factor has the shape (x − a): for (x − 1), a = 1, and for (x + 2), a = −2, so enter 1 and −2. The two factors must be different — if a equals b, the calculator will ask you to change one, because repeated factors need a different decomposition setup. Press Calculate to see the decomposition, the step-by-step cover-up working, and the verification check. Press Reset to clear everything and start a new problem.

The Cover-Up Method and the Formula

The idea behind the method is simple. If (px + q)/((x − a)(x − b)) = A/(x − a) + B/(x − b), multiplying both sides by the denominator gives px + q = A(x − b) + B(x − a), which must be true for every value of x. Choose x = a, and the B term vanishes because (a − a) = 0, leaving pa + q = A(a − b), so A = (pa + q)/(a − b). Choose x = b, and the A term vanishes, leaving pb + q = B(b − a), so B = (pb + q)/(b − a). That is the whole formula — two substitutions, two divisions. The calculator also runs a built-in sanity check: expanding A/(x − a) + B/(x − b) shows the coefficient of x is A + B, so A + B must equal p, and the result panel confirms this match.

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

Enter p = 3, q = 5, a = 1, b = −2 and press Calculate. Step 1 — find A by setting x = 1: 3(1) + 5 = A(1 − (−2)), which simplifies to 8 = 3A, so A = 8/3 ≈ 2.6667. Step 2 — find B by setting x = −2: 3(−2) + 5 = B((−2) − 1), which simplifies to −1 = −3B, so B = 1/3 ≈ 0.3333. The decomposition is therefore (8/3)/(x − 1) + (1/3)/(x + 2). Step 3 — verify: A + B = 8/3 + 1/3 = 9/3 = 3, which matches p = 3, so the split is correct. You can double-check by hand: putting the two pieces back over the common denominator (x − 1)(x + 2) gives (8/3)(x + 2) + (1/3)(x − 1) = (8x + 16 + x − 1)/3 = (9x + 15)/3 = 3x + 5, the original numerator.

Worked Example: (x − 4) / ((x − 2)(x − 3))

Enter p = 1, q = −4, a = 2, b = 3 and press Calculate. Step 1 — set x = 2: 1(2) + (−4) = A(2 − 3), so −2 = −A, giving A = 2. Step 2 — set x = 3: 1(3) + (−4) = B(3 − 2), so −1 = B, giving B = −1. Because B is negative, the decomposition is written with a minus sign: 2/(x − 2) − 1/(x − 3). Step 3 — verify: A + B = 2 + (−1) = 1, which matches p = 1. Recombining confirms it: 2(x − 3) − 1(x − 2) = 2x − 6 − x + 2 = x − 4, the original numerator. This example shows why the calculator formats a negative B as subtraction — 2/(x − 2) − 1/(x − 3) is much easier to read than 2/(x − 2) + (−1)/(x − 3).

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

Enter p = 2, q = −1, a = −3, b = 4 and press Calculate. Watch the signs carefully here. Step 1 — set x = −3: 2(−3) + (−1) = A((−3) − 4), so −7 = −7A, giving A = 1. Step 2 — set x = 4: 2(4) + (−1) = B(4 − (−3)), so 7 = 7B, giving B = 1. The decomposition is simply 1/(x + 3) + 1/(x − 4). Step 3 — verify: A + B = 1 + 1 = 2, matching p = 2. This tidy result is a good reminder to always write (x + 3) as the factor (x − (−3)) mentally — the root a is −3, not 3, and mixing that up is the single most common source of wrong answers in partial fractions.

Reading Your Result

The large line at the top is the finished decomposition, ready to use: A over the first factor plus or minus B over the second factor. Below it, the breakdown panel repeats the three cover-up steps with your actual numbers substituted in, so you can trace exactly where each value came from. The verification line is worth a glance every time — A + B equaling p is a strong signal that both constants are right, because an arithmetic slip in either step would almost certainly break the match. The closing note reminds you of the scope: this tool covers the distinct-linear-factors case, which is the version taught first and used most, while repeated factors like (x − 1)² or irreducible quadratics like (x² + 1) follow different rules.

Common Mistakes in Partial Fractions

The most frequent error is misreading the factor: in (x + 2), the root is −2, not 2, because the factor has the form (x − a) with a = −2. Next is trying the method on equal factors — if a = b, the denominator is (x − a)² and the correct setup needs an extra term C/(x − a)², which this calculator does not attempt. Students also forget that the degree of the numerator must be smaller than the degree of the denominator; if the numerator is quadratic or higher over two linear factors, long division comes first. Sign slips in the cover-up arithmetic are common too, especially with negative roots, which is why writing each substitution as its own line matters. Finally, never skip the A + B = p check — it catches nearly every mistake in under five seconds.

Frequently Asked Questions

1. What is partial fraction decomposition?

It is the process of rewriting a rational function as a sum of simpler fractions. Instead of one complicated fraction, you get two or more easy ones that add up to exactly the same thing.

2. Why would anyone decompose a fraction?

Simple fractions are easier to integrate, easier to expand as series, and easier to analyze with transforms. Many calculus and engineering problems become routine once the integrand is split into partial fractions.

3. What does the cover-up method do?

It finds each constant by substituting the root of one factor, which makes every other term zero. Covering up (x − a) and setting x = a isolates A in a single step.

4. What are A and B in the result?

They are the constants in the numerators of the decomposed fractions: A/(x − a) + B/(x − b). Once you know A and B, the decomposition is complete.

5. Why must the two factors be different?

With distinct factors, each constant is found by one clean substitution. A repeated factor like (x − 1)² needs an additional term of the form C/(x − 1)², which is a different problem setup.

6. How do I find a and b from my denominator?

Factor the denominator and read each root. For (x − 1)(x + 2), the roots are 1 and −2, because x + 2 is x − (−2).

7. What if my numerator is just a constant?

Enter 0 for p and the constant for q. The method works exactly the same way — the cover-up substitutions do not care whether p is zero.

8. What if the numerator has a higher degree than the denominator?

Do polynomial long division first. The remainder will have a smaller degree than the denominator, and you decompose the remainder’s fraction.

9. How do I check my own answer by hand?

Recombine the pieces over the common denominator and confirm you get the original numerator. Also verify that A + B equals the coefficient of x.

10. Why is a negative B shown as subtraction?

Because 2/(x − 2) − 1/(x − 3) is clearer than 2/(x − 2) + (−1)/(x − 3). They mean exactly the same thing; the minus sign is just better formatting.

11. Can the factors be in any order?

Yes. Swapping the two factors swaps A and B along with them, and the sum is identical. Enter them in whichever order is convenient.

12. What are partial fractions used for in calculus?

Mainly integration. The integral of A/(x − a) is A·ln|x − a|, so a decomposed fraction integrates term by term with no special tricks.

13. Do the roots have to be integers?

No. The calculator accepts decimals too, and shows decimal answers in that case. Integer inputs give exact fractions like 8/3 as a bonus.

14. What is the most common sign mistake?

Reading (x + 2) as root 2 instead of −2. Always rewrite the factor mentally as (x − a) first, then read off a.

15. Where else do partial fractions appear?

In Laplace transforms for differential equations, in control theory transfer functions, and in any algebra course that prepares students for integral calculus.

Final Thoughts

Partial fractions turn one scary rational function into a couple of friendly ones, and the cover-up method makes the whole job feel almost too easy. The Partial Fractions Calculator handles the arithmetic and the bookkeeping, but the real value is in the steps it shows: watch how each substitution kills one term and isolates one constant, run the A + B check, and the method will be yours for every exam and homework set ahead.