Partial Fraction Decomposition
calculator.
Split a fraction of two polynomials into simple pieces you can integrate or look up.
- Factors of Q
- 2
- Unknown numbers
- 2
- Check at test points
- Matches
Q has 2 linear and 0 quadratic factors, so there are 2 unknown numbers to find and 2 terms in the template. The graph has vertical asymptotes at x = −2, x = −1.
The graph and its poles
Drag the point to check another xThe graph of P(x) over Q(x) from x = −4 to 1. It shoots up or down at x = −2, x = −1, where Q is 0. Far from the poles it settles toward 0. At x = 1 it is 1.3333.
Each piece at x = 1
Each piece at x = 1
| Piece | At x = 1 |
|---|---|
| 1/(x + 2) | 0.3333 |
| 2/(x + 1) | 1 |
| Sum of the pieces | 1.3333 |
| P(x) over Q(x) | 1.3333 |
The pieces add to 1.3333, and P over Q is 1.3333 at the same x.
Working
- 1Factor the denominatorx2+3x+2=(x+2)(x+1)
- 2One term for each factor and each power of itAx+2+Bx+1
- 3Cover-up: multiply by(x+2)and set x = −2A =1
- 4Cover-up: multiply by(x+1)and set x = −1B =2
- 5Match the coefficients of each power of x: 2 equations in 2 unknownsA =1B =2
- 6Check: both sides agree at x = 13x+5x2+3x+2= 1.3333, and the pieces add to 1.3333
The integral, term by term
ln|x + 2| + 2 ln|x + 1| + CEach linear term integrates to a log, each quadratic term to a log and an arctangent, and a higher power of a factor to a power of it. Use absolute values inside each log.
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.
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.
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.
Cover-up at x = 0 gives −1, at x = 2 gives , and at x = −1 gives . Each term then integrates to a log, so the antiderivative is the sum below.
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.
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.
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.
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 far from the two poles.
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.
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.
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.