Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Partial Fraction Decomposition
A = -1.5, B = 2.5
= -1.5/(x − a) + 2.5/(x − b)
Coefficient A -1.5
Coefficient B 2.5

What this calculator does

This tool performs partial fraction decomposition for a proper rational expression with two distinct linear factors in the denominator. Given a numerator of the form px + q and a denominator (x − a)(x − b), it splits the fraction into two simple terms A/(x − a) and B/(x − b). This is one of the most common techniques in algebra and calculus, especially when integrating rational functions.

How to use it

Enter the numerator coefficients p and q (so the top of the fraction is px + q), then enter the two roots a and b that define the factors (x − a) and (x − b). The roots must be different. The calculator returns the constants A and B that make the decomposition an exact identity.

The formula explained

We require $$\frac{px+q}{(x-a)(x-b)} = \frac{A}{x-a} + \frac{B}{x-b}.$$ Multiplying through gives \(px + q = A(x - b) + B(x - a)\). Using the cover-up method, substitute \(x = a\) to isolate A: $$A = \frac{pa + q}{a - b}.$$ Substitute \(x = b\) to isolate B: $$B = \frac{pb + q}{b - a}.$$ These two closed-form expressions are exactly what the calculator evaluates.

Advertisement
Diagram showing a single rational fraction splitting into two simpler fractions
Partial fraction decomposition splits one fraction into a sum of two simpler ones over each linear factor.

Worked example

Decompose \(\frac{3x + 5}{(x - 1)(x - 2)}\). Here \(p = 3\), \(q = 5\), \(a = 1\), \(b = 2\). Then $$A = \frac{3\cdot 1 + 5}{1 - 2} = \frac{8}{-1} = -8,$$ and $$B = \frac{3\cdot 2 + 5}{2 - 1} = \frac{11}{1} = 11.$$ So the decomposition is \(\frac{-8}{x - 1} + \frac{11}{x - 2}\).

Cover-up method illustration computing coefficient A by hiding a factor
The cover-up method: evaluate the remaining expression at each root to read off A and B.

FAQ

Why must a and b be distinct? If \(a = b\) the denominator has a repeated factor \((x - a)^2\), which needs a different form \(\frac{A}{x - a} + \frac{B}{(x - a)^2}\), so this simple two-term formula no longer applies.

Does the numerator have to be px + q? The numerator must be of degree lower than the denominator (a proper fraction). A linear numerator px + q is the general case here; set \(p = 0\) for a constant numerator.

What if my factors look like (x + c)? Rewrite \((x + c)\) as \((x - (-c))\), so the corresponding root is \(a = -c\).

Last updated: