MathsAdvanced Equations

Partial Fraction Decomposition
calculator.

Split a fraction of two polynomials into simple pieces you can integrate or look up.

How it's worked out

A rational function is one polynomial over another, P(x) over Q(x). Partial fractions write it as a sum of small fractions, one for each factor of the bottom. Each small fraction is easy to integrate, and each one matches a line in a Laplace transform table.

Step 1: divide if you need to. OpenStax sets the rule: the top must have a lower degree than the bottom. If it does not, long division gives a polynomial S(x) plus a remainder R(x) over Q(x), and only that remainder is split.

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

Step 2: factor the bottom into linear factors and quadratics with no real roots. The tool finds whole-number and fraction roots exactly, and works out any others as decimals.

Step 3: write the template. Each factor brings its own terms. A linear factor raised to a power m brings m terms, one for each power from 1 to m. A quadratic with no real roots gets a linear top, Bx + C, because one letter alone is too few to match every top.

A1x−r\displaystyle \frac{A_1}{x - r}+A2(x−r)2\displaystyle {}+ \frac{A_2}{(x - r)^{2}}+Bx+Cx2+bx+c\displaystyle {}+ \frac{Bx + C}{x^{2} + bx + c}

Step 4: find the letters. Orloff's MIT notes show the cover-up method for a factor that appears once: multiply both sides by that factor, then set x to its root, and every other term drops out. The rest come from matching the number in front of each power of x. There are always as many letters as the degree of Q.

Worked examples

Jin sets up an integral for calculus 2

Jin has to integrate this fraction, the same one OpenStax uses in its Example 3.29. The bottom factors as x(x − 2)(x + 1), three different linear factors, so the template has three constants.

3x+2x3−x2−2x\displaystyle \frac{3x + 2}{x^{3} - x^{2} - 2x}=−13(x+1)−1x+43(x−2)\displaystyle {}= - \frac{1}{3(x + 1)} - \frac{1}{x} + \frac{4}{3(x - 2)}

Cover-up at x = 0 gives −1, at x = 2 gives 43\frac{4}{3}, and at x = −1 gives −13-\frac{1}{3}. Each term then integrates to a log, so the antiderivative is the sum below.

−13ln⁡|x\displaystyle {}-\frac{1}{3}\,\ln\lvert x+1|\displaystyle {}+ 1 \rvert−ln⁡|x|\displaystyle {}- \ln\lvert x \rvert+43ln⁡|x\displaystyle {}+ \frac{4}{3}\,\ln\lvert x−2|\displaystyle {}- 2 \rvert+C\displaystyle {}+ C

Open this example in the tool

Maya undoes a Laplace transform

In a differential equations class, Maya ends up with (s − 7) over (s − 1)(s + 2). She types it with x in place of s, and the denominator can go in already factored.

x−7x2+x−2\displaystyle \frac{x - 7}{x^{2} + x - 2}=3x+2−2x−1\displaystyle {}= \frac{3}{x + 2} - \frac{2}{x - 1}

Covering x − 1 and setting x = 1 gives −2. Covering x + 2 and setting x = −2 gives 3. These match Orloff's Example PF.1, and each term is one line of a transform table.

Open this example in the tool

Leo divides first

Leo's top has degree 3 and the bottom degree 2, so the fraction is improper. Long division comes first, and it leaves a remainder of lower degree.

x3+2x+1x2+x−2\displaystyle \frac{x^{3} + 2x + 1}{x^{2} + x - 2}=x−1+5x−1x2+x−2\displaystyle {}= x - 1 + \frac{5x - 1}{x^{2} + x - 2}

The bottom is (x + 2)(x − 1), and splitting the remainder gives the full answer below, as in Orloff's Example PF.7. On the graph, the curve follows the line y=x−1y = x - 1 far from the two poles.

x3+2x+1x2+x−2\displaystyle \frac{x^{3} + 2x + 1}{x^{2} + x - 2}=x−1+113(x+2)+43(x−1)\displaystyle {}= x - 1 + \frac{11}{3(x + 2)} + \frac{4}{3(x - 1)}

Open this example in the tool

Reading your result

Each term is a pole. A term over a linear factor shoots up or down where that factor is 0. Those x values are the vertical asymptotes on the graph, and their coefficients say how strongly the curve rises near each one.

A quadratic factor stays whole. Over the real numbers, x² + 4 has no roots, so it keeps its quadratic bottom and gets a linear top. Its integral brings in an arctangent as well as a log.

2x2−x+4x3+4x\displaystyle \frac{2x^{2} - x + 4}{x^{3} + 4x}=1x+x−1x2+4\displaystyle {}= \frac{1}{x} + \frac{x - 1}{x^{2} + 4}

A repeated factor needs every power. With (x − 1) squared in the bottom, both 1 over (x − 1) and 1 over (x − 1) squared appear. Cover-up finds only the top power's letter; the rest come from matching coefficients.

4xx3−x2−x+1\displaystyle \frac{4x}{x^{3} - x^{2} - x + 1}=−1x+1+1x−1+2(x−1)2\displaystyle {}= - \frac{1}{x + 1} + \frac{1}{x - 1} + \frac{2}{(x - 1)^{2}}

Decimals mean irrational roots. For 1 over x² − 2 the roots are plus and minus the square root of 2, so the letters come out near 0.3536, with opposite signs. Pick the decimal view to set how many places you see.

Common mistakes

  • Skipping the division. If the top has the same or a higher degree than the bottom, the template has too few letters and the equations cannot be solved. Divide first.
  • Leaving out a power. A factor squared needs two terms, one over the factor and one over its square. Writing only the squared term makes most problems impossible.
  • A constant over a quadratic. Over x² + 4, the top must be Bx + C. A single letter gives too few unknowns to match the numerator.
  • Splitting a quadratic that does factor. Check the discriminant: x² − 4 is (x − 2)(x + 2), so it needs two linear terms, not a Bx + C term.

Questions people ask

Use polynomial long division first. You get a polynomial plus a proper fraction whose top has a lower degree than the bottom, and only that fraction is split. The tool does this for you and shows the polynomial part first.

Sources