Fourier switching in $L^2(R)/S(R)$ in the integral If $f \in L^2(\mathbb{R}), g \in S(\mathbb{R})$, (where $S(\mathbb{R})$ is the Schwartz space) then how can I show that, integrating over $\mathbb{R}$:
$$
     \int \hat{f}(\xi) \, g(\xi) \, d\xi = \int f(\xi) \, \hat{g}(\xi) \, d\xi
$$
I thought about using the fact that the Schwartz space $S(\mathbb{R})$ is dense in $L^2(\mathbb{R})$, and somehow extend that, but I am not sure.
 A: Seems to me like it is simply Fubini's theorem. We see that $$\int_{\mathbb R} \hat f(\xi) g(\xi) d\xi = \int_{\mathbb R} \left(\int_{\mathbb R} f(x) e^{-i\xi x} dx \right) g(\xi) d\xi = \int_{\mathbb R} \int_{\mathbb R} f(x) g(\xi) e^{-i\xi x} dx d\xi.$$ If $f,g \in S(\mathbb R)$, then $f(x)g(\xi)e^{-i\xi x}$ is absolutely integrable on $\mathbb R \times \mathbb R$, so we can change the order of integration to see that $$\int_{\mathbb R} \hat f(\xi) g(\xi)d\xi = \int_{\mathbb R} \int_{\mathbb R} f(x) g(\xi) e^{-i\xi x} d\xi dx = \int_{\mathbb R} f(x) \left(\int_{\mathbb R} g(\xi) e^{-i\xi x} d\xi \right) dx = \int_{\mathbb R} f(x) \hat g(x) dx.$$ Now if $f \in L^2(\mathbb R)$, take $f_n \in S(\mathbb R)$ such that $f_n \to f$ in $L^2(\mathbb R)$. Then $$\int_{\mathbb R} f(x) \hat g(x) dx = \lim_{n\to \infty} \int_{\mathbb R} f_n(x) \hat g(x) dx = \lim_{n\to \infty} \int_{\mathbb R} \hat f_n(\xi) g(\xi) d\xi = \int_{\mathbb R} \hat f(\xi) g(\xi) d\xi.$$ The last equality follows since the Fourier transform is an $L^2$-isometry so $f_n \to f$ in $L^2(\mathbb R)$ also gives $\hat f_n \to \hat f$ in $L^2(\mathbb R)$.
