Fourier, Circles, Gaussians - A Proof of the Gaussian Integral via Fourier Analysis

I've always been a little bit scared by Fourier analysis on the real line. Finite abelian groups--easy. Everything's dealing with finite expectations and sums, normalizing by counts, etc... But then you extend to the continuous setting, and all hell breaks loose. What in the world does
$$\delta(x)=\frac{1}{2\pi}\int_{-\infty}^{\infty}dy\exp\lbrb{-ixy}$$
mean??

In particular, why is there this $2\pi$ factor?

This turns out to be the right definition of a $\delta$ "function" so that for (well behaved) $f$, we have
$$\int dx f(x)\delta(x)=f(0)$$
(Where function is in quotes because $\delta$ isn't really a function and you really need the theory of distributions to formalize all this. But for our sake, we'll stick to fake math.)

One can derive this $\delta$ by using Gaussian integration and real math. In this article, we're going to derive this $\delta$ function, the real Fourier transform, and finally, Gaussian integration (in that order) via fake math.

Fourier Analysis on the integers

As any good fake analysis begins, we consider a discretization of our space. Now, we're concerned with functions on the integers rather than the real numbers. That is, we'd like to find an alternative basis for the space of all nice functions $f:\bZ\rightarrow \bC$ (niceness here, similar to in the real setting, will mean that the function doesn't "stay too large at infinity").
This makes things a lot nicer, intuitively, because the integers can't "detect" the difference between multiples of $2\pi$ (i.e. different trips around the circle). That is, consider the functions $\chi_y(x)=\exp\lbrb{ixy}$ and $\chi_{y+2\pi}(x)=\exp\lbrb{ix(y+2\pi)}$. When $x$ is an integer, $\chi_{y+2\pi}(x)=\exp\lbrb{ixy}\exp\lbrb{ix2\pi}=\exp\lbrb{ixy}=\chi_y(x)$.
Therefore, are Fourier characters are the functions $\chi_y(x)$ where $y\in[0,2\pi)$. Endowing the integers with the "Lebesgue" measure, and the circle with the uniform measure, we have the following definitions of the Fourier transform and its inverse:
$$\hat{f}(y)=\sum_{x\in\bZ}dxf(x)\exp\lbrb{ixy}=\sum_{x\in\bZ}f(x)\exp\lbrb{ixy}$$
$$\check{\xi}(x)=\frac{1}{2\pi}\int_{-\pi}^{\pi}dy\xi(y)\exp\lbrb{-ixy}$$
One can then verify that these are indeed inverses of each other.

The $\delta$ function also becomes much simpler to see.
$$\delta(x)=\frac{1}{2\pi}\int_{-\pi}^{\pi}dy\exp\lbrb{-ixy}$$
Why is this the case? One explanation is that the $\delta$ function is just the inverse fourier transform of the constant function.

We can also check this explicitly. We'd like $\delta$ to satisfy the property that for every $f:\bZ\rightarrow\bR$, we have that $\langle f,\delta \rangle := \sum_{x\in\bZ} f(x)\delta(x)=f(1)$. Since we're now dealing with a discrete domain, this is equivalent to saying that
$$\delta(x)=\begin{cases}
1 & x=0 \\
0 & x\neq 0
\end{cases}$$
Which is indeed the case.
$$\delta(0)=\frac{1}{2\pi}\int_{-\pi}^{\pi}dy\exp\lbrb{-i0y} = \frac{1}{2\pi}\int_{-\pi}^{\pi}dy = 1$$
$$\delta(a)=\frac{1}{2\pi}\int_{-\pi}^{\pi}dy\exp\lbrb{-iay} = \frac{1}{2\pi a}\int_{-a\pi}^{a\pi}dz\exp\lbrb{-iz} =0$$
Where the last equality holds because $a$ is a non-zero integer, so we're just integrating around the circle some number of times.

And now, we immediately see where the $2\pi$ comes from--it's the circumference of the circle!

The next step in any good fake analysis is to partition the discretization; i.e. to make it more fine. That is, we'll now be concerned with functions on $\frac{1}{2}\bZ=\lbrb{\dots,-\frac{3}{2},-1,-\frac{1}{2},0, \frac{1}{2},1, \frac{3}{2},\dots}$.

Now, the Fourier transform becomes:
$$\hat{f}(y)=\sum_{x\in \frac{1}{2}\bZ}dxf(x)\exp\lbrb{ixy}=\frac{1}{2}\sum_{x\in \frac{1}{2}\bZ}f(x)\exp\lbrb{ixy}$$
where $y$ now ranges over $[-2\pi, 2\pi)$.
And the inverse becomes:
$$\check{\xi}(x)=\frac{1}{2\pi}\int_{-2\pi}^{2\pi}dy\xi(y)\exp\lbrb{-ixy}$$
Once again, we take
$$\delta(x):=\check{\mathbb{1}}(x)=\frac{1}{2\pi}\int_{-2\pi}^{2\pi}dy\exp\lbrb{-ixy}$$
One can now observe that, as we take our discretization to be more and more fine, our Fourier transforms and delta functions converge to those on the real line!
$$\hat{f}(y)=\lim_{n\rightarrow\infty}\sum_{x\in \frac{1}{n}\bZ} \frac{1}{n}f(x)\exp\lbrb{ixy}=\int_{-\infty}^{\infty}dxf(x)\exp\lbrb{ixy}$$
$$\check{\xi}(x)=\lim_{n\rightarrow\infty}\frac{1}{2\pi}\int_{-n\pi}^{n\pi}dy\xi(y)\exp\lbrb{-ixy}=\frac{1}{2\pi}\int_{-\infty}^{\infty}dy\xi(y)\exp\lbrb{-ixy}$$

$$\delta(x):=\check{\mathbb{1}}(x)=\frac{1}{2\pi}\int_{-\infty}^{\infty}dy\exp\lbrb{-ixy}$$

Deriving the Gaussian integral via Fourier analysis

As promised, we will proceed to conclude the most convoluted (and non-rigorous) derivation of the Gaussian integral known to man.

Let $\phi(x):=\exp\lbrb{-\frac{x^2}{2}}$. Let $m:=\int dx\exp\lbrb{-\frac{x^2}{2}}$
$$\begin{align*}
\langle\phi,\phi\rangle = \int dx \exp\lbrb{-x^2}
\end{align*}$$
$$\begin{align*}
\langle\hat{\phi},\hat{\phi}\rangle
&=\frac{1}{2\pi} \int dy \lprp{\int dx_1\phi(x)\exp\lbrb{ix_1y}}\lprp{\int dx_2\phi(x)\exp\lbrb{ix_2y}}\\
&= \frac{1}{2\pi} \int dy \lprp{\int dx\exp\lbrb{ixy- \frac{x^2}{2}}}^2\\
&= \frac{1}{2\pi} \int dy \lprp{\int dx\exp\lbrb{-\frac{1}{2}\lprp{x-iy}^2-\frac{y^2}{2}}}^2\\
&= \frac{1}{2\pi} \int dy\exp\lbrb{-y^2} \lprp{\int dx\exp\lbrb{-\frac{1}{2}\lprp{x-iy}^2}}^2\\
&= \frac{1}{2\pi} \int dy\exp\lbrb{-y^2} \lprp{\int dx\exp\lbrb{-\frac{1}{2}x^2}}^2\\
&= \frac{m^2}{2\pi} \int dy\exp\lbrb{-y^2}
\end{align*}$$
(The $\frac{1}{2\pi}$ for the inner product comes from the measure we had endowed on our space)
Applying Plancherel, we conclude that
$$\int dx\exp\lbrb{-\frac{x^2}{2}}=m=\sqrt{2\pi}$$

Other stuff