This calculator decomposes rational functions of the form (ax + b) / ((x − r₁)(x − r₂)) into a sum of simpler fractions. It assumes the denominator is already factored into linear terms and that the numerator is a first–degree polynomial. The output is written as A / (x − r₁) + B / (x − r₂) for distinct roots, or in a repeated-root form when r₁ = r₂.
Partial fraction decomposition is widely used in calculus, differential equations, and control theory. By rewriting a single complicated fraction as a sum of simple fractions, standard integral and Laplace-transform formulas become easy to apply.
The calculator works with rational functions of the form (for real parameters a, b, r₁, r₂):
f(x) = (ax + b) / ((x − r₁)(x − r₂))
For distinct roots r₁ ≠ r₂, the decomposition is
(ax + b) / ((x − r₁)(x − r₂)) = A / (x − r₁) + B / (x − r₂).
Multiplying both sides by (x − r₁)(x − r₂) and equating coefficients yields a linear system for A and B. In expanded form, this identity is
ax + b = A(x − r₂) + B(x − r₁).
The parameters A and B are chosen so that this equality holds for all x.
The same relationship can be written using MathML. The general form is
When r₁ = r₂ = r (a repeated root), the denominator becomes (x − r)² and the expression is
(ax + b) / (x − r)² = A / (x − r) + B / (x − r)².
In that case there is still a pair of unknowns A and B, but they are related to a, b, and r in a slightly different way (the calculator handles this automatically).
The tool automates the algebraic steps you would normally do by hand:
(ax + b) / ((x − r₁)(x − r₂)). The inputs a, b, r₁, and r₂ define
this function.
(ax + b) = A(x − r₂) + B(x − r₁) (distinct roots) or the
corresponding repeated-root identity.
Near the form, you can think of the underlying function as (ax + b) / ((x − r₁)(x − r₂)):
Once you enter these values and click the button, the calculator computes and displays the corresponding A and B together with the decomposed expression.
The output has one of two standard forms:
(ax + b) / ((x − r₁)(x − r₂)) = A / (x − r₁) + B / (x − r₂).
(ax + b) / (x − r)² = A / (x − r) + B / (x − r)².
In an integration context, these forms map directly to standard antiderivatives such as ∫(1 / (x − r)) dx = ln|x − r| and ∫(1 / (x − r)²) dx = −1 / (x − r) + C. In a Laplace-transform context, the coefficients tell you how to express a transfer function as a sum of simpler transform pairs.
Suppose you want to decompose
(3x + 5) / ((x − 1)(x − 2)). Here
The identity is
3x + 5 = A(x − 2) + B(x − 1).
Expanding the right-hand side gives
A(x − 2) + B(x − 1) = (A + B)x + (−2A − B).
Equating coefficients of x and the constant term produces the system
Solving this system yields A = −8 and B = 11. Therefore,
(3x + 5) / ((x − 1)(x − 2)) = −8 / (x − 1) + 11 / (x − 2).
In the calculator, entering a = 3, b = 5, r₁ = 1, and r₂ = 2 will return the same decomposition automatically.
Next, consider a repeated root example:
(2x + 3) / (x − 4)². Here the denominator has a single root r = 4 of
multiplicity 2, so
We seek A and B such that
(2x + 3) / (x − 4)² = A / (x − 4) + B / (x − 4)².
Multiplying by (x − 4)² yields
2x + 3 = A(x − 4) + B.
Expanding and collecting terms:
A(x − 4) + B = Ax − 4A + B.
Matching coefficients gives
Substituting A = 2 into the second equation yields −8 + B = 3, so B = 11. Thus,
(2x + 3) / (x − 4)² = 2 / (x − 4) + 11 / (x − 4)².
Setting r₁ = r₂ = 4 in the calculator reproduces this result and clearly labels the repeated-root case.
| Approach | Best for | Effort | Scope |
|---|---|---|---|
| Manual algebra | Learning the method; exam practice with a small number of simple fractions | Requires expanding, collecting terms, and solving a 2×2 system | Any suitable expression, but becomes tedious with many terms or more complicated denominators |
| This calculator | Quick checks, homework verification, and routine problems of the form (ax + b) / ((x − r₁)(x − r₂)) | Instant; you only enter a, b, r₁, and r₂ | Limited to factored quadratic denominators with linear numerator |
| General CAS tools | Large or complex expressions, higher-degree polynomials, and symbolic workflows | Often more setup and a steeper learning curve than this focused tool | Very broad; can handle unfactored denominators, complex roots, and higher degrees |
You will typically use this partial fraction decomposition calculator in the following situations:
To keep the interface simple and fast, this calculator makes several intentional assumptions:
For expressions outside these bounds—such as higher-degree denominators, unfactored polynomials, or complex coefficients—you will generally need a more general computer algebra system or a more advanced partial fractions tool.
After obtaining the partial fraction decomposition, common next steps are: