How to evaluate this $\int_{-1}^1 (\frac{1}{x}+1-\frac{\sqrt{1-x^2}}{x})\arctan\frac{2}{x^2}dx$ I dont know how to evaluate this improper integral:
$$I=\int_{-1}^1 \left(\frac{1}{x}+1-\frac{\sqrt{1-x^2}}{x}\right )\arctan\frac{2}{x^2}dx$$
At first I tried to do it in trigonometric substitution：$x=\sin t,dx=\cos tdt$
$$I=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\left(\csc t+1-\cot t\right)\arctan(2\csc ^2t)\cos tdt$$
$$=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\left(\cot t+\cos t-\cot t\cos t\right)\arctan(2\csc ^2t)dt$$
I don't know what to do next,any help will be appreciated.

Let me write a complete answer：
\begin{align}
I&=\int_{-1}^1\left(\frac{1}{x}+1-\frac{\sqrt{1-x^2}}{x}\right)\arctan\left(\frac{2}{x^2}\right)dx\\
&=\int_{-1}^1\arctan\left(\frac{2}{x^2}\right)dx\qquad(\text odd function)\\
&=\int_0^2\arctan\frac{2}{(x-1)^2}dx\\
&=\int_0^2\arctan\frac{x+(2-x)}{1-x(2-x)}dx\\
&=\int_0^2(\arctan x+\arctan(2-x))dx\\
&=2\int_0^2\arctan xdx\\
&=2(x\arctan x|_0^2-\int_0^2\frac{x}{1+x^2}dx)\\
&=4\arctan 2-\ln (1+x^2)|_0^2\\
&=4\arctan 2-\ln 5
\end{align}
