## Problem Statement

Find the indefinite integral:

$$
\int \frac{2 x^{3}+7 x^{2}+7 x-1}{(x+2)^{2}\left(x^{2}+x+1\right)} d x
$$
## Solution

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

We decompose the proper rational fraction into partial fractions using the method of undetermined coefficients:

$$
\begin{aligned}
& \frac{2 x^{3}+7 x^{2}+7 x-1}{(x+2)^{2}\left(x^{2}+x+1\right)}=\frac{A_{1}}{x+2}+\frac{A_{2}}{(x+2)^{2}}+\frac{B x+C}{x^{2}+x+1}= \\
& =\frac{A_{1}(x+2)\left(x^{2}+x+1\right)+A_{2}\left(x^{2}+x+1\right)+(B x+C)(x+2)^{2}}{(x+2)^{2}\left(x^{2}+x+1\right)}= \\
& =\frac{A_{1}\left(x^{3}+3 x^{2}+3 x+2\right)+A_{2}\left(x^{2}+x+1\right)+B\left(x^{3}+4 x^{2}+4 x\right)+C\left(x^{2}+4 x+4\right)}{(x+2)^{2}\left(x^{2}+x+1\right)}= \\
& =\frac{\left(A_{1}+B\right) x^{3}+\left(3 A_{1}+A_{2}+4 B+C\right) x^{2}+\left(3 A_{1}+A_{2}+4 B+4 C\right) x+\left(2 A_{1}+A_{2}+4 C\right)}{(x+2)^{2}\left(x^{2}+x+1\right)} \\
& \left\{\begin{array}{l}
A_{1}+B=2 \\
3 A_{1}+A_{2}+4 B+C=7 \\
3 A_{1}+A_{2}+4 B+4 C=7 \\
2 A_{1}+A_{2}+4 C=-1
\end{array}\right.
\end{aligned}
$$

Subtract the second equation from the third:

$$
\begin{aligned}
& \left\{\begin{array}{l}
A_{1}+B=2 \\
3 A_{1}+A_{2}+4 B+C=7 \\
3 C=0 \\
2 A_{1}+A_{2}+4 C=-1
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}+B=2 \\
3 A_{1}+A_{2}+4 B=7 \\
C=0 \\
2 A_{1}+A_{2}=-1
\end{array}\right.
\end{aligned}
$$

Subtract the fourth equation from the second:

$$
\left\{\begin{array}{l}
A_{1}+B=2 \\
A_{1}+4 B=8 \\
C=0 \\
2 A_{1}+A_{2}=-1
\end{array}\right.
$$

Subtract the first equation from the second:

$$
\begin{aligned}
& \left\{\begin{array}{l}
A_{1}+B=2 \\
3 B=6 \\
C=0 \\
2 A_{1}+A_{2}=-1
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}=0 \\
B=2 \\
C=0 \\
2 A_{1}+A_{2}=-1
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}=0 \\
B=2 \\
C=0 \\
A_{2}=-1
\end{array}\right. \\
& \frac{2 x^{3}+7 x^{2}+7 x-1}{(x+2)^{2}\left(x^{2}+x+1\right)}=-\frac{1}{(x+2)^{2}}+\frac{2 x}{x^{2}+x+1}
\end{aligned}
$$

Then

$$
\begin{aligned}
& \int \frac{2 x^{3}+7 x^{2}+7 x-1}{(x+2)^{2}\left(x^{2}+x+1\right)} d x=\int\left(-\frac{1}{(x+2)^{2}}+\frac{2 x}{x^{2}+x+1}\right) d x= \\
& =-\int \frac{1}{(x+2)^{2}} d x+\int \frac{2 x+1-1}{x^{2}+x+1} d x= \\
& =\frac{1}{x+2}+\int \frac{2 x+1}{x^{2}+x+1} d x-\int \frac{1}{x^{2}+x+1} d x= \\
& =\frac{1}{x+2}+\int \frac{d\left(x^{2}+x+1\right)}{x^{2}+x+1}-\int \frac{4}{4 x^{2}+4 x+4} d x= \\
& =\frac{1}{x+2}+\ln \left(x^{2}+x+1\right)-2 \int \frac{2}{(2 x+1)^{2}+3} d x= \\
& =\frac{1}{x+2}+\ln \left(x^{2}+x+1\right)-2 \int \frac{d(2 x+1)}{(2 x+1)^{2}+3}= \\
& =\frac{1}{x+2}+\ln \left(x^{2}+x+1\right)-\frac{2}{\sqrt{3}} \cdot \operatorname{arctg}\left(\frac{2 x+1}{\sqrt{3}}\right)+C
\end{aligned}
$$

Source — «http://pluspi.org/wiki/index.php/\�\�\�\�\�\�\�\�\�\�\�\�_\�\� \%D1\%83\%D0\%B7\%D0\%BD\%D0\%B5\%D1\%86\%D0\%BE\%D0\%B2_\%D0\%98\%D0\%BD\%D1\%82\%D0\%B5\%D0\%B3 $\% \mathrm{D} 1 \% 80 \% \mathrm{D} 0 \% \mathrm{~B} 0 \% \mathrm{D} 0 \% \mathrm{BB} \% \mathrm{D} 1 \% 8 \mathrm{~B}+7-3$ "

Categories: Kuznetsov's Problem Book Integrals Problem 7 | Integrals

- Last edited: 12:18, 13 April 2009.
- Content is available under CC-BY-SA 3.0.