TITLE: Is $\int_0^\infty \left (\int_0^\infty f(k) k \sin kr \, \mathrm dk \right) \mathrm dr = \int_0^\infty f(k) \, \mathrm dk$ correct?
QUESTION [12 upvotes]: I am a physicist, and as a physicist I have proved the following equality:
$$
\int_0^\infty \left (\int_0^\infty f(k) k \sin kr \,dk \right) dr = \int_0^\infty f(k) dk,
$$
where $f$ is a rapidly decaying function or even a Schwartz function. The method is the following: by interchanging the order of integration one obtains:
\begin{align*}
&\int_0^\infty \left (\int_0^\infty f(k) k \sin kr \,dk \right) dr = -\int_0^\infty f(k)\left (\int_0^\infty \partial_r\cos kr\, dr \right) dk = \\
& -\int_0^\infty f(k)\Big |\cos kr \Big |_{r=0}^{r=\infty} dk = \int_0^\infty f(k)\, dk - \lim_{r\to \infty} 
\int_0^\infty f(k)\cos kr \,dk.
\end{align*}
The limit is null due to a simple generalization of the Riemann-Lebesgue lemma. However I am not sure that the conditions for the Fubini theorem are satisfied and that interchanging the order of integration is allowed. 
Can somebody suggest me how the above result can be rigorously proved or disproved?
* EDIT
After an interaction with Patrick Da Silva I had this idea: set
$$
\int_0^\infty \left (\int_0^\infty f(k) k \sin kr \,dk \right) dr =\lim_{R \to \infty} \int_0^R \left (\int_0^\infty f(k) k \sin kr \,dk \right) dr.
$$
Now the integral with $R$ satisfies the conditions for Fubini, and the calculation proceeds as above. Is it correct?

REPLY [3 votes]: The Fourier transform of a Schwartz functions is a Schwartz function. 
The key is that the inner integral in the LHS is the derivative of the Fourier transform of $f$ evaluated at $r$, up to a minus sign. Hence the LHS is $-(\lim_{r\to \infty}\widehat f(r)-\widehat f(0))$, and the fast decay of the Fourier transform gives that this is equal to $\widehat f(0)$.
Notice that we assumed WLOG that the support of $f$ is contained in $[0,+\infty)$.