I learned the following from Hunter's Applied Analysis. Denote the Schwartz space ${\mathcal S}({\mathbb R}^n):=\{\varphi\in C^{\infty}({\mathbb R}^n):\sup_{x\in{\mathbb R}^n}|x^{\alpha}\partial^{\beta}\varphi(x)|<\infty\quad\text{for every}\quad\alpha,\beta\in{\mathbb Z}_+^n\}.$ If $\varphi\in{\mathcal S}({\mathbb R}^n)$, then the Fourier transform $\hat{\varphi}:{\mathbb R}^n\to{\mathbb C}$ is the function defined by $\hat{\varphi}(\xi):=\frac{1}{(2\pi)^{n/2}}\int_{{\mathbb R}^n}\varphi(x)e^{-i\xi\cdot x}dx,\quad \xi\in{\mathbb R}^n.$
Suppose that $f,\varphi\in{\mathcal S}$. Then we have $\begin{align}\int\hat{f}(\xi)\varphi(\xi)d\xi&=\int\frac{1}{(2\pi)^{n/2}}\bigg(\int f(x)e^{-i\xi\cdot x}dx\bigg)\varphi(\xi)d\xi\\ &=\int f(x)\frac{1}{(2\pi)^{n/2}}\bigg(\int\varphi(\xi)e^{-i\xi\cdot x }d\xi\bigg)dx\\ &=\int f(x)\hat{\varphi}(x)dx. \end{align}$ This is the motivation of the definition of the Fourier transform of tempered distributions.
Here is my question:
How can I get the second equality by Fubini's theorem?
The form I know about the theorem is $\int_{A}\bigg(\int_B f(x,y)dy\bigg)dx =\int_{B}\bigg(\int_A f(x,y)dx\bigg)dy =\int_{A\times B}f(x,y)d(x,y)$ But I am wondering what is $f(x,y)$ in the case above.