Omni Calculator logo

Partial Fraction Decomposition Calculator

Created by Maciej Kowalski, PhD candidate
Reviewed by Steven Wooding
Last updated: Jun 05, 2023


Welcome to Omni's partial fraction decomposition calculator, where we'll take a rational expression and write it as several simpler ones. The process can prove very useful, for instance, when computing integrals: the initial function may be tricky to deal with, but the individual summands; not so much. We'll learn all the partial fraction decomposition rules (there aren't many, don't worry) and see how to do partial fraction decomposition on a nice example.

So without further ado, let's see what this partial fraction expansion is all about!

Polynomials, rational expressions, factorization

Polynomials are algebraic expressions that contain variables only in non-negative integer powers. In other words, they describe functions that consist of numbers, letters (i.e., variables), and basic arithmetic expressions. However, the variables cannot appear under a root, inside functions (e.g., trigonometric functions or logarithms), with fractional powers, etc.

A few examples of polynomials are:

  • x+2yx + 2y;

  • a2+2ab+ba^2 + 2ab + b;

  • n3โˆ’0.7n+38n^3 - 0.7n + \frac{3}{8}; and

  • 1+3+x5โˆ’x7+19x91 + 3 + x^5 - x^7 + 19x^9.

Note how there may be more than one letter in a polynomial. Nevertheless, today we'll focus only on those with a single one, just like the partial fraction decomposition calculator.

In mathematics, a quotient of two polynomials is often called a rational function or a rational expression. Needless to say, such objects are a bit more difficult to operate than simple polynomials. Just look at an example of such a monstrosity:

3x2โˆ’2x+5x3โˆ’2x2โˆ’5x+6\frac{3x^2 - 2x +5}{x^3 - 2x^2 - 5x + 6}

Luckily, there are ways to write such things in a nicer way. A sum of several rational expressions, true. But prettier ones!

The partial fraction expansion is so much prettier then the expression itself!

However, before we see how to do partial fraction decomposition, we need to go through several math properties. The very basic one concerns factoring polynomials.

When we work with real numbers (anything from 11, through fractions, roots, up to numbers such as ฯ€\pi and the Euler number e\mathrm e), every polynomial can be decomposed into factors of degree 11 or 22. In other words, however large the exponents of your polynomial, you can write the whole thing as a product of binomials and quadratic polynomials. For instance,

x4+4x3โˆ’7x2โˆ’22x+24=(xโˆ’2)(xโˆ’1)(x+3)(x+4)2x3+5x2+5x+3=(2x+3)(x2+x+1)x^4 + 4x^3 - 7x^2 - 22x + 24 \\[1em] = (x - 2)(x-1)(x + 3)(x+4)\\[2em] 2x^3 + 5x^2 + 5x + 3 \\[1em] = (2x + 3)(x^2 + x + 1)

In fact, the quadratic factors appear (i.e., cannot be decomposed into two of order 11) only when they have no real roots. If we were to move to complex numbers, we would obtain only binomials in the expansion. Either way, these factors are what appears in the denominators of the partial fraction formula.

In general, factoring polynomials of a high order is an extremely difficult problem. Feel free to check out Omni's algebra calculators section to find some useful tools to help with that, such as synthetic division calculator or the rational zeros calculator.

We've already mentioned what appears in the partial fraction formula, but we've yet to see it in detail. It's now time to study it in depth, together with the partial fraction decomposition rules that govern the whole thing.

Partial fraction decomposition rules

In the above section, we've introduced factoring polynomials. However, it's important to remember that each factor can appear multiple times. For instance,

2x3+x2โˆ’4xโˆ’3=(2xโˆ’3)(x+1)(x+1)=(2xโˆ’3)(x+1)22x^3 + x^2 - 4x - 3 \\[1em] = (2x - 3)(x+1)(x+1)\\[1em] = (2x - 3)(x+1)^2

In general, let's say we want to find the partial fraction expansion of the quotient P(x)/Q(x)P(x) / Q(x) of two polynomials, where P(x)P(x) is of a smaller degree than Q(x)Q(x) (if it weren't, we first need to pull the higher exponents out of the quotient; for details see the next section). Assume that Q(x)Q(x) factorizes as:

Q(x)=(W1(x))k1(W2(x))k2โ€ฆ(Wn(x))kn\footnotesize Q(x) \\[0.5em] =(W_1(x))^{k_1}(W_2(x))^{k_2}\ldots(W_n(x))^{k_n}

Then the partial fraction decomposition rules for P(x)/Q(x)P(x) / Q(x) are as follows:

  • The partial fraction expansion has k1+k2+...+knk_1 + k_2 + ... + k_n summands.

  • The denominators of the quotients take the form (Wi(x))t(W_i(x))^t with tt ranging from 11 to kik_i. In other words, we have one quotient with Wi(x)W_i(x), one with (Wi(x))2(W_i(x))^2, one with (Wi(x))3(W_i(x))^3, and so on up to (Wi(x))ki(W_i(x))^{k_i}.

  • The numerator of the summand with (Wi(x))t(W_i(x))^t in the denominator is of degree one smaller than Wi(x)W_i(x). To be precise, it can be either of degree 00 if Wi(x)W_i(x) is linear or of degree 11 if Wi(x)W_i(x) is quadratic.

All in all, the partial fraction formula we end up with looks like this:

P(x)(W1(x))k1(W1(x))k2โ€ฆ(Wn(x))kn=A1,1(x)W1(x)+A1,2(x)(W1(x))2+โ€ฆ+A1,k1(x)(W1(x))k1+A2,1(x)W2(x)+A2,2(x)(W2(x))2+โ€ฆ+A2,k2(x)(W2(x))k2โ‹ฎ+An,1(x)Wn(x)+An,2(x)(Wn(x))2+โ€ฆ+An,kn(x)(Wn(x))kn\footnotesize \frac{P(x)}{(W_1(x))^{k_1}(W_1(x))^{k_2} \ldots (W_n(x))^{k_n}} \\[1.5em] \!= \frac{A_{1,1}(x)}{W_1(x)} \!\! + \!\! \frac{A_{1,2}(x)}{(W_1(x))^2} \!\! + \! \ldots \! + \!\! \frac{A_{1,k_1}(x)}{(W_1(x))^{k_1}} \\[1.5em] \!+ \frac{A_{2,1}(x)}{W_2(x)} \!\! + \!\! \frac{A_{2,2}(x)}{(W_2(x))^2} \!\! + \! \ldots \! + \!\! \frac{A_{2,k_2}(x)}{(W_2(x))^{k_2}} \\[1em] \qquad \qquad \qquad \qquad \vdots \\[1em] \!+ \frac{A_{n,1}(x)}{W_n(x)} \!\! + \!\! \frac{A_{n,2}(x)}{(W_n(x))^2} \!\! + \! \ldots \! + \!\! \frac{A_{n,k_n}(x)}{(W_n(x))^{k_n}} \\[1.5em]

where the polynomials Ai,j(x)A_{i,j}(x) are one degree smaller than Wi(x)W_i(x).

Fair enough, the partial fraction formula does look scary when you see it in full generality. However, in applications, it all boils down to fairly simple calculations. Note how Omni's partial fraction decomposition calculator admits only polynomials of degree up to 33, which is already a considerable simplification. After all, it means that there may be at most three factors when rewriting Q(x)Q(x), which further gives at most three summands in the partial fraction expansion.

Still, there's one more thing that this formula doesn't give: how to do partial fraction decomposition in practice? In particular, how do we find the polynomials Ai,j(x)A_{i,j}(x)?

Well, let's find out, shall we?

How to do partial fraction decomposition

Let's begin with clear step-by-step instructions of what we need to do with a quotient P(x)/Q(x)P(x) / Q(x) to find its partial fraction expansion before we go into details.

  1. If the degree of P(x)P(x) is greater or equal to that of Q(x)Q(x), pull its higher exponents out of the quotient.
  2. Decompose Q(x)Q(x) into irreducible factors of degree 11 or 22.
  3. (Optional) Compare the factors with P(x)P(x) to see if you can reduce anything.
  4. Use the partial fraction formula from the above section to write what the expansion should look like. For now, use Ai,j(x)A_{i,j}(x) as unknown.
  5. Solve the equation to find the polynomials Ai,j(x)A_{i,j}(x). To do so, you need to:
    • Write the polynomials Ai,j(x)A_{i,j}(x) in the form Ax+BAx + B or simply AA, depending on their degree (for now, AA and BB are unknown numbers),
    • Multiply both sides by the denominator of the left side,
    • Simplify both sides;
    • On the right side, group summands that correspond to the constant factor, to xx, to x2x^2, and so on;
    • Write and solve the system of equations coming from comparing the coefficients of different powers of xx on both sides to find the Aโ€ฒsA\mathrm{'s} and Bโ€ฒsB\mathrm{'s} (check the system of equations calculator if you need help); and
    • Substitute what you've found in the initial partial fraction formula.
  6. Celebrate with a piece of cake. You deserve it!

We'll go through it all on a nice example in the next section, but for now, let's briefly comment on the list above.

Ad.1) If the degree of P(x)P(x) is greater or equal to that of Q(x)Q(x), it is always possible to find D(x)D(x) and R(x)R(x) such that:

P(x)Q(x)=D(x)+R(x)Q(x)\frac{P(x)}{Q(x)} = D(x) + \frac{R(x)}{Q(x)}

with R(x)R(x) of degree smaller than that of Q(x)Q(x). In essence, D(x)D(x) is the result of polynomial division of P(x)P(x) by Q(x)Q(x), and R(x)R(x) is the non-divisible rest obtained through the process.

Ad.2) For more information on that, see the first section.

Ad.3) The simpler the expression, the easier the further calculations. For instance, why bother with (2x2+4x+2)/(2x3+x2โˆ’4xโˆ’3)(2x^2 + 4x + 2) / (2x^3 + x^2 - 4x - 3) if it's the same as 2/(2xโˆ’3