Calculating the integral $\int_{1/3}^{3}\frac{\arctan(x)}{x^2-x+1}\;\mathrm{d}x$ [duplicate]

I need to calculate the following definite integral:

$$\int_{1/3}^3 \frac{\arctan x}{x^2 - x + 1} \; dx.$$

The only thing that I've found is:

$$\int_{1/3}^3 \frac{\arctan x}{x^2 - x + 1} \; dx = \int_{1/3}^3 \frac{\arctan \frac{1}{x}}{x^2 - x + 1} \; dx,$$

but it doesn't seem useful.


Hint $$\arctan{x}+\arctan{\dfrac{1}{x}}=\dfrac{\pi}{2}$$ so $$\int_{\frac{1}{3}}^{3}\dfrac{\arctan{x}}{x^2-x+1}dx=I$$ let $x=\dfrac{1}{u}$,then $$I=\int_{\frac{1}{3}}^{3}\dfrac{\arctan{\frac{1}{x}}}{x^2-x+1}dx$$ so $$2I=\dfrac{\pi}{2}\cdot\int_{\frac{1}{3}}^{3}\dfrac{1}{x^2-x+1}dx$$


$$\begin{eqnarray*}\int_{1/3}^{3}\frac{\arctan x}{x^2-x+1}\,dx&=&\int_{1/3}^{1}\frac{\arctan x}{x^2-x+1}\,dx+\int_{1}^{3}\frac{\arctan x}{x^2-x+1}\,dx\\&=&\int_{1}^{3}\frac{\arctan x+\arctan\frac{1}{x}}{x^2-x+1}\,dx\\&=&\frac{\pi}{2}\int_{1}^{3}\frac{dx}{x^2-x+1}\\&=&2\pi\int_{1}^{3}\frac{dx}{(2x-1)^2+3}\\&=&\pi\int_{1}^{5}\frac{dt}{t^2+3}\\&=&\color{red}{\frac{\pi}{\sqrt{3}}\,\arctan\frac{5}{\sqrt{3}}-\frac{\pi^2}{6\sqrt{3}}}.\end{eqnarray*}$$


What you have found is actually very useful. Let $I$ be your integral. Note that for $x>0$ one has that $$\arctan(x)+\arctan(1/x)=\pi/2,$$ so we have the relation $$2I=\int_{1/3}^3 \frac{\pi/2}{x^2-x+1}~dx,$$ which can be computed by completing the square on the denominator.