∫Yoboa Math
Home / Guides / Partial Fractions

Partial Fractions

Partial fractions break a rational function, a polynomial divided by a polynomial, into a sum of simple fractions you already know how to integrate. Each piece becomes a logarithm, a power or an arctangent.

Step 0: compare degrees

If the numerator's degree is at least the denominator's, do polynomial long division first. Partial fractions only work on proper fractions.

Step 1: factor the denominator

Each factor tells you what terms to write:

FactorTerms
Distinct linear \((x-a)\)\(\dfrac{A}{x-a}\)
Repeated linear \((x-a)^k\)\(\dfrac{A_1}{x-a}+\dfrac{A_2}{(x-a)^2}+\cdots+\dfrac{A_k}{(x-a)^k}\)
Irreducible quadratic \(x^2+bx+c\)\(\dfrac{Ax+B}{x^2+bx+c}\)

Step 2: solve for the constants

Multiply both sides by the denominator. Then plug in the roots (the "cover-up" method), or match coefficients. Plugging in roots is fastest for distinct linear factors.

Example: \(\frac{1}{x^{2} - 1}\)

\[\int \frac{1}{x^{2} - 1}\,dx = \frac{\ln{\left(\left|{x - 1}\right| \right)}}{2} - \frac{\ln{\left(\left|{x + 1}\right| \right)}}{2} + C\]
1Partial fraction decompositiontechnique▶

Factor the denominator and split the fraction into simpler pieces: \(x^{2} - 1 = \left(x - 1\right) \left(x + 1\right)\).

\[\frac{1}{x^{2} - 1} = - \frac{1}{2 \left(x + 1\right)} + \frac{1}{2 \left(x - 1\right)}\]
1Split into separate integrals▶

The integral of a sum is the sum of the integrals. Integrate each term:

\[\int - \frac{1}{2 \left(x + 1\right)} + \frac{1}{2 \left(x - 1\right)}\,dx = \int - \frac{1}{2 \left(x + 1\right)}\,dx + \int \frac{1}{2 \left(x - 1\right)}\,dx\]
1Pull out the constant▶

Constants factor out of an integral: move \(- \frac{1}{2}\) outside.

\[\int - \frac{1}{2 \left(x + 1\right)}\,dx = - \frac{1}{2}\int \frac{1}{x + 1}\,dx\]
1Substitution (u-sub)technique▶

Let \(u = x + 1\). Then \(du = 1\,dx\). Rewriting the integral in terms of \(u\):

\[\int \frac{1}{x + 1}\,dx = \int \frac{1}{u}\,du\]
1Reciprocal rule▶

The integral of \(\frac{1}{u}\) is \(\ln\left|u\right|\).

\[\int \frac{1}{u}\,du = \ln\left|u\right|\]
2Substitute back▶

Replace \(u\) with \(x + 1\):

\[\ln{\left(\left|{u}\right| \right)}\;\to\;\ln{\left(\left|{x + 1}\right| \right)}\]
2Multiply back by the constant▶
\[- \frac{1}{2}\cdot\left(\ln{\left(x + 1 \right)}\right) = - \frac{\ln{\left(x + 1 \right)}}{2}\]
2Pull out the constant▶

Constants factor out of an integral: move \(\frac{1}{2}\) outside.

\[\int \frac{1}{2 \left(x - 1\right)}\,dx = \frac{1}{2}\int \frac{1}{x - 1}\,dx\]
1Substitution (u-sub)technique▶

Let \(w = x - 1\). Then \(dw = 1\,dx\). Rewriting the integral in terms of \(w\):

\[\int \frac{1}{x - 1}\,dx = \int \frac{1}{w}\,dw\]
1Reciprocal rule▶

The integral of \(\frac{1}{w}\) is \(\ln\left|w\right|\).

\[\int \frac{1}{w}\,dw = \ln\left|w\right|\]
2Substitute back▶

Replace \(w\) with \(x - 1\):

\[\ln{\left(\left|{w}\right| \right)}\;\to\;\ln{\left(\left|{x - 1}\right| \right)}\]
2Multiply back by the constant▶
\[\frac{1}{2}\cdot\left(\ln{\left(x - 1 \right)}\right) = \frac{\ln{\left(x - 1 \right)}}{2}\]
3Add the results▶
\[\int - \frac{1}{2 \left(x + 1\right)} + \frac{1}{2 \left(x - 1\right)}\,dx = \frac{\ln{\left(x - 1 \right)}}{2} - \frac{\ln{\left(x + 1 \right)}}{2}\]
Open this in the calculator →

Example: \(\frac{1}{x \left(x + 1\right)^{2}}\)

The repeated factor \((x+1)^2\) needs two terms.

\[\int \frac{1}{x \left(x + 1\right)^{2}}\,dx = \ln{\left(\left|{x}\right| \right)} - \ln{\left(\left|{x + 1}\right| \right)} + \frac{1}{x + 1} + C\]
1Partial fraction decompositiontechnique▶

Factor the denominator and split the fraction into simpler pieces: \(x \left(x + 1\right)^{2} = x \left(x + 1\right)^{2}\).

\[\frac{1}{x \left(x + 1\right)^{2}} = - \frac{1}{x + 1} - \frac{1}{\left(x + 1\right)^{2}} + \frac{1}{x}\]
1Split into separate integrals▶

The integral of a sum is the sum of the integrals. Integrate each term:

\[\int - \frac{1}{x + 1} - \frac{1}{\left(x + 1\right)^{2}} + \frac{1}{x}\,dx = \int - \frac{1}{x + 1}\,dx + \int - \frac{1}{\left(x + 1\right)^{2}}\,dx + \int \frac{1}{x}\,dx\]
1Pull out the constant▶

Constants factor out of an integral: move \(-1\) outside.

\[\int - \frac{1}{x + 1}\,dx = -1\int \frac{1}{x + 1}\,dx\]
1Substitution (u-sub)technique▶

Let \(u = x + 1\). Then \(du = 1\,dx\). Rewriting the integral in terms of \(u\):

\[\int \frac{1}{x + 1}\,dx = \int \frac{1}{u}\,du\]
1Reciprocal rule▶

The integral of \(\frac{1}{u}\) is \(\ln\left|u\right|\).

\[\int \frac{1}{u}\,du = \ln\left|u\right|\]
2Substitute back▶

Replace \(u\) with \(x + 1\):

\[\ln{\left(\left|{u}\right| \right)}\;\to\;\ln{\left(\left|{x + 1}\right| \right)}\]
2Multiply back by the constant▶
\[-1\cdot\left(\ln{\left(x + 1 \right)}\right) = - \ln{\left(x + 1 \right)}\]
2Pull out the constant▶

Constants factor out of an integral: move \(-1\) outside.

\[\int - \frac{1}{\left(x + 1\right)^{2}}\,dx = -1\int \frac{1}{\left(x + 1\right)^{2}}\,dx\]
1Substitution (u-sub)technique▶

Let \(w = x + 1\). Then \(dw = 1\,dx\). Rewriting the integral in terms of \(w\):

\[\int \frac{1}{\left(x + 1\right)^{2}}\,dx = \int \frac{1}{w^{2}}\,dw\]
1Power rule▶

Use \(\int x^{n}\,dx = \frac{x^{n+1}}{n+1}\) with \(n = -2\).

\[\int \frac{1}{w^{2}}\,dw = - \frac{1}{w}\]
2Substitute back▶

Replace \(w\) with \(x + 1\):

\[- \frac{1}{w}\;\to\;- \frac{1}{x + 1}\]
2Multiply back by the constant▶
\[-1\cdot\left(- \frac{1}{x + 1}\right) = \frac{1}{x + 1}\]
3Reciprocal rule▶

The integral of \(\frac{1}{x}\) is \(\ln\left|x\right|\).

\[\int \frac{1}{x}\,dx = \ln\left|x\right|\]
4Add the results▶
\[\int - \frac{1}{x + 1} - \frac{1}{\left(x + 1\right)^{2}} + \frac{1}{x}\,dx = \ln{\left(x \right)} - \ln{\left(x + 1 \right)} + \frac{1}{x + 1}\]
Open this in the calculator →

Example: \(\frac{x^{3} + 1}{x^{2} - 3 x + 2}\)

The numerator has degree 3 and the denominator degree 2, so divide first.

\[\int \frac{x^{3} + 1}{x^{2} - 3 x + 2}\,dx = \frac{x^{2}}{2} + 3 x + 9 \ln{\left(\left|{x - 2}\right| \right)} - 2 \ln{\left(\left|{x - 1}\right| \right)} + C\]
1Polynomial division + partial fractionstechnique▶

The numerator's degree is at least the denominator's, so divide first, then split the remainder into partial fractions:

\[\frac{x^{3} + 1}{x^{2} - 3 x + 2} = x + 3 - \frac{2}{x - 1} + \frac{9}{x - 2}\]
1Split into separate integrals▶

The integral of a sum is the sum of the integrals. Integrate each term:

\[\int x + 3 - \frac{2}{x - 1} + \frac{9}{x - 2}\,dx = \int x\,dx + \int 3\,dx + \int - \frac{2}{x - 1}\,dx + \int \frac{9}{x - 2}\,dx\]
1Power rule▶

Use \(\int x^{n}\,dx = \frac{x^{n+1}}{n+1}\) with \(n = 1\).

\[\int x\,dx = \frac{x^{2}}{2}\]
2Integrate a constant▶

The integral of a constant is the constant times \(x\).

\[\int 3\,dx = 3 x\]
3Pull out the constant▶

Constants factor out of an integral: move \(-2\) outside.

\[\int - \frac{2}{x - 1}\,dx = -2\int \frac{1}{x - 1}\,dx\]
1Substitution (u-sub)technique▶

Let \(u = x - 1\). Then \(du = 1\,dx\). Rewriting the integral in terms of \(u\):

\[\int \frac{1}{x - 1}\,dx = \int \frac{1}{u}\,du\]
1Reciprocal rule▶

The integral of \(\frac{1}{u}\) is \(\ln\left|u\right|\).

\[\int \frac{1}{u}\,du = \ln\left|u\right|\]
2Substitute back▶

Replace \(u\) with \(x - 1\):

\[\ln{\left(\left|{u}\right| \right)}\;\to\;\ln{\left(\left|{x - 1}\right| \right)}\]
2Multiply back by the constant▶
\[-2\cdot\left(\ln{\left(x - 1 \right)}\right) = - 2 \ln{\left(x - 1 \right)}\]
4Pull out the constant▶

Constants factor out of an integral: move \(9\) outside.

\[\int \frac{9}{x - 2}\,dx = 9\int \frac{1}{x - 2}\,dx\]
1Substitution (u-sub)technique▶

Let \(w = x - 2\). Then \(dw = 1\,dx\). Rewriting the integral in terms of \(w\):

\[\int \frac{1}{x - 2}\,dx = \int \frac{1}{w}\,dw\]
1Reciprocal rule▶

The integral of \(\frac{1}{w}\) is \(\ln\left|w\right|\).

\[\int \frac{1}{w}\,dw = \ln\left|w\right|\]
2Substitute back▶

Replace \(w\) with \(x - 2\):

\[\ln{\left(\left|{w}\right| \right)}\;\to\;\ln{\left(\left|{x - 2}\right| \right)}\]
2Multiply back by the constant▶
\[9\cdot\left(\ln{\left(x - 2 \right)}\right) = 9 \ln{\left(x - 2 \right)}\]
5Add the results▶
\[\int x + 3 - \frac{2}{x - 1} + \frac{9}{x - 2}\,dx = \frac{x^{2}}{2} + 3 x + 9 \ln{\left(x - 2 \right)} - 2 \ln{\left(x - 1 \right)}\]
Open this in the calculator →

Irreducible quadratics

For a term like \(\frac{Ax+B}{x^2+4}\), split it into \(\frac{Ax}{x^2+4}\), which is a u-substitution giving a logarithm, and \(\frac{B}{x^2+4}\), which gives an arctangent. If the quadratic has a linear term, complete the square first.

Example: \(\frac{1}{x^{2} + 2 x + 5}\)

Completing the square gives \((x+1)^2+4\).

\[\int \frac{1}{x^{2} + 2 x + 5}\,dx = \frac{\arctan{\left(\frac{x}{2} + \frac{1}{2} \right)}}{2} + C\]
1Substitution (u-sub)technique▶

Let \(u = x + 1\). Then \(du = 1\,dx\). Rewriting the integral in terms of \(u\):

\[\int \frac{1}{2 u + \left(u - 1\right)^{2} + 3}\,dx = \int \frac{1}{2 u + \left(u - 1\right)^{2} + 3}\,du\]
1Expandtechnique▶

Multiply out the integrand:

\[\frac{1}{2 u + \left(u - 1\right)^{2} + 3} = \frac{1}{u^{2} + 4}\]
1Standard form: arctan▶

Use \(\int \frac{1}{x^2+a^2}\,dx = \frac{1}{a}\arctan\frac{x}{a}\).

\[\int \frac{1}{u^{2} + 4}\,du = \frac{\arctan{\left(\frac{u}{2} \right)}}{2}\]
2Substitute back▶

Replace \(u\) with \(x + 1\):

\[\frac{\arctan{\left(\frac{u}{2} \right)}}{2}\;\to\;\frac{\arctan{\left(\frac{x}{2} + \frac{1}{2} \right)}}{2}\]
Open this in the calculator →

Try your own

Paste any integral into the integral calculator to get the full step-by-step solution and a graph.

More techniques