## PROBLEM 2

Calculate $\int x \operatorname{arctg} \frac{1}{x^{2}+x+1} d x, \quad x \in(0, \infty)$.
## Solution:

It is known that $\quad \operatorname{arctg} \frac{1}{x^{2}+x+1}=\operatorname{arctg} \frac{1}{x}-\operatorname{arctg} \frac{1}{x+1}$ and $\operatorname{arctg} x+\operatorname{arctg} \frac{1}{x}=\frac{\pi}{2}, \quad \forall x \in(0, \infty) . \quad 2 \text{p}$

It follows that $\int x \operatorname{arctg} \frac{1}{x^{2}+x+1} d x=\int\left(x \operatorname{arctg} \frac{1}{x}-x \operatorname{arctg} \frac{1}{x+1}\right) d x=$

$$
\begin{aligned}
& =\int\left[x\left(\frac{\pi}{2}-\operatorname{arctg} x\right)-x\left(\frac{\pi}{2}-\operatorname{arctg}(x+1)\right)\right] d x= \\
& \begin{array}{l}
=-\int x \operatorname{arctg} x d x+\int x \operatorname{arctg}(x+1) d x= \\
=\int\left(\frac{x^{2}}{2}\right)^{\prime} \operatorname{arctg}(x+1) d x-\int\left(\frac{x^{2}}{2}\right)^{\prime} \operatorname{arctg} x d x=
\end{array} \\
& =\frac{x^{2}}{2} \operatorname{arctg}(x+1)-\int \frac{x^{2}}{2} \cdot \frac{1}{1+(x+1)^{2}} d x-\frac{x^{2}}{2} \operatorname{arctg} x+\int \frac{x^{2}}{2} \cdot \frac{1}{1+x^{2}} d x= \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)+\frac{1}{2} \int \frac{x^{2}+1-1}{x^{2}+1} d x-\frac{1}{2} \int \frac{x^{2}+x+2-x-2}{x^{2}+x+2} d x=1 \text{p} \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)+\frac{1}{2} x-\operatorname{arctg} x-\frac{1}{2} x+\frac{1}{2} \int \frac{x+2}{x^{2}+x+2} d x= \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)-\operatorname{arctg} x+\frac{1}{2} \cdot \frac{1}{2} \int \frac{2 x+1+3}{x^{2}+x+2} d x= \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)-\operatorname{arctg} x+\frac{1}{4} \ln \left(x^{2}+x+2\right)+\frac{3}{4} \int \frac{d x}{\left(x+\frac{1}{2}\right)^{2}+\frac{7}{4}}= \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)-\operatorname{arctg} x+\frac{1}{4} \ln \left(x^{2}+x+2\right)+\frac{3}{4} \cdot \frac{2}{\sqrt{7}} \operatorname{arctg} \frac{x+\frac{1}{2}}{\frac{\sqrt{7}}{2}}= \\
& =\frac{x^{2}}{2}(\operatorname{arctg}(x+1)-\operatorname{arctg} x)-\operatorname{arctg} x+\frac{1}{4} \ln \left(x^{2}+x+2\right)+\frac{3}{2 \sqrt{7}} \operatorname{arctg} \frac{2 x+1}{\sqrt{7}}+C
\end{aligned}
$$