Q5 Use contour integration to evaluate $$\int_{-1}^{1}\frac{\sqrt[]{1-x^2}}{x^2 + 1}dx$$
I've been trying to use a similar method to the one given in https://en.wikipedia.org/wiki/Contour_integration#Example_6_–_logarithms_and_the_residue_at_infinity but with a branch cut on [-1,1]. However I don't really understand what to do.
The integral around the classical "dogbone" contour implicates the residues from the poles at $z=i$ and $z=-i$ along with the residue at $\infty$.
First, we cut the plane with branch cuts that begin at $z=\pm 1$ and extend to the point at $\infty$ along the negative real axis. We write $\sqrt{1-z^2}=-i\sqrt{z+1}\sqrt{z-1}$ and select the branches of the square roots such that if we approach the line segment $[-1,1]$ from the upper half plane, then $\arg(\sqrt{1-z^2})=0$. Proceeding, we select
$$-\pi<\arg(z+1)\le \pi \tag 1$$
and
$$-\pi<\arg(z-1)\le \pi \tag 2$$
Note that given $(1)$ and $(2)$, we see that as we approach $[-1,1]$ from the lower half plane, then $\arg(\sqrt{1-z^2})=-\pi$.
Let $C$ be the classical dogbone contour comprised of the $(i)$ line segment from $-1+$ to $1$ approaching from the upper half plane, $(ii)$ line segment from $1+$ to $-1$ approaching from the lower half plane, $(iii)$ a circle of radius $\epsilon$ and center $-1$, and $(iv)$ a circle of radius $\epsilon$ and center $1$. In the limit as $\epsilon\to 0$, the contributions to the value of the integral from integrating over $(iii)$ and $(iv)$ vanish. Hence, we have
$$\begin{align} \lim_{\epsilon\to 0^+}\oint_C \frac{\sqrt{1-z^2}}{z^2+1}\,dx&=\int_{-1}^1 \frac{\sqrt{1-x^2}}{1+x^2}\,dx+\int_1^{-1}\frac{-\sqrt{1-x^2}}{1+x^2}\,dx\\\\ &=2\int_{-1}^1 \frac{\sqrt{1-x^2}}{1+x^2}\,dx\tag 3 \end{align}$$
In addition, we have
$$\begin{align}\lim_{\epsilon\to 0^+}\oint_C \frac{\sqrt{1-z^2}}{z^2+1}\,dx&=2\pi i\text{Res}\left(\frac{\sqrt{1-z^2}}{1+z^2}, z=\pm i,\infty\right) \\\\ &=2\pi i\left(\frac{\sqrt 2}{2i}+\frac{-\sqrt 2}{-2i}+i\right)\\\\ &=\pi (2\sqrt 2-2)\tag 4 \end{align}$$
Equating $(3)$ and $(4)$ and solving for the integral of interest yields
$$\int_{-1}^1 \frac{\sqrt{1-x^2}}{1+x^2}\,dx=(\sqrt 2-1)\pi$$
One way to proceed that offers a more straightforward approach is to invoke Cauchy's Integral Theorem to write
$$\begin{align} \oint_{C_{\text{Dogbone}}}\frac{\sqrt{1-z^2}}{1+z^2}\,dz&=2\int_{-1}^1 \frac{\sqrt{1-x^2}}{1+x^2}\,dx\\\\ &=\underbrace{\lim_{R\to \infty}\int_{2\pi}^0\frac{-i\sqrt{R^2e^{i2\phi}-1}}{1+R^2e^{i2\phi}}\,iRe^{i\phi}\,d\phi}_{\text{Contribution from the Residue at Infinity}}\\\\& +2\pi i \text{Res}\left(\frac{\sqrt{1-z^2}}{1+z^2}, z=i\right)\\\\ &+2\pi i \text{Res}\left(\frac{\sqrt{1-z^2}}{1+z^2},z=-i\right)\\\\ &=-2\pi+\pi \sqrt{2}+\pi\sqrt 2 \end{align}$$
Hence, we obtain the coveted result
$$\int_{-1}^1 \frac{\sqrt{1-x^2}}{1+x^2}\,dx=(\sqrt 2-1)\pi$$