TITLE: A double integration via Fubini theorem
QUESTION [5 upvotes]: $$\int_0^1\int_0^\infty ye^{-xy}\sin x\,dx\,dy$$
How can I calculate out the value of this integral?
P.S. One easy way is to calculate this integral over $dy$ first, to get an integral form $\frac{1-e^{-x}(x+1)}{x^2}\sin x$, if I calculated correctly, but I don't know any way to calculate out this value other than a hard work with contour integral.  - so I wonder if there be a way other than this (=integrate over $dy$ and do contour integral)
(I tried some integration by parts and substitutions but it seems it does not work well, probably the $\infty$ at the second integral is crucial. I think this requires capturing a term in the integrand and converting to a further integral, and reverting the order of integral by Fubini's theorem.. but I'm not sure)

REPLY [4 votes]: You do not need to apply Fubini’s theorem, indeed
$\begin{align}\int_0^1\!\!\!\int_0^\infty&\!\!ye^{-xy}\sin x\,dxdy=\!\int_0^1\!\left[-\dfrac{ye^{-xy}(\cos x+y\sin x)}{y^2+1}\right]_0^\infty\!\!dy=\\
&=\int_0^1\dfrac y{y^2+1}dy=\left[\dfrac12\ln\left(y^2+1\right)\right]_0^1=\dfrac12\ln2\;.
\end{align}$

REPLY [4 votes]: HINT
According to the integration by parts method, we get that
\begin{align*}
\int e^{-xy}\sin(x)\mathrm{d}x = -e^{-xy}\cos(x) - \int ye^{-xy}\cos(x)\mathrm{d}x
\end{align*}
Applying the same method once again, we obtain that
\begin{align*}
\int ye^{-xy}\cos(x)\mathrm{d}x = ye^{-xy}\sin(x) + \int y^{2}e^{-xy}\sin(x)\mathrm{d}x
\end{align*}
Replacing the second expression into the first, it results that
\begin{align*}
\int e^{-xy}\sin(x)\mathrm{d}x = -e^{-xy}\cos(x) - ye^{-xy}\sin(x) - y^{2}\int e^{-xy}\sin(x)\mathrm{d}x
\end{align*}
which finally yields that
\begin{align*}
\int ye^{-xy}\sin(x)\mathrm{d}x = -e^{-xy}(\cos(x) + y\sin(x))\times\left(\frac{y}{1 + y^{2}}\right)
\end{align*}
Then you can apply the integration limits.
Can you take it from here?