Skip to content

Integration using partial fractions

Partial fractions turn one difficult rational function into a sum of simpler functions whose antiderivatives are standard. The method is especially useful when the denominator factorises into linear factors.

For example,

5x+1(x−1)(x+2)=2x−1+3x+2,\frac{5x+1}{(x-1)(x+2)} =\frac{2}{x-1}+\frac{3}{x+2},

so

∫5x+1(x−1)(x+2) dx=2ln⁡∣x−1∣+3ln⁡∣x+2∣+C.\int\frac{5x+1}{(x-1)(x+2)}\,dx =2\ln|x-1|+3\ln|x+2|+C.

The central challenge is not the final integration. It is recognising when partial fractions apply and obtaining the correct decomposition.

You should be able to:

  • factorise quadratic and simple cubic expressions;
  • distinguish proper from improper algebraic fractions;
  • decompose rational expressions into partial fractions;
  • use polynomial division;
  • integrate powers and 1/x1/x using standard integrals;
  • apply logarithm laws, including the need for absolute values.

For a linear denominator,

∫1x−a dx=ln⁡∣x−a∣+C.\int\frac{1}{x-a}\,dx=\ln|x-a|+C.

More generally, if m≠0m\ne0,

∫Amx+c dx=Amln⁡∣mx+c∣+C.\int\frac{A}{mx+c}\,dx =\frac{A}{m}\ln|mx+c|+C.

The factor 1/m1/m reverses the chain rule. For instance,

∫73x−2 dx=73ln⁡∣3x−2∣+C.\int\frac{7}{3x-2}\,dx=\frac73\ln|3x-2|+C.

Repeated factors also produce negative powers. For r≥2r\ge2,

∫A(x−a)r dx=A(x−a)1−r1−r+C.\int\frac{A}{(x-a)^r}\,dx =\frac{A(x-a)^{1-r}}{1-r}+C.

In particular,

∫A(x−a)2 dx=−Ax−a+C.\int\frac{A}{(x-a)^2}\,dx=-\frac{A}{x-a}+C.

Only the first power of a linear factor produces a logarithm. This distinction prevents many sign errors.

To integrate a rational function P(x)/Q(x)P(x)/Q(x):

  1. Check whether it is proper: deg⁡P<deg⁡Q\deg P<\deg Q.
  2. If it is improper, use polynomial division first.
  3. Factorise Q(x)Q(x) completely.
  4. Write the full partial fraction form.
  5. Find its coefficients.
  6. Integrate each term separately.
  7. Differentiate the result to check it.

Partial fractions cannot repair an improper fraction by themselves. Division must come first.

If the denominator contains different linear factors, use one constant numerator over each factor:

P(x)(x−a)(x−b)=Ax−a+Bx−b.\frac{P(x)}{(x-a)(x-b)} =\frac{A}{x-a}+\frac{B}{x-b}.

Find

∫7x+11(x+1)(x+3) dx.\int\frac{7x+11}{(x+1)(x+3)}\,dx.

First decompose:

7x+11(x+1)(x+3)=Ax+1+Bx+3.\frac{7x+11}{(x+1)(x+3)} =\frac{A}{x+1}+\frac{B}{x+3}.

Multiplying by (x+1)(x+3)(x+1)(x+3) gives the identity

7x+11=A(x+3)+B(x+1).7x+11=A(x+3)+B(x+1).

Set x=−1x=-1:

4=2A⟹A=2.4=2A\quad\Longrightarrow\quad A=2.

Set x=−3x=-3:

−10=−2B⟹B=5.-10=-2B\quad\Longrightarrow\quad B=5.

Therefore

∫7x+11(x+1)(x+3) dx=∫(2x+1+5x+3)dx=2ln⁡∣x+1∣+5ln⁡∣x+3∣+C.\begin{aligned} \int\frac{7x+11}{(x+1)(x+3)}\,dx &=\int\left(\frac2{x+1}+\frac5{x+3}\right)dx\\ &=2\ln|x+1|+5\ln|x+3|+C. \end{aligned}

Differentiate the answer:

2x+1+5x+3=2(x+3)+5(x+1)(x+1)(x+3)=7x+11(x+1)(x+3).\frac2{x+1}+\frac5{x+3} =\frac{2(x+3)+5(x+1)}{(x+1)(x+3)} =\frac{7x+11}{(x+1)(x+3)}.

Find

∫4x+1(2x−1)(x+2) dx.\int\frac{4x+1}{(2x-1)(x+2)}\,dx.

Write

4x+1(2x−1)(x+2)=A2x−1+Bx+2.\frac{4x+1}{(2x-1)(x+2)} =\frac{A}{2x-1}+\frac{B}{x+2}.

After clearing denominators,

4x+1=A(x+2)+B(2x−1).4x+1=A(x+2)+B(2x-1).

Set x=12x=\frac12 to obtain 3=52A3=\frac52A, so A=65A=\frac65. Set x=−2x=-2 to obtain −7=−5B-7=-5B, so B=75B=\frac75.

Now integrate carefully:

∫4x+1(2x−1)(x+2) dx=∫(65(2x−1)+75(x+2))dx=35ln⁡∣2x−1∣+75ln⁡∣x+2∣+C.\begin{aligned} \int\frac{4x+1}{(2x-1)(x+2)}\,dx &=\int\left(\frac{6}{5(2x-1)}+\frac{7}{5(x+2)}\right)dx\\ &=\frac35\ln|2x-1|+\frac75\ln|x+2|+C. \end{aligned}

The coefficient of the first logarithm is 3/53/5, not 6/56/5, because d(2x−1)/dx=2d(2x-1)/dx=2.

If a factor is repeated, include every power:

P(x)(x−a)2(x−b)=Ax−a+B(x−a)2+Cx−b.\frac{P(x)}{(x-a)^2(x-b)} =\frac{A}{x-a}+\frac{B}{(x-a)^2}+\frac{C}{x-b}.

Omitting B/(x−a)2B/(x-a)^2 makes the proposed identity too restricted.

Worked example 3: logarithmic and power terms

Section titled “Worked example 3: logarithmic and power terms”

Find

∫3x+5(x−1)2(x+2) dx.\int\frac{3x+5}{(x-1)^2(x+2)}\,dx.

Use

3x+5(x−1)2(x+2)=Ax−1+B(x−1)2+Cx+2.\frac{3x+5}{(x-1)^2(x+2)} =\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x+2}.

Clear denominators:

3x+5=A(x−1)(x+2)+B(x+2)+C(x−1)2.3x+5=A(x-1)(x+2)+B(x+2)+C(x-1)^2.

Set x=1x=1:

8=3B⟹B=83.8=3B\quad\Longrightarrow\quad B=\frac83.

Set x=−2x=-2:

−1=9C⟹C=−19.-1=9C\quad\Longrightarrow\quad C=-\frac19.

To find AA, set x=0x=0:

5=−2A+2(83)−19,5=-2A+2\left(\frac83\right)-\frac19,

which gives A=19A=\frac19.

Hence

∫3x+5(x−1)2(x+2) dx=∫(19(x−1)+83(x−1)2−19(x+2))dx=19ln⁡∣x−1∣−83(x−1)−19ln⁡∣x+2∣+C.\begin{aligned} \int\frac{3x+5}{(x-1)^2(x+2)}\,dx &=\int\left(\frac{1}{9(x-1)}+\frac{8}{3(x-1)^2}-\frac{1}{9(x+2)}\right)dx\\ &=\frac19\ln|x-1|-\frac{8}{3(x-1)}-\frac19\ln|x+2|+C. \end{aligned}

The repeated-factor term integrates as

83∫(x−1)−2 dx=−83(x−1)−1.\frac83\int(x-1)^{-2}\,dx=-\frac{8}{3}(x-1)^{-1}.

It does not produce another logarithm.

When the numerator has degree at least as large as the denominator, divide before decomposing the proper remainder.

Find

∫x2+3x+1x2−x−2 dx.\int\frac{x^2+3x+1}{x^2-x-2}\,dx.

Factorise the denominator:

x2−x−2=(x−2)(x+1).x^2-x-2=(x-2)(x+1).

The fraction is improper because both numerator and denominator have degree 22. Polynomial division gives

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

Now decompose only the proper remainder:

4x+3(x−2)(x+1)=Ax−2+Bx+1.\frac{4x+3}{(x-2)(x+1)} =\frac{A}{x-2}+\frac{B}{x+1}.

Thus

4x+3=A(x+1)+B(x−2).4x+3=A(x+1)+B(x-2).

Setting x=2x=2 gives 11=3A11=3A, so A=11/3A=11/3. Setting x=−1x=-1 gives −1=−3B-1=-3B, so B=1/3B=1/3.

Therefore

∫x2+3x+1x2−x−2 dx=x+113ln⁡∣x−2∣+13ln⁡∣x+1∣+C.\boxed{ \int\frac{x^2+3x+1}{x^2-x-2}\,dx =x+\frac{11}{3}\ln|x-2|+\frac13\ln|x+1|+C }.

The polynomial quotient contributes the xx term. Losing it is a common consequence of skipping division.

A definite integral may be evaluated from an antiderivative only if the integrand is continuous throughout the interval, apart from cases treated explicitly as improper integrals, which are beyond the usual A-level partial fractions task.

Evaluate

∫015(x+1)(x+2) dx.\int_0^1\frac{5}{(x+1)(x+2)}\,dx.

Decompose:

5(x+1)(x+2)=5x+1−5x+2.\frac{5}{(x+1)(x+2)} =\frac5{x+1}-\frac5{x+2}.

Both denominator factors are non-zero on [0,1][0,1], so the integrand is continuous there. Hence

∫015(x+1)(x+2) dx=[5ln⁡(x+1)−5ln⁡(x+2)]01=5ln⁡2−5ln⁡3−(5ln⁡1−5ln⁡2)=5ln⁡(43).\begin{aligned} \int_0^1\frac{5}{(x+1)(x+2)}\,dx &=\left[5\ln(x+1)-5\ln(x+2)\right]_0^1\\ &=5\ln2-5\ln3-\left(5\ln1-5\ln2\right)\\ &=5\ln\left(\frac43\right). \end{aligned}

This is positive, as expected because the integrand is positive on [0,1][0,1].

By contrast,

∫021x−1 dx\int_0^2\frac{1}{x-1}\,dx

cannot be evaluated by simply substituting the endpoints into ln⁡∣x−1∣\ln|x-1|. The integrand has a vertical asymptote at x=1x=1 inside the interval, and the improper integral does not converge.

Logarithm laws may make an answer more compact:

Aln⁡∣u∣−Aln⁡∣v∣=Aln⁡∣uv∣.A\ln|u|-A\ln|v| =A\ln\left|\frac uv\right|.

For example,

3ln⁡∣x−1∣−3ln⁡∣x+2∣=3ln⁡∣x−1x+2∣.3\ln|x-1|-3\ln|x+2| =3\ln\left|\frac{x-1}{x+2}\right|.

Do not combine unlike coefficients incorrectly. In general,

Aln⁡∣u∣+Bln⁡∣v∣=ln⁡(∣u∣A∣v∣B),A\ln|u|+B\ln|v| =\ln\left(|u|^A|v|^B\right),

but the separate form is often clearer and less prone to errors.

Partial fractions are not always necessary. If the numerator is a constant multiple of the derivative of the denominator, use the reverse chain rule directly:

∫2x+3x2+3x+7 dx=ln⁡∣x2+3x+7∣+C.\int\frac{2x+3}{x^2+3x+7}\,dx =\ln|x^2+3x+7|+C.

Here the quadratic does not factorise, but its derivative is exactly the numerator. Always look for the structure f′(x)/f(x)f'(x)/f(x) before beginning a decomposition.

If an irreducible quadratic remains and the numerator is not its derivative, completing the square may lead to an inverse tangent term. For example,

∫1x2+4 dx=12arctan⁡(x2)+C.\int\frac{1}{x^2+4}\,dx=\frac12\arctan\left(\frac x2\right)+C.

In typical A-level partial fraction questions, however, the denominator is chosen to factorise into linear factors and the resulting terms use logarithms and powers.

The correct real antiderivative is

∫1x−a dx=ln⁡∣x−a∣+C.\int\frac1{x-a}\,dx=\ln|x-a|+C.

Writing ln⁡(x−a)\ln(x-a) describes only the interval x>ax>a. The original integrand also exists for x<ax<a.

Only exponent −1-1 integrates to a logarithm:

∫(x−a)−2 dx=−(x−a)−1+C.\int(x-a)^{-2}\,dx=-(x-a)^{-1}+C. ∫14x+1 dx=14ln⁡∣4x+1∣+C,\int\frac1{4x+1}\,dx=\frac14\ln|4x+1|+C,

not ln⁡∣4x+1∣+C\ln|4x+1|+C.

The usual partial fraction forms apply to a proper rational function. If deg⁡P≥deg⁡Q\deg P\ge\deg Q, polynomial division is the first step.

Factorise the denominator and check the interval before substituting limits. A zero of the denominator inside the interval changes the problem fundamentally.

Find

∫3x+7(x+1)(x+2) dx.\int\frac{3x+7}{(x+1)(x+2)}\,dx.
Answer

Since

3x+7(x+1)(x+2)=4x+1−1x+2,\frac{3x+7}{(x+1)(x+2)} =\frac4{x+1}-\frac1{x+2},

the integral is

4ln⁡∣x+1∣−ln⁡∣x+2∣+C.\boxed{4\ln|x+1|-\ln|x+2|+C}.

Find

∫x+3(x−1)2 dx.\int\frac{x+3}{(x-1)^2}\,dx.
Answer

Write x+3=(x−1)+4x+3=(x-1)+4, so

x+3(x−1)2=1x−1+4(x−1)2.\frac{x+3}{(x-1)^2} =\frac1{x-1}+\frac4{(x-1)^2}.

Therefore

ln⁡∣x−1∣−4x−1+C.\boxed{\ln|x-1|-\frac4{x-1}+C}.

Differentiate −4/(x−1)-4/(x-1) to check that it gives 4/(x−1)24/(x-1)^2.

Find

∫x2+1x(x+1) dx.\int\frac{x^2+1}{x(x+1)}\,dx.
Answer

Division and decomposition give

x2+1x(x+1)=1+1−xx(x+1)=1+1x−2x+1.\frac{x^2+1}{x(x+1)} =1+\frac{1-x}{x(x+1)} =1+\frac1x-\frac2{x+1}.

Hence

x+ln⁡∣x∣−2ln⁡∣x+1∣+C.\boxed{x+\ln|x|-2\ln|x+1|+C}.

Evaluate

∫121x(x+1) dx.\int_1^2\frac{1}{x(x+1)}\,dx.
Answer

Since

1x(x+1)=1x−1x+1,\frac1{x(x+1)}=\frac1x-\frac1{x+1},

we obtain

∫121x(x+1) dx=[ln⁡x−ln⁡(x+1)]12=ln⁡(23)−ln⁡(12)=ln⁡(43).\begin{aligned} \int_1^2\frac{1}{x(x+1)}\,dx &=\left[\ln x-\ln(x+1)\right]_1^2\\ &=\ln\left(\frac23\right)-\ln\left(\frac12\right)\\ &=\boxed{\ln\left(\frac43\right)}. \end{aligned}

A student writes

∫031(x−1)(x−2) dx=[ln⁡∣x−2∣−ln⁡∣x−1∣]03.\int_0^3\frac1{(x-1)(x-2)}\,dx =\left[\ln|x-2|-\ln|x-1|\right]_0^3.

Why is this invalid?

Answer

The denominator is zero at x=1x=1 and x=2x=2, both inside the interval. The integrand is not continuous on [0,3][0,3], so the fundamental theorem cannot be applied across the whole interval. The integral must be split into improper integrals, and these do not converge in the ordinary sense.

For rational functions, use the sequence

divide if needed  ⟶  factorise  ⟶  decompose  ⟶  integrate.\boxed{\text{divide if needed}\;\longrightarrow\;\text{factorise}\;\longrightarrow\;\text{decompose}\;\longrightarrow\;\text{integrate}}.

Distinct linear factors lead to logarithms. Repeated factors lead to both logarithms and negative powers. Always include absolute values in indefinite logarithmic answers, account for the derivative of each linear denominator, and check definite-integral intervals for singularities.

Next, consolidate the algebra in partial fractions, compare this method with integration by substitution and integration by parts, then apply antiderivatives in definite integrals and areas and separable differential equations.