dash–calculator

04 Numbers and Counting

Partial Fractions Calculator: Step-by-Step Decomposition

Readout 04-0626 · Updated · Standard formula, shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

This partial fractions calculator takes a rational function (a fraction of two polynomials) and breaks it into simpler fractional pieces. You enter the numerator and denominator polynomials, and the calculator returns the partial fraction decomposition along with the constants for each term. It handles proper fractions with linear and quadratic factors, including repeated factors.

Formula

Given a rational function \( \frac{N(x)}{D(x)} \) where \( N(x) \) and \( D(x) \) are polynomials with real coefficients, the partial fraction decomposition rewrites the fraction as a sum of simpler terms. The exact form depends on the factorization of \( D(x) \):

  • Distinct linear factors: For each factor \( (ax + b) \), include \( \frac{A}{ax + b} \).
  • Repeated linear factors: For \( (ax + b)^n \), include \( \frac{A_1}{ax + b} + \frac{A_2}{(ax + b)^2} + \dots + \frac{A_n}{(ax + b)^n} \).
  • Distinct irreducible quadratic factors: For \( (ax^2 + bx + c) \), include \( \frac{Ax + B}{ax^2 + bx + c} \).
  • Repeated quadratic factors: For \( (ax^2 + bx + c)^n \), include \( \frac{A_1x + B_1}{ax^2 + bx + c} + \dots + \frac{A_nx + B_n}{(ax^2 + bx + c)^n} \).

If the degree of \( N(x) \) is greater than or equal to the degree of \( D(x) \), you must first perform polynomial long division to get a polynomial quotient plus a proper fraction, then decompose the proper fraction.

The constants \( A, B, A_i, B_i \) are found by equating coefficients or by substituting convenient values of \( x \).

Worked Example

Using the default inputs: numerator coefficients 1, 3, 2 (which is \( x^2 + 3x + 2 \)) and denominator coefficients 1, 3, 2 (which is \( x^2 + 3x + 2 \)). The numerator and denominator are identical, so the fraction simplifies to 1. The partial fraction decomposition is simply the polynomial 1, with no fractional parts.

Let’s verify: \( \frac{x^2 + 3x + 2}{x^2 + 3x + 2} = 1 \). The calculator outputs 1 as the decomposition.

For a more typical example, take \( \frac{3x + 5}{(x+1)(x+2)} \). Expand the denominator: \( x^2 + 3x + 2 \). The numerator coefficients are 3, 5 (but you’d enter 0, 3, 5 to match degree 2). The decomposition is \( \frac{A}{x+1} + \frac{B}{x+2} \). Solving gives \( A = 2 \), \( B = 1 \), so the result is \( \frac{2}{x+1} + \frac{1}{x+2} \).

How the Calculator Works

This calculator uses symbolic algebra to perform the decomposition. It first checks whether the fraction is proper (degree of numerator < degree of denominator). If not, it performs polynomial long division. Then it factors the denominator into linear and irreducible quadratic factors over the reals. For each factor, it sets up the appropriate form with unknown constants. Finally, it solves the system of linear equations that results from equating coefficients.

The calculator accepts polynomial coefficients as a comma-separated list, from highest degree to constant term. For example, to enter \( 2x^3 – x + 4 \), type 2, 0, -1, 4. The zero coefficient for \( x^2 \) is required.

When to Use Partial Fractions

Partial fraction decomposition is a technique used in calculus to integrate rational functions, in control theory for inverse Laplace transforms, and in solving differential equations. It breaks a complex fraction into pieces that are easier to integrate or invert.

Common applications include:

  • Integrating functions like \( \int \frac{3x+5}{x^2+3x+2} \, dx \) by decomposing into \( \int \frac{2}{x+1} \, dx + \int \frac{1}{x+2} \, dx \).
  • Finding inverse Laplace transforms of transfer functions in engineering.
  • Simplifying complex rational expressions in algebra.

Common Mistakes and Pitfalls

Here are frequent errors when doing partial fractions by hand:

  • Forgetting to check if the fraction is proper. If the numerator degree is equal or higher, you must divide first. For example, \( \frac{x^3}{x^2+1} \) needs long division to get \( x – \frac{x}{x^2+1} \).
  • Missing repeated factors. For \( (x+1)^2 \), you need both \( \frac{A}{x+1} \) and \( \frac{B}{(x+1)^2} \).
  • Using wrong form for irreducible quadratics. For \( x^2+1 \), the numerator must be \( Ax+B \), not just a constant.
  • Mixing up signs when equating coefficients. Double-check your algebra.
  • Not factoring the denominator completely. Over the reals, every polynomial factors into linear and quadratic terms, but you must find them.

How to Choose the Right Method

If you’re doing this by hand, the method depends on the denominator’s factorization:

  • All distinct linear factors: Use the cover-up method (substitute roots to solve for constants quickly).
  • Repeated linear factors: Use the cover-up method for the highest power, then equate coefficients for the rest.
  • Quadratic factors: Equate coefficients or substitute convenient values (like \( x=0 \)) to solve a system.
  • Improper fraction: Perform polynomial long division first, then decompose the remainder.

For a calculator, you just enter the coefficients and get the result directly. But understanding the method helps you verify the output and handle special cases like complex roots.

Limitations and Accuracy

This calculator works with real coefficients and returns real linear and quadratic factors. If the denominator has complex roots that are not real, they appear as irreducible quadratics. The calculator does not handle symbolic coefficients (like \( a \) or \( b \)) — you must enter numeric values. It also assumes the coefficients are integers or decimals; very large coefficients may cause rounding errors.

The decomposition is unique for a given proper rational function, so the result is exact up to the precision of the arithmetic. For repeated factors, the calculator lists all terms in the standard order.

Frequently Asked Questions

What if my numerator degree is higher than the denominator? The calculator automatically performs polynomial long division first. The output will include a polynomial part plus the decomposition of the remainder. For example, \( \frac{x^3}{x^2-1} \) becomes \( x + \frac{x}{x^2-1} \), then \( x + \frac{1}{2(x-1)} + \frac{1}{2(x+1)} \).

Can I use this for integration? Yes. Once you have the partial fractions, each term can be integrated using basic rules: \( \int \frac{A}{ax+b} \, dx = \frac{A}{a} \ln|ax+b| + C \), and for quadratics, you may need to complete the square or use arctangent formulas.

How do I enter a polynomial with missing terms? You must include zero for each missing degree. For example, \( x^2 – 1 \) is entered as 1, 0, -1. Omitting the zero will shift the coefficients and give a wrong result.

What does “irreducible quadratic” mean? It means the quadratic has no real roots, like \( x^2+1 \). It cannot be factored into real linear factors. In the decomposition, you use \( \frac{Ax+B}{x^2+1} \).

Why is my result different from a textbook answer? The decomposition is unique, but constants might be written in different forms (e.g., \( \frac{1}{2} \) vs \( 0.5 \)). Also, some textbooks use different signs or ordering of terms. Check that the sum of your partial fractions equals the original fraction.

Can the calculator handle complex coefficients? No, it only accepts real numbers. For complex roots, you can still use the quadratic factor form with real coefficients.

Related

Formula used
in num | Numerator coefficients (highest degree first) | - | 1, 3, 2 | - | -
in den | Denominator coefficients (highest degree first) | - | 1, 3, 2 | - | -
out dec | Decomposition | - | partial_fraction(num, den) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Numbers and Counting panel →