Show that
$$I=\int_{-1}^1\frac{1}{(1-x^2)^{1/2}(x^2+1)}dx=\frac{\pi}{\sqrt2}$$
using contour integration, where $\;(1-x^2)^{1/2}\;$ is defined to be positive for $\; -1<x<1$.
Show that
$$I=\int_{-1}^1\frac{1}{(1-x^2)^{1/2}(x^2+1)}dx=\frac{\pi}{\sqrt2}$$
using contour integration, where $\;(1-x^2)^{1/2}\;$ is defined to be positive for $\; -1<x<1$.
You can simply let $x=\sin{t}$ in the integral so it becomes
$$\int_{-\pi/2}^{\pi/2} \frac{dt}{1+\sin^2{t}} = \int_{-\pi}^{\pi} \frac{du}{3-\cos{u}}$$
Now let $z=e^{i u}$, $du = -i dz/z$ and we integrate about the unit circle in the complex plane; the integral is equal to:
$$2 i \oint_{|z|=1} \frac{dz}{z^2-6 z+1}$$
This is then equal to $i 2 \pi$ times the sum of the residues of the poles of the integrand inside the unit circle. The poles of the integrand are at $z_{\pm}=3\pm 2 \sqrt{2}$, so only $z_-$ counts toward the value of the integral. The integral is then
$$i 2 \pi (i 2) \frac1{-4 \sqrt{2}} = \frac{\pi}{\sqrt{2}} $$
Let $\;BS^1\;$ be the upper half of the complex unit circle with little round bumps-out at the function's poles $\;\pm1\,,\, i\;$, for example: instead of closing the circle at $\;1\;$ take the little circle-like (bump-circle)
$$\{|z-1|=\epsilon\;;\;\;\text{Re}\,z<1\;,\text{Im}\,z>0\}=\;\text{ the left upper quarter of the circle $|z-1|=\epsilon$}$$
and something similar with the other two poles here (with $\;i\;$ one takes the whole upper half of the circle $\;|z-1|=\epsilon\;$).
Evaluate the residues within the domain bounded by $\;BS^1\;$ and the interval $\;[-1+\epsilon\,,\,1-\epsilon]\;$ :
$$\begin{align*}\text{Res}_{z=-1}(f)&=\lim_{z\to -1}(z+1)f(z)=\lim_{z\to -1}\frac{z+1}{\sqrt{1-z^2}(z^2+1)}=&0\\{}\\ \text{Res}_{z=1}(f)&=\lim_{z\to 1}(z-1)f(z)=\lim_{z\to1}\frac{z-1}{\sqrt{1-z^2}(z^2+1)}=&0\\{}\\ \text{Res}_{z=i}(f)&=\lim_{z\to i}(z-i)f(z)=\lim_{z\to i}\frac1{\sqrt{1-z^2}(z+i)}=\frac1{\sqrt2(2i)}=&-\frac i{2\sqrt2}\\{}\\ \end{align*}$$
Thus, by the Residue theorem and by the corollary to the lemma in the first answer here , we get that
$$\int\limits_{-1}^1f(x)\,dx=\lim_{\epsilon\to 0}\left(\int\limits_{BS^1}f(z)dz+\int\limits_{-1+\epsilon}^{1+\epsilon}f(x)dx\right)=2\pi i\left(0-\frac i{2\sqrt2}\right)=\frac\pi{\sqrt2}$$
But, unless explicitly required to use directly the contour method, I'd rather go with Ron's answer.