How to integrate $\int_{-1}^1 \tan^{-1}\left(\frac{1}{\sqrt{1-x^2}}\right )\,dx$? Evaluate

$$\int_{-1}^1 \tan^{-1}\bigg (\dfrac{1}{\sqrt{1-x^2}}\bigg ) dx $$

Could somebody please help integrate this without using Differentiation under the Integral Sign?
 A: First, integrate by parts to reduce the problem to calculating
$$\int \frac{x^2}{\sqrt{1-x^2}(2-x^2)}\,dx.$$
now split into two more manageable terms
$$\int \frac{2}{\sqrt{1-x^2}(2-x^2)}\,dx + \int \frac{x^2-2}{\sqrt{1-x^2}(2-x^2)}\,dx.$$
The left term is the only tricky one. Substitute $x= \sin u$ to get rid of the square root
$$\int \frac{2}{2-\sin^2 u}\,du = \int \frac{2}{2\cos^2 u+\sin^2 u}\,du = \int \frac{2\sec^2 u}{2+\tan^2 u}\,du$$
and finally substitute $v = \frac{\tan u}{\sqrt{2}}$.
A: $$\begin{eqnarray*}\int_{-1}^{1}\arctan\left(\frac{1}{\sqrt{1-x^2}}\right)\,dx &=& \pi-2\int_{0}^{1}\arctan(\sqrt{1-x^2})\\&=&\pi-2\int_{0}^{\pi/2}\cos(\theta)\arctan(\cos\theta)\,d\theta\\&=&\pi-2\int_{0}^{\pi/2}\frac{\sin(\theta)^2}{1+\cos^2\theta}\,d\theta\\&=&\pi-2\int_{0}^{+\infty}\frac{t^2\,dt}{(1+t^2)(2+t^2)}\\&=&\pi-2\int_{0}^{+\infty}\left(\frac{2}{t^2+2}-\frac{1}{t^2+1}\right)\,dt\\&=&\color{red}{(2-\sqrt{2})\pi}.\end{eqnarray*}$$
Steps involved: 


*

*$\arctan\frac{1}{t}=\frac{\pi}{2}-\arctan t$

*substitution $x=\sin\theta$

*integration by parts

*substitution $\theta=\arctan t$

*partial fraction decomposition

*profit.

A: $$
\begin{aligned}
I &=\int_{-1}^{1} \tan ^{-1}\left(\frac{1}{\sqrt{1-x^{2}}}\right) d x \\
&=2 \int_{0}^{1} \tan ^{-1}\left(\frac{1}{\sqrt{1-x^{2}}}\right) d x \\
& \stackrel{IBP}{=}  2\left[\tan ^{-1}\left(\frac{1}{\sqrt{1-x^{2}}}\right)\right]_{0}^{1}-2 \int_{0}^{1} x \cdot\frac{1}{1+\left(\frac{1}{\sqrt{1-x^{2}}}\right)^{2}}\left(\frac{x}{\left(-x^{2}\right)^{\frac{3}{2}}}d x \right)\\
&=\pi-2 \underbrace{\int_{0}^{1} \frac{x^{2}}{\left(2-x^{2}\right) \sqrt{1-x^{2}}} d x}_{J} 
\end{aligned}
$$
Let $x=\sin \theta$, where $0 \leqslant \theta \leqslant \dfrac{\pi}{2},$ then
$$
\begin{aligned}
J &=\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{2} \theta}{\left(2-\sin ^{2} \theta\right) \cos \theta} \cos \theta d \theta \\
&=\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{2} \theta}{2-\sin ^{2} \theta} d \theta \\
&=\int_{0}^{\frac{\pi}{2}}\left(\frac{2}{2-\sin ^{2} \theta}-1\right) d \theta \\
&=2 \int_{0}^{\frac{\pi}{2}} \frac{\csc ^{2} \theta}{2 \csc ^{2} \theta-1} d \theta-\frac{\pi}{2} \\
&=-2 \int_{0}^{\frac{\pi}{2}} \frac{d(\cot \theta)}{1+2 \cot ^{2} \theta}-\frac{\pi}{2}\\ 
&=-2 \cdot \frac{1}{\sqrt{2}}\left[\tan ^{-1}(\sqrt{2} \cot \theta)\right]_{0}^{\frac{\pi}{2}}-\frac{\pi}{2} \\
&=\frac{\pi \sqrt{2}}{2}-\frac{\pi}{2}
\end{aligned}
$$
Now we can conclude that $I=\pi(2-\sqrt{2})$.
