How to find definite integral $$\int_{-1}^1 \frac{1}{\sqrt{1-x^2}(1+x^2)}\,dx$$
using complex intergral?
And if $$ f(z) = \frac{1}{\sqrt{1-z^2}(1+z^2)}\,$$
There are simple poles at $$ z = i , z = -i $$ so I calculated residue at those poles, $$ \lim_{z \to i} (z-i)f(z) = \frac{-1}{2\sqrt2} $$ $$ \lim_{z \to -i} (z+i)f(z) = \frac{1}{2\sqrt2} $$
but it seems like I'm wrong, can you guys help me?
btw the answer is $$ \frac{\pi}{\sqrt2} $$
Let $x=\tan t \implies dx= \sec^2 t dt$, then $$I=2\int_{0}^{1} \frac{1}{\sqrt{1-x^2}(1+x^2)} dx= 2\int_{0}^{\pi/4} \frac{\cos t}{\sqrt{1-2 \sin^2 t}} dt =2\frac{1}{\sqrt{2}}\int_{0}^{1} \frac{dz}{\sqrt{1-z^2}}=2\frac{1}{\sqrt{2}}\sin^{-1}z|_{0}^{1}=\frac{\pi}{\sqrt{2}}.$$ Lastly, we have use $z=\sqrt{2} \sin t$.