Just having a bit of difficulty with a Contour Integration question, it is as below:
Show that $$ \int_0^{\pi}\frac{1}{a^2+\sin^2{\theta}}\,\mathrm{d}\theta = \frac{\pi}{a\sqrt{1 + a^2}}. \quad (a > 1 )$$
While I imagine this could be tackled in more ways than one, any help in the context of contour integration would be greatly appreciated!
My attempt at a solution:
Make the change of variable: $z = \mathrm{e}^{i\theta}$, then $\sin{\theta} = \dfrac{z - z^{-1}}{2}$ and $\mathrm{d}\theta = \dfrac{\mathrm{d}z}{iz}$ give that
$$ \oint_C\frac{1}{a^2+\left(\frac{z - z^{-1}}{2}\right)^2}\frac{\mathrm{d}z}{iz},$$ where $C$ is a unit semi-circle with base aligned with the real axis.
Finding the roots of the denominator, thus finding the poles of the integrand, gives:
$$z^2 = -2a^2 \pm 2a\sqrt{a^2 - 1} + 1.$$
From here, I have no idea how to proceed. I know I might find the residuals internal to the contour, however, I'm not really sure how to go about that. Also, I'm concerned that there seems to be poles on the contour itself.
Any advice? Thanks in advance!
You need the whole unit circle $\;C\;$, yet you only have an integral from zero to $\;\pi\;$ , so we can do as follows:
$$z=e^{2i\theta}\implies dz=2izd\theta\implies d\theta=\frac{dz}{2iz},\,\,\text{and}\;\;\sin^2\theta=\frac{1-\cos2\theta}2$$
$$\int_0^\pi\frac{d\theta}{a^2+\frac{1-\cos2\theta}2}=\oint_C\frac{dz}{2iz}\cdot\frac1{a^2+\frac12-\frac12\frac{z+z^{-1}}2}=-i\oint_C\frac{dz}{2a^2z+z-\frac12\left(z^2+1\right)}=$$
$$=-i\oint_C\frac{dz}{-\frac12z^2+(2a^2+1)z-\frac12}=2i\oint_C\frac{dz}{z^2-(4a^2+2)z+1}$$
The quadratic's discriminant is $\;2\sqrt{(2a^2+1)+1}=4a\sqrt{a^2+1}\;$ , thus its roots are
$$z_{1,2}=\frac{(4a^2+2)\pm4a\sqrt{a^2+1}}2=(2a^2+1)\pm2a\sqrt{a^2+1}$$
but only the root with minus sign is within the unit circle (why?), and the function's residue there is:
$$Res_{z=(2a^2+1)-2a\sqrt{a^2+1}}(f)=\lim_{z\to\left[(2a^2+1)-2a\sqrt{a^2+1}\right]}\left(z-\left[(2a^2+1)-2a\sqrt{a^2+1}\right]\right)f(z)=$$
$$=\lim_{z\to(2a^2+1)-2a\sqrt{a^2+1}}\;\;\frac1{z-\left(2a^2+1+2a\sqrt{a^2+1}\right)}=\frac1{-4a\sqrt{a^2+1}}$$
and thus our integral equals:
$$\require{cancel}\cancel2i\cdot\cancel2\pi i\frac1{-\cancel4a\sqrt{a^2+1}}=\frac\pi{a\sqrt{a^2+1}}$$