Consider the contour integral
\[
J=\int_C \frac{(z^2-1)^{1/2}}{1+z^2}\,dz
\]
with the contour \(C\) shown in Fig. 1. By calculating the various contributions to \(J\) and
using the residue theorem, show that
\[
I:=\int_{-1}^{1}\frac{(1-x^2)^{1/2}}{1+x^2}\,dx=\pi(\sqrt{2}-1).
\]
The branch of the multivalued function \((z^2-1)^{1/2}\) should be fixed by choosing polar
coordinates \(z=1+\rho_1e^{i\phi_1}\) and \(z=-1+\rho_2e^{i\phi_2}\) with
\(0\le\phi_1,\phi_2\le2\pi\).
> **Diagram:** See the accessible exam PDF linked above.
Figure 1: Contour \(C\) of question B.2