Evaluate $\int_{-1}^1\sqrt{1-x^2}dx=\pi/2$ by using complex integration Can I evaluate $\int_{-1}^1\sqrt{1-x^2}dx=\pi/2$ by using complex integration? Using the dog bone contour it seems perfectly possible. But the function has no residue... Isn't the integral around the closed contour equal to zero?
(The dog bone contour is in red below)

 A: Since the integrand, $f(z)=\sqrt{1-z^2}$, is not analytic inside the dog bone contour, $C_{DB}=M+\gamma_2+N+\gamma_1$, Cauchy's integral theorem does not apply.  However, inasmuch outside of $C_{DB}$ , $\sqrt{1-z^2}$ is indeed analytic,  then we can assert that for any $R>1$
$$\begin{align}
\oint_{C_{DB}} \sqrt{1-z^2}\,dz&=-\oint_{|z|=R}\sqrt{1-z^2}\,dz\tag1
\end{align}$$
where the negative sign that multiplies the integral on the right-hand side of $(1)$ is a consequence of the orientation.

NOTE:
To ensure that $\sqrt{1-x^2}\ge 0$ on $[-1,1]$ on the upper part of the branch cut, we have $\sqrt{1-z^2}=-i\sqrt{z^2-1}$.  We use this relationship in the ensuing analysis.

We can proceed by writing
$$\begin{align}
-\oint_{|z|=R}\sqrt{1-z^2}\,dz&=-\int_0^{2\pi}\sqrt{1-R^2e^{i2\phi}}\,iRe^{i\phi}\,d\phi\\\\
&=-R\int_0^{2\pi}e^{i\phi}\sqrt{R^2e^{i2\phi}-1}\,d\phi\\\\
&=-R^2\int_0^{2\pi}e^{i2\phi}\left(1-\frac{1}{R^2e^{i2\phi}}\right)^{1/2}\,d\phi\\\\
&=-R^2 \int_0^{2\pi}e^{i2\phi} \sum_{n=0}^\infty \binom{1/2}{n}(-R^2e^{i2\phi})^{-n}\,d\phi\tag2\\\\
&=\pi\tag3
\end{align}$$
where in going from $(2)$ to $(3)$ we exploited the uniform convergence of the series in $(2)$ to integrate term by term and used the fact that $\int_0^{2\pi}e^{im\phi}\,d\phi=2\pi \delta_{m0}$.
Putting together $(1)$ and $(2)$ we find that
$$\oint_{C_{DB}}\sqrt{1-z^2}\,dz=\pi\tag4$$
In addition, letting the radii, $\varepsilon$, of $\gamma_2$ and $\gamma_2$ approach $0$, we find that
$$\lim_{\varepsilon\to 0}\oint_{C_{DB}}\sqrt{1-z^2}\,dz=2\int_{-1}^1 \sqrt{1-x^2}\,dx\tag5$$
Finally, putting together $(1)$, $(3)$, and $(5)$ yields the coveted result
$$\int_{-1}^1\sqrt{1-x^2}\,dx=\frac\pi 2$$
as was to be shown using contour integration!


NOTE:
The methodology used herein is tantamount to using the "Residue at Infinity."
The residue at infinity is given by
$$\begin{align}
\text{Res}\left(\sqrt{1-z^2}, z=\infty\right)&=i\text{Res}\left(\frac1{z^2}\sqrt{\frac1{z^2}-1}, z=0\right)\\\\
&=i\text{Res}\left(\frac1{z^3}\sqrt{1-z^2}, z=0\right)\\\\
&=-i/2
\end{align}$$
from which we find
$$\oint_{C_{DB}}\sqrt{1-z^2}\,dz=\pi$$
A: You can Cauchy's theorem to show that the integral over the dog bone contour is equal to the integral over the outer circle, and you can use the definition of the former integral to get that the integral over the dog bone contour is twice the integral in question. But this doesn't really help you evaluate the integral. The basic issue is that the functions in question don't have poles anywhere, so the residue theorem can't be used to give a numerical answer.
