Partial Fraction Decomposition Calculator
What this partial fraction decomposition calculator does
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.
Core formulas
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).
Introduction: How the calculator works step by step
The tool automates the algebraic steps you would normally do by hand:
-
Model the function. You are working with
(ax + b) / ((x − r₁)(x − r₂)). The inputs a, b, r₁, and r₂ define this function. -
Form the identity. The calculator sets up either
(ax + b) = A(x − r₂) + B(x − r₁)(distinct roots) or the corresponding repeated-root identity. - Expand and collect terms. It expands the right-hand side and groups coefficients of x and constants.
- Solve for A and B. From the grouped coefficients, it solves a 2×2 linear system to find A and B.
- Return the decomposition. The result is displayed as A / (x − r₁) + B / (x − r₂) or in repeated-root form when r₁ = r₂.
How to use the inputs
Near the form, you can think of the underlying function as (ax + b) / ((x − r₁)(x − r₂)):
- Numerator coefficient a is the coefficient of x in the numerator ax + b.
- Numerator coefficient b is the constant term in the numerator.
- Root r₁ is the first root of the denominator, so (x − r₁) is a factor.
- Root r₂ is the second root of the denominator, so (x − r₂) is a factor. If you have a repeated root, set r₂ = 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.
Interpreting the results
The output has one of two standard forms:
-
Distinct roots:
(ax + b) / ((x − r₁)(x − r₂)) = A / (x − r₁) + B / (x − r₂). -
Repeated root (r₁ = 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.
Worked example (distinct roots)
Suppose you want to decompose
(3x + 5) / ((x − 1)(x − 2)). Here
- a = 3,
- b = 5,
- r₁ = 1,
- r₂ = 2.
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
- A + B = 3,
- −2A − B = 5.
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.
Worked example (repeated root)
Next, consider a repeated root example:
(2x + 3) / (x − 4)². Here the denominator has a single root r = 4 of
multiplicity 2, so
- a = 2,
- b = 3,
- r₁ = 4,
- r₂ = 4.
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
- A = 2,
- −4A + B = 3.
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.
Comparison: manual work vs this calculator
| 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 |
When this calculator is most useful
You will typically use this partial fraction decomposition calculator in the following situations:
- Calculus: turning integrals of rational functions into sums of simple integrals.
- Differential equations: simplifying expressions that arise when solving linear ODEs.
- Control theory and circuits: decomposing transfer functions to apply standard Laplace-transform pairs.
- Homework checks: quickly verifying by calculator what you have worked out by hand.
Assumptions and limitations
To keep the interface simple and fast, this calculator makes several intentional assumptions:
- Linear numerator only. The numerator must be of the form ax + b. Higher-degree numerators require algebraic long division first, which is not handled here.
- Factored quadratic denominator. The denominator must have the form (x − r₁)(x − r₂). You must supply the roots themselves, not the raw quadratic coefficients.
- Real parameters. The interface is designed around real values of a, b, r₁, and r₂. Complex roots are not explicitly supported.
- Repeated roots allowed via r₁ = r₂. You can model a repeated root by entering the same value for r₁ and r₂, which corresponds to a denominator of (x − r)².
- Non-degenerate denominator. If parameter choices effectively make the denominator zero for all x (for example, a malformed input that does not describe a valid quadratic factorization), the decomposition is undefined, and the calculator may return an error or no result.
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.
Typical follow-up steps
After obtaining the partial fraction decomposition, common next steps are:
- Integrating term by term. Use the standard antiderivatives for 1 / (x − r) and 1 / (x − r)² to compute integrals quickly.
- Applying Laplace transforms. Match each term to a table entry (for example, 1 / (s − a) ↔ eat) to invert transforms or analyze system behavior.
- Checking algebra. Multiply the result back together to recover the original numerator and verify correctness.
Arcade Mini-Game: Partial Fraction Decomposition Calculator Calibration Run
Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
Status messages will appear here.
