Finding $\alpha$ such that $\alpha(f(x)-\sqrt{\pi})=\cos(2\pi x)$, where $f(x)=\sum_{n\in\mathbb{Z}}{e^{-(x-n)^2}}$ Given the function
$$f(x)=\sum_{n\in\mathbb{Z}}{e^{-(x-n)^2}}$$
find the constant $\alpha$ (independent of $x$) such that
$$\alpha(f(x)-\sqrt{\pi})=\cos(2\pi x)$$
Numerically alpha seems to be around $5453.9329935$, but that may not be perfectly accurate. I have no how to find the exact form of this number. How do you get an exact form of $\alpha$?
Here's a desmos graph if this makes it easier: https://www.desmos.com/calculator/53boxpbjnv
 A: Using the Poisson summation formula, we have $$f(x) := \sum_{n \in \mathbb{Z}}e^{-(x-n)^2} = \sum_{k \in \mathbb{Z}}\sqrt{\pi}e^{-\pi^2k^2-i2\pi kx}.$$ The $k = 0$ term is simply $\sqrt{\pi}$. The $k = \pm 1$ terms are $\sqrt{\pi}e^{-\pi^2}(\cos(2\pi x)\mp i\sin(2\pi x))$.
Meanwhile, the sum of the absolute values of the terms with $|k| \ge 2$ is bounded by $$\sum_{\substack{k \in \mathbb{Z} \\ |k| \ge 2}}\left|\sqrt{\pi}e^{-\pi^2k^2-i2\pi kx}\right| = 2\sqrt{\pi}\sum_{k = 2}^{\infty}e^{-\pi^2k^2} \le 2\sqrt{\pi}\sum_{k = 2}^{\infty}e^{-\pi^2(5k-6)} = \dfrac{2\sqrt{\pi}e^{-4\pi^2}}{1-e^{-5\pi^2}} < 3 \times 10^{-17}.$$
Hence, we have $f(x) \approx \displaystyle\sum_{k = -1}^{1}\sqrt{\pi}e^{-\pi^2k^2-i2\pi kx} = \sqrt{\pi}+2\sqrt{\pi}e^{-\pi^2}\cos(2\pi x)$. More specifically, $$\left|f(x)-\sqrt{\pi}+2\sqrt{\pi}e^{-\pi^2}\cos(2\pi x)\right| \le \dfrac{2\sqrt{\pi}e^{-4\pi^2}}{1-e^{-5\pi^2}} < 3 \times 10^{-17},$$
i.e. $$\left|\alpha(f(x)-\sqrt{\pi}) - \cos(2\pi x)\right| \le \dfrac{e^{-3\pi^2}}{1-e^{-5\pi^2}} < 2 \times 10^{-13},$$ where $\alpha = \dfrac{e^{\pi^2}}{2\sqrt{\pi}} \approx 5453.9329936539385\ldots$.
Note that we don't have $\alpha(f(x)-\sqrt{\pi}) = \cos(2\pi x)$ exactly for all $x$, but the approximation is close enough that you won't see it on a graph without zooming in really close.
