Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Integrals like

3x+11x2x6d ⁣x\int \frac{3x+11}{x^2-x-6} \d{x}

can be evaluated by breaking them apart into simpler integrals. Let’s try to break the integrand up into the factors of its denominator:

3x+11x2x6=3x+11(x3)(x+2)=A1x3+A2x+2\frac{3x+11}{x^2-x-6} = \frac{3x+11}{(x-3)(x+2)} = \frac{A_1}{x-3} + \frac{A_2}{x+2}

To find A1A_1 and A2A_2, first cross multiply to eliminate the denominator, then combine like powers of x:

3x+11=A1(x+2)+A2(x3)3x+11=(A1+A2)x+(2A13A2)\begin{align} 3x + 11 &= A_1(x+2) + A_2(x-3) \\ 3x + 11 &= (A_1 + A_2)x + (2A_1 - 3A_2) \\ \end{align}

If our proposed form will work, all the coefficients of x must match on both sides, so

A1+A2=32A13A2=11\begin{align} A_1 + A_2 &= 3 \\ 2A_1 - 3A_2 &= 11 \end{align}

This is a system of linear equations that can be solved, e.g., using a matrix technique. Form the augmented matrix then perform Gauss-Jordan elimination:

[1132311]R12R1[113055]R1÷5[113011]R2R2[104011]\begin{align} \begin{bmatrix} 1 & 1 & 3\\ 2 & -3 & 11 \end{bmatrix} \begin{matrix}\vphantom{R_1} \\ -2 R_1 \end{matrix} &\to \begin{bmatrix} 1 & 1 & 3\\ 0 & -5 & 5 \end{bmatrix} \begin{matrix}\vphantom{R_1} \\ \div -5 \end{matrix} \\ &\to \begin{bmatrix} 1 & 1 & 3\\ 0 & 1 & -1 \end{bmatrix} \begin{matrix} -R_2 \\ \vphantom{R_2} \end{matrix} \\ &\to \begin{bmatrix} 1 & 0 & 4\\ 0 & 1 & -1 \end{bmatrix} \end{align}

so A1=4A_1 = 4 and A2=1A_2 = -1. Once you have coefficients, you can integrate:

3x+11x2x6d ⁣x=(4x31x+2)d ⁣x=4lnx3lnx+2+c\begin{align} \int \frac{3x+11}{x^2-x-6} \d{x} &= \int\left(\frac{4}{x-3}-\frac{1}{x+2} \right) \d{x} \\ &= 4\ln| x-3 | - \ln|x+2| + c \end{align}

We can formalize this technique, called partial fraction decomposition.

To demonstrate this technique, let’s try to take the integral

x229x+5(x4)2(x2+3)d ⁣x\int \frac{x^2-29x+5}{(x-4)^2 (x^2+3)} \d{x}

First, expand the denominator and put placeholder coefficient terms in the numerator.

x229x+5(x4)2(x2+3)=A1x4+A2(x4)2+A3x+B3x2+3\frac{x^2-29x+5}{\left(x-4 \right)^2 \left(x^2+3 \right)} = \frac{A_1}{x-4} + \frac{A_2}{(x-4)^2} + \frac{A_3x+ B_3}{x^2+3}

Next, cross multiply, expand, and collect like powers of x:

x229x+5=A1(x4)(x2+3)+A2(x2+3)+(A3x+B3)(x4)2=A1(x34x2+3x12)+A2(x2+3)+(A3x+B3)(x28x+16)=(A1+A3)x3+(4A1+A28A3+B3)x2+(3A1+16A38B3)x+(12A1+3A2+16B3)\begin{align} x^2-29x+5 &= A_1 \left(x-4 \right) \left(x^2+3 \right) + A_2 \left(x^2+3 \right) \\ &\quad + \left(A_3x+B_3 \right) \left(x-4 \right)^2 \\ &= A_1 \left(x^3-4x^2+3x-12 \right) + A_2 \left(x^2+3 \right) \\ &\quad +\left(A_3x+B_3 \right)\left(x^2-8x+16 \right) \\ &=\left(A_1+A_3\right)x^3+\left(-4A_1+A_2-8A_3+B_3\right)x^2 \\ &\quad + \left(3A_1+16A_3-8B_3\right)x+\left(-12A_1+3A_2+16B_3\right) \end{align}

Finally, form the linear system of equations for the coefficients of x:

A1+A3=04A1+A28A3+B3=13A1+16A38B3=2912A1+3A2+16B3=5\begin{align} A_1+A_3 &= 0 \\ -4A_1 + A_2-8A_3 + B_3 &=1 \\ 3A_1 + 16A_3 - 8B_3 &= -29 \\ -12A_1+3A_2+16B_3 &=5 \\ \end{align}

These linear equations can be written using a matrix and vectors

[1010418130168123016][A1A2A3B3]=[01295]\begin{bmatrix} 1 & 0 & 1 & 0\\ -4 & 1 & -8 & 1\\ 3 & 0 & 16 & -8\\ -12 & 3 & 0 & 16 \end{bmatrix} \begin{bmatrix} A_1 \\ A_2\\ A_3\\ B_3 \end{bmatrix} = \begin{bmatrix} 0\\ 1\\ -29 \\ 5 \end{bmatrix}

Solving numerically gives A1=1A_1 = 1, A2=5A_2 = -5, A3=1A_3 = -1, and B3=2B_3 =2. Finally,

x229x+5(x4)2(x2+3)d ⁣x=(1x45(x4)2xx2+3+2x2+3)d ⁣x=lnx4+5x412lnx2+3+23arctan(x3)+c\begin{align} \int &\frac{x^2-29x+5}{(x-4)^2 (x^2+3)} \d{x} \\ &= \int\Biggl(\frac{1}{x-4}-\frac{5}{(x-4)^2} -\frac{x}{x^2+3}+\frac{2}{x^2+3}\Biggr) \d{x} \\ &= \ln|x-4|+\frac{5}{x-4} -\frac{1}{2} \ln|x^2 + 3| + \frac{2}{\sqrt{3}} \arctan\left( \frac{x}{\sqrt{3}} \right) + c \end{align}

using u substitution in

d ⁣x1+x2=arctanx\int \frac{\d{x}}{1+x^2} = \arctan x

to evaluate the last integral.

Heaviside cover-up method

The Heaviside cover-up method is a simplified approach to finding the coefficients in partial fraction decomposition for linear factors. Its main advantage is avoiding cross-multiplication, which can be time-consuming, by covering up a factor and substituting the appropriate value into the expression.

We will demonstrate the approach by example. Given the decomposition:

3x+11(x3)(x+2)=A1x3+A2x+2\frac{3x+11}{(x-3)(x+2)} = \frac{A_1}{x-3} + \frac{A_2}{x+2}

Multiply by both sides by the first factor and take the limit to find A1A_1:

limx3(3x+11x+2)=limx3(A1+A2(x3)x+2)3(3)+113+2=A1A1=4\begin{align} \lim_{x\to 3} \left( \frac{3x+11}{x+2} \right) &= \lim_{x \to 3} \left( A_1 + \frac{A_2(x-3)}{x+2} \right) \\ \frac{3(3)+11}{3+2} &= A_1 \\ A_1 &= 4 \end{align}

You can do the same for the second factor to get A2A_2:

limx2(3x+11x3)=limx2(A1(x+2)x3+A2)3(2)+1123=A2A2=1\begin{align} \lim_{x\to -2} \left( \frac{3x+11}{x-3}\right) &= \lim_{x\to -2} \left( \frac{A_1(x+2)}{x-3} + A_2 \right) \\ \frac{3(-2)+11}{-2-3} &= A_2 \\ A_2 &= -1 \end{align}

This procedure can be implemented conveniently by “covering up” the relevant factor in the original fraction!

Note that this procedure only works for the highest powers of linear factors, but it can be used in combination with other techniques to more easily obtain the remaining factors.

For example, given:

x229x+5(x4)2(x2+3)=A1x4+A2(x4)2+A3x+B3x2+3\frac{x^2-29x+5}{(x-4)^2 (x^2 +3)} = \frac{A_1}{x-4} + \frac{A_2}{(x-4)^2} + \frac{A_3x + B_3}{x^2 +3}

A2A_2 can be solved for using the Heaviside cover-up method because it corresponds to the highest power of the factor x4x-4.

A2=42294+542+3=5A_2 = \frac{4^2 - 29 \cdot 4 + 5}{4^2 + 3} = -5

Cross-multiplication must be used to solve for A1A_1, A3A_3, and B3B_3.

Polynomial division

Polynomial division is a method used to simplify rational functions when the degree of the numerator PP is higher than the degree of the denominator QQ. The remaineder from the division should then be suitable for partial fraction decomposition.

For example, to integrate:

x45x3+6x218x33x2d ⁣x\int \frac{x^4 - 5x^3 + 6x^2 -18}{x^3 -3x^2} \d{x}

Partial fraction decomposition seems useful, but the degree of the numerator P is 4 but the degree of denominator Q is 3, so we must carry out polynomial division first.

x25x3+6x218x33x2)x45x3+6x218 (x43x3)+6x2182x3+6x218 (2x3+6x2)1818\begin{array}{r} x-2 \phantom{5x^3+6x^2-18}\\ x^3-3x^2{\overline{\smash{\big)}\, x^4-5x^3+6x^2-18}} \\ \underline{-~(x^4-3x^3)}\phantom{+6x^2-18} \\ -2x^3+6x^2-18 \\ \underline{-~(-2x^3+6x^2)}\phantom{-18} \\ -18 \\ \end{array}

The result is

x45x3+6x218x33x2=x218x33x2\frac{x^4 - 5x^3 + 6x^2 -18}{x^3 -3x^2} = x - 2 - \frac{18}{x^3-3x^2}

Use partial fraction decomposition for the fractional term:

18x2(x3)=A1x+A2x2+A3x3\frac{-18}{x^2 (x-3)} = \frac{A_1}{x} + \frac{A_2}{x^2} + \frac{A_3}{x-3}

Find A2A_2 and A3A_3 using the Heaviside cover-up method:

A2=1803=6A3=1832=2\begin{align} A_2 &= \frac{-18}{0-3} = 6 \\ A_3 &= \frac{-18}{3^2} = -2 \end{align}

Find A1A_1 by substituting A2A_2 and A3A_3, then cross-multiplying:

18=A1x(x3)+6(x3)2x2-18 = A_1 x (x-3) + 6(x-3) - 2x^2

We could collect powers of x, but plugging in x=1x=1 then solving for A1A_1 is a little easier:

18=A112+622=2A114A1=2\begin{align} -18 &= A_1 \cdot 1 \cdot -2 + 6 \cdot -2 - 2 = -2A_1 - 14 \\ A_1 &= 2 \end{align}

Last, integrate:

x45x3+6x218x33x2d ⁣x=(x2+2x+6x22x3)d ⁣x=x222x+2lnx6x2lnx3+c\begin{align} &\int \frac{x^4 - 5x^3 + 6x^2 -18}{x^3 -3x^2} \d{x} \\ &= \int \left(x - 2 + \frac{2}{x} + \frac{6}{x^2} - \frac{2}{x-3} \right) \d{x} \\ &= \frac{x^2}{2} -2x + 2\ln|x| - \frac{6}{x} - 2\ln|x-3| + c \end{align}

Skill builder problems

Integrate the following:

Solution to Exercise 1

Fractional decomposition:

2x+16(x+4)(x4)=A1x+4+A2x4\frac{2x+16}{(x+4)(x-4)} = \frac{A_1}{x+4} + \frac{A_2}{x-4}

Cover up:

A1=2(4)+1644=1A2=2(4)+164+4=3\begin{align} A_1 &= \frac{2(-4)+16}{-4-4} = -1 \\ A_2 &= \frac{2(4)+16}{4+4} = 3 \end{align}

so

2x+16x216d ⁣x=(1x+4+3x4)d ⁣x=lnx+4+3lnx4+c\begin{align} \int\frac{2x+16}{x^2-16} \d{x} &= \int\left( -\frac{1}{x+4}+\frac{3}{x-4} \right) \d{x} \\ &= -\ln|x+4| + 3\ln|x-4| + c \end{align}
Solution to Exercise 2

Fractional decomposition:

8x(x+2)=A1x+A2x+2\frac{8}{x(x+2)} = \frac{A_1}{x} + \frac{A_2}{x+2}

Cover up:

A1=80+2=4A2=82=4\begin{align} A_1 &= \frac{8}{0+2} = 4 \\ A_2 &= \frac{8}{-2} = -4 \end{align}

so

8x2+2xd ⁣x=(4x4x+2)d ⁣x=4lnx4lnx+2+c\begin{align} \int\frac{8}{x^2+2x} \d{x} &= \int\left(\frac{4}{x} - \frac{4}{x+2}\right) \d{x} \\ &= 4\ln|x| - 4\ln|x+2| + c \end{align}
Solution to Exercise 3

Fractional decomposition

5+12x2x3x2(x9)(x1)=A1x+A2x2+A3x9+A4x1\frac{5+12x^2-x^3}{x^2(x-9)(x-1)} = \frac{A_1}{x} + \frac{A_2}{x^2} + \frac{A_3}{x-9} + \frac{A_4}{x-1}

Cover up:

A2=5+12(02)03(09)(01)=59A3=5+12(92)9392(91)=3181A4=5+12(12)1312(19)=2\begin{align} A_2 &= \frac{5+12(0^2)-0^3}{(0-9)(0-1)} = \frac{5}{9} \\ A_3 &= \frac{5+12(9^2)-9^3}{9^2(9-1)} = \frac{31}{81} \\ A_4 &= \frac{5+12(1^2)-1^3}{1^2(1-9)} = -2 \end{align}

To obtain A1A_1, plugin x=1x = -1

910=A1+591103181+1A1=5081\begin{align} \frac{9}{10} &= -A_1 + \frac{5}{9} - \frac{1}{10}\cdot\frac{31}{81} + 1 \\ A_1 &= \frac{50}{81} \end{align}

so

5+12x2x3(x2)(x9)(x1)d ⁣x=(50811x+591x2+31811x92x1)d ⁣x=5081lnx591x+3181lnx52lnx1+c\begin{align} \int\frac{5+12x^2-x^3}{(x^2)(x-9)(x-1)} \d{x} & =\int\Biggl(\frac{50}{81}\frac{1}{x} + \frac{5}{9}\frac{1}{x^2} + \frac{31}{81}\frac{1}{x-9} - \frac{2}{x-1}\Biggr) \d{x} \\ &= \frac{50}{81}\ln|x| - \frac{5}{9}\frac{1}{x} + \frac{31}{81}\ln|x-5| - 2\ln|x-1| + c \end{align}