# How to evaluate double integral with sines and exponentials

As part of showing that $\displaystyle f(x,y) = \frac{1+\sin x \sin y}{2 \pi} e^{-\left( \frac{x^{2}+y^{2}}{2}\right)}$ is a probability density function, I need to show that $\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x,y) dy dx = 1$.

Normally, when I see integrals like this, I convert to polar coordinates, so I have that $$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x,y) dy dx = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}\frac{1+\sin x \sin y}{2 \pi} e^{-\left( \frac{x^{2}+y^{2}}{2}\right)} dydx \\ = \int_{0}^{2\pi} \int_{0}^{\infty}\frac{1+\sin(r\cos \theta)\sin(r \sin(\theta))}{2\pi} e^{-\left( \frac{r^{2}}{2}\right)}rdr d \theta \\= \int_{0}^{2\pi} \int_{0}^{\infty}\frac{1}{2 \pi} e^{-\left( \frac{r^{2}}{2}\right)}rdr d \theta + \int_{0}^{2\pi} \int_{0}^{\infty}\frac{\sin(r\cos \theta)\sin(r \sin(\theta))}{2\pi}e^{-\left( \frac{r^{2}}{2}\right)}rdr d \theta$$

Now, after this last equals sign, the first integral is easy, but I have absolutely no idea how to do the second integral.

Is this even the correct way to show that the integral of $f(x,y) = 1$, or is there an easier way? I'm extremely stuck and need help! Thank you!

## 2 Answers

You can write the integral (leaving $2\pi$ aside) as $$\int_{{\Bbb R}^2}e^{-\frac{x^2+y^2}{2}}\,dxdy+\int_{{\Bbb R}^2}\sin x\, e^{-\frac{x^2}{2}}\cdot \sin y\,e^{-\frac{y^2}{2}}\,dxdy.$$ Now the second integral reduces to iterated integration $$\int_{\Bbb R}\int_{\Bbb R}\sin x\, e^{-\frac{x^2}{2}}\cdot \sin y\,e^{-\frac{y^2}{2}}\,dxdy=\int_{\Bbb R}\sin y\, e^{-\frac{y^2}{2}}\Bigg(\underbrace{\int_{\Bbb R}\sin x\,e^{-\frac{x^2}{2}}\,dx}_{=I}\Bigg)\,dy=I\cdot \underbrace{\int_{\Bbb R}\sin y\, e^{-\frac{y^2}{2}}\,dy}_{=I}=I^2.$$ The integrand of $I$ is an odd function, so $I=0$.

• I would like to be able to accept this, but I don't understand the justification behind $\sin x \sin y\, e^{-\left( - \frac{x^{2}+y^{2}}{2}\right)}= \sin x \,e^{-\frac{x^{2}}{2}} \cdot \sin y\, e^{-\frac{y^{2}}{2}}$. – ALannister Nov 9 '17 at 23:10
• Also, do we need any conditions in order to be able to write the double integral as an iterated integral? – ALannister Nov 9 '17 at 23:13
• @DaenerysDracarys Just use $e^{a+b}=e^a\cdot e^b$ to split $$e^{-\frac{x^2+y^2}{2}}=e^{-\frac{x^2}{2}-\frac{y^2}{2}}=e^{-\frac{x^2}{2}}\cdot e^{-\frac{y^2}{2}}.$$ The integral converges absolutely, it is no problem for iterated integration (Fubini) – A.Γ. Nov 9 '17 at 23:18
• @DaenerysDracarys That's right. – A.Γ. Nov 9 '17 at 23:35

The value of the first double integral is one. Now we claim that the second double integral is zero, simply split the outer integral to $\displaystyle\int_{0}^{\pi}+\int_{\pi}^{2\pi}$ and a change of variable $\theta=\theta'-\pi$ will lead to $\displaystyle\int_{\pi}^{2\pi}=\int_{0}^{\pi}$ with the same integrand, so they double: \begin{align*} \displaystyle\int_{0}^{2\pi}\sin(r\cos\theta)\sin(r\sin\theta)d\theta&=2\int_{0}^{\pi}\sin(r\cos\theta)\sin(r\sin\theta)d\theta, \end{align*} now split again to \begin{align*} \int_{0}^{\pi/2}\sin(r\cos\theta)\sin(r\sin\theta)d\theta+\int_{\pi/2}^{\pi}\sin(r\cos\theta)\sin(r\sin\theta)d\theta \end{align*} for \begin{align*} \int_{\pi/2}^{\pi}\sin(r\cos\theta)\sin(r\sin\theta)d\theta \end{align*} use $\theta'=\theta-\pi/2$, then \begin{align*} \int_{\pi/2}^{\pi}\sin(r\cos\theta)\sin(r\sin\theta)d\theta=-\int_{0}^{\pi/2}\sin(r\cos\theta)\sin(r\sin\theta)d\theta. \end{align*}

• this is incredibly clever. Thank you! – ALannister Nov 9 '17 at 22:48
• except for one thing: $\cos(\theta^{\prime} - \pi) = \cos \theta^{\prime} \cos \pi + \sin \theta^{\prime} \sin \pi = - \cos \theta^{\prime}$ and $\sin (\theta^{\prime} - \pi) = \sin \theta^{\prime} \cos \pi - \cos \theta^{\prime} \sin \pi = - \sin \theta^{\prime}$, so they don't cancel each other. Could you have meant a different change of variable, perhaps? – ALannister Nov 9 '17 at 22:54
• Sorry for the messed up, now please check, I think it works. – user284331 Nov 9 '17 at 23:15
• @DaenerysDracarys, I have checked several times that $\sin(\theta'+\pi/2)=\cos\theta'$ and $\cos(\theta'+\pi/2)=-\sin\theta'$, so now this times it should be no problem. – user284331 Nov 9 '17 at 23:49