<s>[INST] Prove that $\int_0^{\infty}\int_0^{\infty}e^{-(x^2 + 2xy\cos(\alpha)+y^2)}\mathrm dx\mathrm dy=\frac{\alpha}{2\sin(\alpha)}$ I'm having difficulty with a question. It says

By putting $x=r\cos(\theta), y=r\sin(\theta)$, prove that $$\int_0^{\infty}\int_0^{\infty}e^{-(x^2 + 2xy\cos(\alpha)+y^2)}\mathrm dx\mathrm dy=\frac{\alpha}{2\sin(\alpha)}$$

Making the substitution we get \begin{align*}&\int_0^{\pi/2}\int_0^{\infty}re^{-r^2 (\sin(2\theta) \cos(\alpha) + 1)}dr\ d\theta \\ \\
=&\int_0^{\pi/2} \frac{1}{2(\sin(2\theta) \cos(\alpha) + 1)} d\theta\\ \\
=&\frac{\alpha}{2\sin(\alpha)} \int_0^{\pi/2} \frac{\sin(\alpha)}{2 \alpha \cos(\alpha) \sin(\theta) \cos(\theta) + \alpha} d\theta\\ \\
=&\frac{\alpha}{2\sin(\alpha)} \int_0^{\pi/2}\frac{\tan(\alpha) \sec^2(\theta)}{2 \alpha \tan(\theta) + \alpha \sec(\alpha) \sec^2(\theta)} d\theta
\end{align*}
setting $u=\tan(\theta),\ du=\sec^2(\theta)\ d\theta$
$$=\frac{\alpha}{2\sin(\alpha)}\int_0^{\infty}\frac{\tan(\alpha)\ du}{\alpha \sec(\alpha) + 2\alpha u+ \alpha \sec(\alpha) u^2}$$
Now \begin{align*}u&=\frac{\cos(\alpha)\{-2\alpha\pm\sqrt{4\alpha ^2 - 4\alpha ^2\sec^2(\alpha)}\}}{2\alpha}\\ \\
&=-\cos(\alpha) \mp i\sin(\alpha)\\
&=-e^{\pm i\alpha}
\end{align*}
So substituting in
\begin{align*}
=&\frac{\alpha}{2\sin(\alpha)}\int_0^{\infty}\frac{\tan(\alpha)\ du}{(u-e^{i\alpha})(u-e^{- i\alpha})}\\ \\
=&\frac{\alpha}{2\sin(\alpha)}\left[ \frac{\tan(\alpha)\{\log(1-ue^{i\alpha}) - \log(-u+e^{i\alpha})\}}{-1+e^{2i\alpha}} \right]^{\infty}_{u\, =\, 0}
\end{align*}
which I then can't evaluate (and certainly isn't $1$). Any help?
 [/INST] \begin{align}
 \frac{1}{1+\sin{(2\, \theta)}\, \cos{\alpha}} &=\frac{1}{1+2\sin{\theta}\cos{\theta}\, \cos{\alpha}}\\
&= \frac{\sec{(\theta)}^2}{\sec{(\theta)}^2+2\tan{\theta}\, \cos{\alpha}}\\
&= \frac{\sec{(\theta)}^2}{1+\tan{(\theta)}^2+2\tan{\theta}\, \cos{\alpha}}\\
&= \frac{\sec{(\theta)}^2}{\sin{(\alpha)}^2+\cos{(\alpha)}^2+\tan{(\theta)}^2+2\tan{\theta}\, \cos{\alpha}}\\
&= \frac{\sec{(\theta)}^2}{\sin{(\alpha)}^2+\left(\cos{(\alpha)}+\tan{(\theta)}\right)^2}\\
\end{align}
\begin{align}
\therefore  \int \frac{1}{1+\sin{(2\, \theta)}\, \cos{\alpha}} d\theta &= \int \frac{\sec{(\theta)}^2}{\sin{(\alpha)}^2+\left(\cos{(\alpha)}+\tan{(\theta)}\right)^2}\, d\theta\\
&= \frac{1}{\sin{\alpha}}\, \arctan{\frac{\tan{\theta}+\cos{\alpha}}{\sin{\alpha}}}+C
\end{align}
Thus, the required integral is 
\begin{align}
\frac{1}{2} \int_0^{\pi/2} \frac{1}{1+\sin{(2\, \theta)}\, \cos{\alpha}} d\theta &= \frac{\alpha}{2\, \sin{\alpha}}
\end{align}
</s>