# Integration of Rational Functions

## Solved Problems

Click or tap a problem to see the solution.

### Example 9

Find the integral $\int {\frac{{x + 1}}{{{{\left( {x - 2} \right)}^3}}} dx}.$

### Example 10

Evaluate the integral $\int {\frac{{xdx}}{{{x^2} + 2x + 2}}}.$

### Example 11

Evaluate the integral $\int {\frac{{{x^2}dx}}{{\left( {x - 1} \right)\left( {x - 2} \right)\left( {x - 3} \right)}}}.$

### Example 12

Find the integral $\int {\frac{{xdx}}{{{{\left( {x + 2} \right)}^3}}}}.$

### Example 13

Evaluate $\int {\frac{{dx}}{{\left( {x + 1} \right)\left( {{x^2} + 1} \right)}}}.$

### Example 14

Evaluate the integral $\int {\frac{{dx}}{{{x^2}\left( {x + 1} \right)}}}.$

### Example 15

Find the integral $\int {\frac{{dx}}{{{x^3} + 1}}}.$

### Example 16

Evaluate the integral $\int {\frac{{dx}}{{{x^4} - 1}}}.$

### Example 17

Calculate the integral $\int {{\frac{{5x}}{{{{\left( {x - 1} \right)}^3}}}} dx}.$

### Example 18

Evaluate the integral $\int {\frac{{dx}}{{{{\left( {{x^2} - 1} \right)}^2}}}}.$

### Example 19

Find the integral $\int {\frac{{dx}}{{{{\left( {{x^2} + x + 1} \right)}^2}}}}.$

### Example 9.

Find the integral $\int {\frac{{x + 1}}{{{{\left( {x - 2} \right)}^3}}} dx}.$

Solution.

We can use the partial fraction decomposition to convert the rational function into an integrable form. The result will be the same if we directly simplify the integral to obtain:

$\int {\frac{{x + 1}}{{{{\left( {x - 2} \right)}^3}}}dx} = \int {\frac{{x - 2 + 3}}{{{{\left( {x - 2} \right)}^3}}}dx} = \int {\frac{{x - 2}}{{{{\left( {x - 2} \right)}^3}}}dx} + \int {\frac{3}{{{{\left( {x - 2} \right)}^3}}}dx} = \int {\frac{{dx}}{{{{\left( {x - 2} \right)}^2}}}} + 3\int {\frac{{dx}}{{{{\left( {x - 2} \right)}^3}}}} = - \frac{1}{{x - 2}} + 3 \cdot \frac{1}{{\left( { - 2} \right){{\left( {x - 2} \right)}^2}}} + C = - \frac{1}{{x - 2}} - \frac{3}{{2{{\left( {x - 2} \right)}^2}}} + C = \frac{{ - 2\left( {x - 2} \right) - 3}}{{2{{\left( {x - 2} \right)}^2}}} + C = \frac{{ - 2x + 4 - 3}}{{2{{\left( {x - 2} \right)}^2}}} + C = \frac{{1 - 2x}}{{2{{\left( {x - 2} \right)}^2}}} + C.$

### Example 10.

Evaluate the integral $\int {\frac{{xdx}}{{{x^2} + 2x + 2}}}.$

Solution.

Given that the derivative of the denominator is

$\left( {{x^2} + 2x + 2} \right)^\prime = 2x + 2,$

we rewrite the integral as follows

$\int {\frac{{xdx}}{{{x^2} + 2x + 2}}} = \frac{1}{2}\int {\frac{{2xdx}}{{{x^2} + 2x + 2}}} = \frac{1}{2}\int {\frac{{2x + 2 - 2}}{{{x^2} + 2x + 2}}dx} = \frac{1}{2}\int {\frac{{2x + 2}}{{{x^2} + 2x + 2}}dx} - \frac{1}{2}\int {\frac{2}{{{x^2} + 2x + 2}}dx} = \frac{1}{2}\int {\frac{{2x + 2}}{{{x^2} + 2x + 2}}dx} - \int {\frac{{dx}}{{{x^2} + 2x + 2}}} = {I_1} - {I_2}.$

We evaluate the first integral $${I_1}$$ by substitution:

$u = {x^2} + 2x + 2,\;\;du = \left( {2x + 2} \right)dx.$

Hence

${I_1} = \frac{1}{2}\int {\frac{{2x + 2}}{{{x^2} + 2x + 2}}dx} = \frac{1}{2}\int {\frac{{du}}{u}} = \frac{1}{2}\ln \left| u \right| = \frac{1}{2}\ln \left| {{x^2} + 2x + 2} \right| = \frac{1}{2}\ln \left( {{x^2} + 2x + 2} \right).$

To find the second integral $${I_2}$$ we complete the square in the denominator:

${I_2} = \int {\frac{{dx}}{{{x^2} + 2x + 2}}} = \int {\frac{{dx}}{{\left( {{x^2} + 2x + 1} \right) + 1}}} = \int {\frac{{dx}}{{{{\left( {x + 1} \right)}^2} + 1}}} = \arctan \left( {x + 1} \right).$

$I = \frac{1}{2}\ln \left( {{x^2} + 2x + 2} \right) - \arctan \left( {x + 1} \right) + C.$

### Example 11.

Evaluate the integral $\int {\frac{{{x^2}dx}}{{\left( {x - 1} \right)\left( {x - 2} \right)\left( {x - 3} \right)}}}.$

Solution.

We decompose the integrand into partial functions:

$\frac{{{x^2}dx}}{{\left( {x - 1} \right)\left( {x - 2} \right)\left( {x - 3} \right)}} = \frac{A}{{x - 1}} + \frac{B}{{x - 2}} + \frac{C}{{x - 3}}.$

Equate coefficients:

$A\left( {x - 2} \right)\left( {x - 3} \right) + B\left( {x - 1} \right)\left( {x - 3} \right) + C\left( {x - 1} \right)\left( {x - 2} \right) = {x^2},$
$A{x^2} - 2Ax - 3Ax + 6A + B{x^2} - Bx - 3Bx + 3B + C{x^2} - Cx - 2Cx + 2C = {x^2},$
$\left( {A + B + C} \right){x^2} - \left( {5A + 4B + 3C} \right)x + 6A + 3B + 2C = {x^2}.$

Hence,

$\left\{ \begin{array}{l} A + B + C = 1\\ 5A + 4B + 3C = 0\\ 6A + 3B + 2C = 0 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = \frac{1}{2}\\ B = - 4\\ C = \frac{9}{2} \end{array} \right..$

Then

$\frac{{{x^2}dx}}{{\left( {x - 1} \right)\left( {x - 2} \right)\left( {x - 3} \right)}} = \frac{{\frac{1}{2}}}{{x - 1}} - \frac{4}{{x - 2}} + \frac{{\frac{9}{2}}}{{x - 3}}.$

The integral is given by

$\int {\frac{{{x^2}dx}}{{\left( {x - 1} \right)\left( {x - 2} \right)\left( {x - 3} \right)}}} = \frac{1}{2}\int {\frac{{dx}}{{x - 1}}} - 4\int {\frac{{dx}}{{x - 2}}} + \frac{9}{2}\int {\frac{{dx}}{{x - 3}}} = \frac{1}{2}\ln \left| {x - 1} \right| - 4\ln \left| {x - 2} \right| + \frac{9}{2}\ln \left| {x - 3} \right| + C.$

### Example 12.

Find the integral $\int {\frac{{xdx}}{{{{\left( {x + 2} \right)}^3}}}}.$

Solution.

The linear expression in the denominator has multiplicity $$3,$$ so the partial fraction decomposition of the rational function is written as

$\frac{x}{{{{\left( {x + 2} \right)}^3}}} = \frac{A}{{{{\left( {x + 2} \right)}^3}}} + \frac{B}{{{{\left( {x + 2} \right)}^2}}} + \frac{C}{{x + 2}}.$

Simplify and equate the coefficients of like powers of $$x:$$

$x = A + B\left( {x + 2} \right) + C{\left( {x + 2} \right)^2},$
$\color{red}x = \color{blue}A + \color{red}{Bx} + \color{blue}{2B} + \color{darkgreen}{C{x^2}} + \color{red}{4Cx} + \color{blue}{4C},$
$\color{red}x = \color{darkgreen}{C{x^2}} + \left( \color{red}{B + 4C} \right)\color{red}x + \left( \color{blue}{A + 2B + 4C} \right).$

We get the system of equations:

$\left\{ \begin{array}{l} C = 0\\ B + 4C = 1\\ A + 2B + 4C = 0 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} C = 0\\ B = 1\\ A = - 2 \end{array} \right..$

Then

$\frac{x}{{{{\left( {x + 2} \right)}^3}}} = \frac{{\left( { - 2} \right)}}{{{{\left( {x + 2} \right)}^3}}} + \frac{1}{{{{\left( {x + 2} \right)}^2}}},$

and we can easily compute the integral:

$\int {\frac{{xdx}}{{{{\left( {x + 2} \right)}^3}}}} = \int {\frac{{\left( { - 2} \right)dx}}{{{{\left( {x + 2} \right)}^3}}}} + \int {\frac{{dx}}{{{{\left( {x + 2} \right)}^2}}}} = \left( { - 2} \right) \cdot \frac{1}{{\left( { - 2} \right){{\left( {x + 2} \right)}^2}}} - \frac{1}{{x + 2}} + C = \frac{1}{{{{\left( {x + 2} \right)}^2}}} - \frac{1}{{x + 2}} + C = \frac{{1 - x - 2}}{{{{\left( {x + 2} \right)}^2}}} + C = - \frac{{x + 1}}{{{{\left( {x + 2} \right)}^2}}} + C.$

### Example 13.

Evaluate $\int {\frac{{dx}}{{\left( {x + 1} \right)\left( {{x^2} + 1} \right)}}}.$

Solution.

Decompose the integrand into the sum of two fractions:

$\frac{1}{{\left( {x + 1} \right)\left( {{x^2} + 1} \right)}} = \frac{A}{{x + 1}} + \frac{{Bx + C}}{{{x^2} + 1}}.$

Equate coefficients:

$A\left( {{x^2} + 1} \right) + \left( {Bx + C} \right)\left( {x + 1} \right) = 1,\;\;\Rightarrow A{x^2} + A + B{x^2} + Cx + Bx + C = 1,\;\; \Rightarrow \left( {A + B} \right){x^2} + \left( {B + C} \right)x + A + C = 1.$

Hence

$\left\{ \begin{array}{l} A + B = 0\\ B + C = 0\\ A + C = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = \frac{1}{2}\\ B = - \frac{1}{2}\\ C = \frac{1}{2} \end{array} \right..$

The integrand can be written as

$\frac{1}{{\left( {x + 1} \right)\left( {{x^2} + 1} \right)}} = \frac{{\frac{1}{2}}}{{x + 1}} + \frac{{ - \frac{1}{2}x + \frac{1}{2}}}{{{x^2} + 1}} = \frac{1}{{2\left( {x + 1} \right)}} - \frac{1}{2} \cdot \frac{x}{{{x^2} + 1}} + \frac{1}{2} \cdot \frac{1}{{{x^2} + 1}}.$

The initial integral becomes

$\int {\frac{{dx}}{{\left( {x + 1} \right)\left( {{x^2} + 1} \right)}}} = \frac{1}{2}\int {\frac{{dx}}{{x + 1}}} - \frac{1}{2}\int {\frac{{xdx}}{{{x^2} + 1}}} + \frac{1}{2}\int {\frac{{dx}}{{{x^2} + 1}}} = \frac{1}{2}\ln \left| {x + 1} \right| - \frac{1}{4}\int {\frac{{d\left( {{x^2} + 1} \right)}}{{{x^2} + 1}}} + \frac{1}{2}\arctan x = \frac{1}{2}\ln \left| {x + 1} \right| - \frac{1}{4}\ln \left( {{x^2} + 1} \right) + \frac{1}{2}\arctan x + C.$

### Example 14.

Evaluate the integral $\int {\frac{{dx}}{{{x^2}\left( {x + 1} \right)}}}.$

Solution.

Using the partial fraction decomposition, we get

$\frac{1}{{{x^2}\left( {x + 1} \right)}} = \frac{A}{{{x^2}}} + \frac{B}{x} + \frac{C}{{x + 1}}.$

Determine the unknown coefficients:

$1 = A\left( {x + 1} \right) + Bx\left( {x + 1} \right) + C{x^2},$
$\color{blue}1 = \color{red}{Ax} + \color{blue}{A} + \color{darkgreen}{B{x^2}} + \color{red}{Bx} + \color{darkgreen}{C{x^2}},$
$\color{blue}1 = \left( \color{darkgreen}{B + C} \right)\color{darkgreen}{x^2} + \left( \color{red}{A + B} \right)\color{red}x + \color{blue}{A}.$

Hence

$\left\{ \begin{array}{l} B + C = 0\\ A + B = 0\\ A = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = 1\\ B = - 1\\ C = 1 \end{array} \right..$

The rational function is written as the sum of following partial fractions:

$\frac{1}{{{x^2}\left( {x + 1} \right)}} = \frac{1}{{{x^2}}} - \frac{1}{x} + \frac{1}{{x + 1}}.$

So the integral is given by

$\int {\frac{{dx}}{{{x^2}\left( {x + 1} \right)}}} = \int {\left( {\frac{1}{{{x^2}}} - \frac{1}{x} + \frac{1}{{x + 1}}} \right)dx} = \int {\frac{{dx}}{{{x^2}}}} - \int {\frac{{dx}}{x}} + \int {\frac{{dx}}{{x + 1}}} = - \frac{1}{x} - \ln \left| x \right| + \ln \left| {x + 1} \right| + C = \ln \left| {\frac{{x + 1}}{x}} \right| - \frac{1}{x} + C.$

### Example 15.

Find the integral $\int {\frac{{dx}}{{{x^3} + 1}}}.$

Solution.

We can factor the denominator in the integrand:

${x^3} + 1 = \left( {x + 1} \right)\left( {{x^2} - x + 1} \right).$

Decompose the integrand into partial functions:

$\frac{1}{{{x^3} + 1}} = \frac{1}{{\left( {x + 1} \right)\left( {{x^2} - x + 1} \right)}} = \frac{A}{{x + 1}} + \frac{{Bx + C}}{{{x^2} - x + 1}}.$

Equate coefficients

$A\left( {{x^2} - x + 1} \right) + \left( {Bx + C} \right)\left( {x + 1} \right) = 1,\;\; \Rightarrow A{x^2} - Ax + A + B{x^2} + Cx + Bx + C = 1,\;\; \Rightarrow \left( {A + B} \right){x^2} + \left( { - A + B + C} \right)x + A + C = 1.$

Hence,

$\left\{ \begin{array}{l} A + B = 0\\ - A + B + C = 0\\ A + C = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = \frac{1}{3}\\ B = - \frac{1}{3}\\ C = \frac{2}{3} \end{array} \right..$

Then

$\frac{1}{{{x^3} + 1}} = \frac{{\frac{1}{3}}}{{x + 1}} + \frac{{ - \frac{1}{3}x + \frac{2}{3}}}{{{x^2} - x + 1}} = \frac{1}{{3\left( {x + 1} \right)}} - \frac{1}{3} \cdot \frac{{x - 2}}{{{x^2} - x + 1}}.$

Now we can calculate the initial integral:

$\int {\frac{{dx}}{{{x^3} + 1}}} = \frac{1}{3}\int {\frac{{dx}}{{x + 1}}} - \frac{1}{3}\int {\frac{{x - 2}}{{{x^2} - x + 1}}dx} = \frac{1}{3}\ln \left| {x + 1} \right| - \frac{1}{3}\int {\frac{{x - \frac{1}{2} - \frac{3}{2}}}{{{x^2} - x + 1}}dx} = \frac{1}{3}\ln \left| {x + 1} \right| - \frac{1}{3}\int {\frac{{x - \frac{1}{2}}}{{{x^2} - x + 1}}dx} + \frac{1}{2}\int {\frac{{dx}}{{{x^2} - x + 1}}} = \frac{1}{3}\ln \left| {x + 1} \right| - \frac{1}{6}\int {\frac{{\left( {2x - 1} \right)dx}}{{{x^2} - x + 1}}} + \frac{1}{2}\int {\frac{{dx}}{{{{\left( {x - \frac{1}{2}} \right)}^2} + \frac{3}{4}}}} = \frac{1}{3}\ln \left| {x + 1} \right| - \frac{1}{6}\int {\frac{{d\left( {{x^2} - x + 1} \right)}}{{{x^2} - x + 1}}} + \frac{1}{2}\int {\frac{{d\left( {x - \frac{1}{2}} \right)}}{{{{\left( {x - \frac{1}{2}} \right)}^2} } + {{{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}}}} = \frac{1}{3}\ln \left| {x + 1} \right| - \frac{1}{6}\ln \left( {{x^2} - x + 1} \right) + \frac{1}{{\sqrt 3 }}\arctan \frac{{2x - 1}}{{\sqrt 3 }} + C.$

### Example 16.

Evaluate the integral $\int {\frac{{dx}}{{{x^4} - 1}}}.$

Solution.

We can factor the denominator in the integrand:

${x^4} - 1 = \left( {{x^2} - 1} \right)\left( {{x^2} + 1} \right) = \left( {x - 1} \right)\cdot\left( {x + 1} \right)\cdot \left( {{x^2} + 1} \right).$

Decompose the integrand into partial functions:

$\frac{1}{{{x^4} - 1}} = \frac{1}{{\left( {x - 1} \right)\left( {x + 1} \right)\left( {{x^2} + 1} \right)}} = \frac{A}{{x - 1}} + \frac{B}{{x + 1}} + \frac{{Cx + D}}{{{x^2} + 1}}.$

Equate coefficients:

$A\left( {{x^2} + 1} \right)\left( {x + 1} \right) + B\left( {{x^2} + 1} \right)\left( {x - 1} \right) + \left( {Cx + D} \right)\left( {{x^2} - 1} \right) = 1,$
$A{x^3} + Ax + A{x^2} + A + B{x^3} - B{x^2} + Bx - B + C{x^3} + D{x^2} - Cx - D = 1,$
$\left( {A + B + C} \right){x^3} + \left( {A - B + D} \right){x^2} + \left( {A + B - C} \right)x + A - B - D = 1.$

Hence,

$\left\{ \begin{array}{l} A + B + C = 0\\ A - B + D = 0\\ A + B - C = 0\\ A - B - D = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = \frac{1}{4}\\ B = - \frac{1}{4}\\ C = 0\\ D = - \frac{1}{2} \end{array} \right..$

Thus, the integrand becomes

$\frac{1}{{{x^4} - 1}} = \frac{{\frac{1}{4}}}{{x - 1}} - \frac{{\frac{1}{4}}}{{x + 1}} - \frac{{\frac{1}{2}}}{{{x^2} + 1}}.$

$\int {\frac{{dx}}{{{x^4} - 1}}} = \frac{1}{4}\int {\frac{{dx}}{{x - 1}}} - \frac{1}{4}\int {\frac{{dx}}{{x + 1}}} - \frac{1}{2}\int {\frac{{dx}}{{{x^2} + 1}}} = \frac{1}{4}\ln \left| {x - 1} \right| - \frac{1}{4}\ln \left| {x + 1} \right| - \frac{1}{2}\arctan x + C = \frac{1}{4}\ln \left| {\frac{{x - 1}}{{x + 1}}} \right| - \frac{1}{2}\arctan x + C.$

### Example 17.

Calculate the integral $\int {{\frac{{5x}}{{{{\left( {x - 1} \right)}^3}}}} dx}.$

Solution.

We decompose the integrand into partial functions, taking into account that the denominator has a third degree root:

$\frac{{5x}}{{{{\left( {x - 1} \right)}^3}}} = \frac{A}{{{{\left( {x - 1} \right)}^3}}} + \frac{B}{{{{\left( {x - 1} \right)}^2}}} + \frac{C}{{x - 1}}.$

Equate coefficients:

$A + B\left( {x - 1} \right) + C{\left( {x - 1} \right)^2} = 5x,\;\; \Rightarrow A + Bx - B + C{x^2} - 2Cx + C = 5x,\;\; \Rightarrow C{x^2} + \left( {B - 2C} \right)x + A - B + C = 5x.$

We get the following system of equations:

$\left\{ \begin{array}{l} C = 0\\ B - 2C = 5\\ A - B + C = 0 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = 5\\ B = 5\\ C = 0 \end{array} \right..$

Hence,

$\frac{{5x}}{{{{\left( {x - 1} \right)}^3}}} = \frac{5}{{{{\left( {x - 1} \right)}^3}}} + \frac{5}{{{{\left( {x - 1} \right)}^2}}}.$

The initial integral is equal to

$\int {\frac{{5x}}{{{{\left( {x - 1} \right)}^3}}}dx} = \int {\left( {\frac{5}{{{{\left( {x - 1} \right)}^3}}} + \frac{5}{{{{\left( {x - 1} \right)}^2}}}} \right)dx} = 5\int {\frac{{dx}}{{{{\left( {x - 1} \right)}^3}}}} + 5\int {\frac{{dx}}{{{{\left( {x - 1} \right)}^2}}}} = 5 \cdot \frac{{{{\left( {x - 1} \right)}^{ - 2}}}}{{ - 2}} - \frac{5}{{x - 1}} + C = - \frac{5}{{2{{\left( {x - 1} \right)}^2}}} - \frac{5}{{x - 1}} + C.$

### Example 18.

Evaluate the integral $\int {\frac{{dx}}{{{{\left( {{x^2} - 1} \right)}^2}}}}.$

Solution.

The partial fraction decomposition of the rational function has the form

$\frac{1}{{{{\left( {{x^2} - 1} \right)}^2}}} = \frac{1}{{{{\left( {x - 1} \right)}^2}{{\left( {x + 1} \right)}^2}}} = \frac{A}{{{{\left( {x - 1} \right)}^2}}} + \frac{B}{{x - 1}} + \frac{C}{{{{\left( {x + 1} \right)}^2}}} + \frac{D}{{x + 1}}.$

Calculate the unknown coefficients $$A, B, C, D:$$

$1 = A{\left( {x + 1} \right)^2} + B\left( {x - 1} \right){\left( {x + 1} \right)^2} + C{\left( {x - 1} \right)^2} + D\left( {x + 1} \right){\left( {x - 1} \right)^2},$
$1 = A\left( {{x^2} + 2x + 1} \right) + \left( {Bx - B} \right)\left( {{x^2} + 2x + 1} \right) + C\left( {{x^2} - 2x + 1} \right) + \left( {Dx + D} \right)\left( {{x^2} - 2x + 1} \right),$
$\color{blue}1 = \color{darkgreen}{A{x^2}} + \color{red}{2Ax} + \color{blue}A + \color{magenta}{B{x^3}} - \color{darkgreen}{B{x^2}} + \color{darkgreen}{2B{x^2}} - \color{red}{2Bx} + \color{red}{Bx} - \color{blue}B + \color{darkgreen}{C{x^2}} - \color{red}{2Cx} + \color{blue}C + \color{magenta}{D{x^3}} + \color{darkgreen}{D{x^2}} - \color{darkgreen}{2D{x^2}} - \color{red}{2Dx} + \color{red}{Dx} + \color{blue}D,$
$\color{blue}1 = \left( \color{magenta}{B + D} \right)\color{magenta}{x^3} + \left( \color{darkgreen}{A + B + C - D} \right)\color{darkgreen}{x^2} + \left( \color{red}{2A - B - 2C - D} \right)\color{red}x + \left( \color{blue}{A - B + C + D} \right).$

The coefficients can be determined from the system of equations

$\left\{ \begin{array}{l} B + D = 0\\ A + B + C - D = 0\\ 2A - B - 2C - D = 0\\ A - B + C + D = 1 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} A = \frac{1}{4}\\ B = - \frac{1}{4}\\ C = \frac{1}{4}\\ D = \frac{1}{4} \end{array} \right..$

Hence, the integrand can be written as the sum of the partial fractions:

$\frac{1}{{{{\left( {{x^2} - 1} \right)}^2}}} = \frac{1}{{4{{\left( {x - 1} \right)}^2}}} - \frac{1}{{4\left( {x - 1} \right)}} + \frac{1}{{4{{\left( {x + 1} \right)}^2}}} + \frac{1}{{4\left( {x + 1} \right)}}.$

Integrating these expressions yields:

$\int {\frac{{dx}}{{{{\left( {{x^2} - 1} \right)}^2}}}} = \int {\frac{{dx}}{{4{{\left( {x - 1} \right)}^2}}}} - \int {\frac{{dx}}{{4\left( {x - 1} \right)}}} + \int {\frac{{dx}}{{4{{\left( {x + 1} \right)}^2}}}} + \int {\frac{{dx}}{{4\left( {x + 1} \right)}}} = \frac{1}{4}\int {\frac{{dx}}{{{{\left( {x - 1} \right)}^2}}}} - \frac{1}{4}\int {\frac{{dx}}{{x - 1}}} + \frac{1}{4}\int {\frac{{dx}}{{{{\left( {x + 1} \right)}^2}}}} + \frac{1}{4}\int {\frac{{dx}}{{x + 1}}} = - \frac{1}{{4\left( {x - 1} \right)}} - \frac{1}{4}\ln \left| {x - 1} \right| - \frac{1}{{4\left( {x + 1} \right)}} + \frac{1}{4}\ln \left| {x + 1} \right| + C = \frac{1}{4}\ln \left| {\frac{{x + 1}}{{x - 1}}} \right| - \frac{1}{4}\left( {\frac{1}{{x - 1}} + \frac{1}{{x + 1}}} \right) + C = \frac{1}{4}\ln \left| {\frac{{x + 1}}{{x - 1}}} \right| - \frac{1}{4} \cdot \frac{{2x}}{{{x^2} - 1}} + C = \frac{1}{4}\ln \left| {\frac{{x + 1}}{{x - 1}}} \right| - \frac{x}{{2{x^2} - 2}} + C.$

### Example 19.

Find the integral $\int {\frac{{dx}}{{{{\left( {{x^2} + x + 1} \right)}^2}}}}.$

Solution.

Complete the square in the denominator $${{x^2} + x + 1}:$$

$\int {\frac{{dx}}{{{{\left( {{x^2} + x + 1} \right)}^2}}}} = \int {\frac{{dx}}{{{{\left( {{x^2} + x + \frac{1}{4} + \frac{3}{4}} \right)}^2}}}} = \int {\frac{{dx}}{{{{\left( {{{\left( {x + \frac{1}{2}} \right)}^2} + {{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}} \right)}^2}}}} .$

Now, we can compute the integral using the reduction formula:

$\int {\frac{{dt}}{{{{\left( {{t^2} + {m^2}} \right)}^k}}}} = \frac{t}{{2{m^2}\left( {k - 1} \right){{\left( {{t^2} + {m^2}} \right)}^{k - 1}}}} + \frac{{2k - 3}}{{2{m^2}\left( {k - 1} \right)}} \cdot \int {\frac{{dt}}{{{{\left( {{t^2} + {m^2}} \right)}^{k - 1}}}}}.$

Then

$\int {\frac{{dx}}{{{{\left( {{{\left( {x + \frac{1}{2}} \right)}^2} + {{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}} \right)}^2}}}} = \frac{1}{{2 \cdot \frac{3}{4} \cdot 1 \cdot \left( {{{\left( {x + \frac{1}{2}} \right)}^2} + {{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}} \right)}} + \frac{{4 - 3}}{{2 \cdot \frac{3}{4} \cdot 1}} \cdot \int {\frac{{dx}}{{\left( {{{\left( {x + \frac{1}{2}} \right)}^2} + {{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}} \right)}}} = \frac{2}{{3\left( {{x^2} + x + 1} \right)}} + \frac{2}{3}\int {\frac{{dx}}{{\left( {{{\left( {x + \frac{1}{2}} \right)}^2} + {{\left( {\frac{{\sqrt 3 }}{2}} \right)}^2}} \right)}}} = \frac{2}{{3\left( {{x^2} + x + 1} \right)}} + \frac{2}{3} \cdot \frac{2}{{\sqrt 3 }}\arctan \frac{{x + \frac{1}{2}}}{{\frac{{\sqrt 3 }}{2}}} + C = \frac{2}{{3\left( {{x^2} + x + 1} \right)}} + \frac{4}{{3\sqrt 3 }}\arctan \frac{{2x + 1}}{{\sqrt 3 }} + C.$