Partial Fraction Decomposition Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What this partial fraction decomposition calculator does

This partial fraction decomposition calculator rewrites rational functions of the form (ax + b) / ((x − r₁)(x − r₂)) as a sum of simpler fractions. It uses a denominator already factored into linear terms and a first-degree numerator. For distinct roots, the output is A / (x − r₁) + B / (x − r₂); when r₁ = r₂, it uses the required repeated-root form.

Splitting this particular rational function makes its individual linear-factor contributions visible. That is useful before integrating with respect to x, checking a hand-derived decomposition, or matching simple terms in a Laplace-transform calculation.

Partial fraction decomposition formulas for two linear factors

The partial fraction calculation starts with the following rational function, where a, b, r₁, and r₂ are real input values:

f(x) = (ax + b) / ((x − r₁)(x − r₂))

For distinct roots r₁ ≠ r₂, this calculator seeks the decomposition

(ax + b) / ((x − r₁)(x − r₂)) = A / (x − r₁) + B / (x − r₂).

Clearing the two denominator factors produces an identity whose coefficients determine A and B:

ax + b = A(x − r₂) + B(x − r₁).

The coefficients A and B make this equality true for every permitted value of x, not merely at one selected point.

The same two-linear-factor decomposition in MathML is

ax+b (xr1) (xr2) = A xr1 + B xr2

For a repeated root, r₁ = r₂ = r, partial fraction decomposition requires both powers of the repeated linear factor:

(ax + b) / (x − r)² = A / (x − r) + B / (x − r)².

In this case the calculator still determines two coefficients, but it uses the repeated-root identity rather than the distinct-root coefficient formula.

Partial fraction decomposition: how the calculator works step by step

For the entered numerator and roots, the calculator follows the same algebra used to decompose this rational function by hand:

  1. Model the rational function. The values a, b, r₁, and r₂ specify (ax + b) / ((x − r₁)(x − r₂)).
  2. Choose the appropriate identity. With distinct roots, it uses ax + b = A(x − r₂) + B(x − r₁); equal roots use the repeated-root identity instead.
  3. Match the numerator terms. The x coefficient and constant term on the cleared-denominator identity determine the two unknown coefficients.
  4. Solve for A and B. For distinct roots it evaluates the corresponding coefficient solution; for a repeated root it uses A = a and B = b + ar.
  5. Display the decomposition. The result identifies whether the roots are distinct or repeated and writes the appropriate partial fractions.

Entering coefficients and roots for partial fraction decomposition

To describe the rational function used by this partial fraction calculator, enter values for (ax + b) / ((x − r₁)(x − r₂)) as follows:

After you submit the coefficients and roots, the calculator reports A and B and writes the partial fraction expression corresponding to those inputs.

Interpreting partial fraction decomposition results

A partial fraction result from this calculator has one of two forms, determined solely by whether the two entered roots are equal:

For integration, the displayed terms can be integrated separately: a term with 1 / (x − r) produces a logarithm, while a term with 1 / (x − r)² has a reciprocal antiderivative. For transform work, A and B are the coefficients attached to the separate linear-factor terms. As an algebra check, combine the displayed fractions over the original denominator and confirm that the numerator becomes ax + b.

Worked partial fraction example with distinct roots

Consider the rational function (3x + 5) / ((x − 1)(x − 2)). Its calculator inputs are

The distinct-root partial fraction identity is

3x + 5 = A(x − 2) + B(x − 1).

Expanding its right-hand side gives

A(x − 2) + B(x − 1) = (A + B)x + (−2A − B).

Matching the numerator coefficients gives the system

Solving produces A = −8 and B = 11, so the decomposition is

(3x + 5) / ((x − 1)(x − 2)) = −8 / (x − 1) + 11 / (x − 2).

Entering a = 3, b = 5, r₁ = 1, and r₂ = 2 produces these same distinct-root coefficients in the calculator.

Worked partial fraction example with a repeated root

For a repeated linear factor, take (2x + 3) / (x − 4)². The root 4 has multiplicity two, so use

The required repeated-root decomposition is

(2x + 3) / (x − 4)² = A / (x − 4) + B / (x − 4)².

Clearing the squared denominator yields

2x + 3 = A(x − 4) + B.

Expanding the right-hand side gives

A(x − 4) + B = Ax − 4A + B.

Matching the x coefficient and constant term gives

With A = 2, the second equation is −8 + B = 3, so B = 11. The repeated-root partial fractions are therefore

(2x + 3) / (x − 4)² = 2 / (x − 4) + 11 / (x − 4)².

Setting both root fields to 4 makes the calculator select this repeated-root form automatically.

Comparing hand calculations with this partial fraction calculator

For rational functions with two supplied linear roots, manual algebra and this focused calculator serve different parts of the partial-fraction workflow:

Approach Best for Effort Scope
Manual algebra Learning how cleared-denominator identities produce the coefficients Requires expanding, collecting terms, and solving a 2×2 system Suitable for these expressions and for practicing the underlying method
This calculator Checking A and B for expressions of the form (ax + b) / ((x − r₁)(x − r₂)) Enter a, b, r₁, and r₂ to obtain the decomposition Limited to a linear numerator and two factored linear denominator terms
General CAS tools Larger symbolic expressions or decompositions with additional factors Usually requires more symbolic setup than this focused calculation Can address broader polynomial and symbolic workflows

When this partial fraction calculator is most useful

This two-linear-factor partial fraction calculator is particularly useful in the following settings:

Assumptions and limitations of this partial fraction decomposition calculator

This partial fraction calculator intentionally handles one specific rational form, so its inputs and output rely on these algebraic assumptions:

If the denominator has more factors, is not already factored, or uses complex coefficients, use additional algebra before applying this tool or choose a more general symbolic partial-fractions method.

Typical follow-up steps after partial fraction decomposition

Once this calculator has separated the rational function into partial fractions, common next steps include:

Arcade Mini-Game: Partial Fraction Decomposition Calculator Calibration Run

Use this quick arcade run to practice recognizing the numerator coefficients and roots that define a partial fraction decomposition.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful partial-fraction inputs and avoid unsuitable assumptions.

Enter coefficients and roots.

Status messages will appear here.