TITLE: Computing the Gaussian integral with step functions
QUESTION [9 upvotes]: Say, we are interested in deriving
$$\int_{-\infty}^{\infty}e^{-x^2}=\sqrt{\pi}\tag{1}$$
There are many well known ways to do it, for example:

by polar coordinates
via the gamma function, etc.

After coming across this limit
$$\lim\limits_{n\to\infty} \frac{\sqrt{\pi n}}{2^{2n}}  \binom {2n} {n+\lfloor x\sqrt{n} \rfloor} = e^{-x^2}\tag{2}$$
I wonder how can we derive $(1)$ by using $(2)$ as an approximation via step functions.
Here is a picture of $n=4$:

REPLY [3 votes]: For every $n\geqslant1$, consider the function $u_n$ defined by
$$
u_n(x)=\frac{\sqrt{\pi n}}{2^{2n}}  \binom {2n} {n+\lfloor x\sqrt{n} \rfloor}.
$$
It happens that, for every $n$,
$$
\int_\mathbb Ru_n(x)\,\mathrm dx=\sqrt\pi.
$$
To see this, note that $u_n(x)=0$ for every $x\lt-\sqrt{n}$ and every $x\geqslant\sqrt{n}$ and that $u_n(x)=u_n(k/\sqrt{n})$ for every $x$ in the interval $[k/\sqrt{n},(k+1)/\sqrt{n})$, for every integer $-n\leqslant k\leqslant n$. The length of each of these $2n+1$ intervals is $1/\sqrt{n}$, hence
$$
\int_\mathbb Ru_n(x)\,\mathrm dx=\sum_{k=-n}^nu_n(k/\sqrt{n})/\sqrt{n}=\sqrt{\pi}\,2^{-2n}\sum_{k=-n}^n{2n\choose n+k}=\sqrt{\pi}\,2^{-2n}\sum_{i=0}^{2n}{2n\choose i}.
$$
By the binomial theorem, the last sum on the RHS is $2^{2n}$ hence we are done.