10
$\begingroup$

According to Mathematica, it is the case that

$$\sum\limits_{x \in \mathbb{Z}} e^{-(x + \frac{1}{4})^2} = \sqrt{\pi}.$$

This is particularly surprising because it's also the case that $$\int_{-\infty}^\infty e^{-x^2} dx = \sqrt{\pi},$$ so this is a case of a Riemann sum having zero error. What's going on?

Code: the Mathematica line I'm running here is

Sum[E^-(x - 1/4)^2, {x, -\[Infinity], \[Infinity]}] - Sqrt[\[Pi]] // 
  FullSimplify // N

which returns 0. I suppose it's possible that there's some extremely numerical error here, but it seems it'd have to be smaller than $10^{-15}$, which would still be very surprising.

$\endgroup$
6
  • 3
    $\begingroup$ The equality does not hold in general. As @DaveBenson mentioned, the Jacobi theta function identities yield a small residual. Here is an example. $\endgroup$ Commented Jun 10 at 21:08
  • $\begingroup$ This might help (or not): en.wikipedia.org/wiki/Theta_function#Explicit_values $\endgroup$ Commented Jun 10 at 21:16
  • 11
    $\begingroup$ The Poisson summation formula states that $$\sum_{n = -\infty}^{\infty} f(n) = \sum_{n = -\infty}^{\infty} \widehat{f}(n).$$ Take $f(y) = e^{-(y + 1/4)^2}$, so that $\widehat{f}(y) = \sqrt{\pi} e^{-\pi^2 y^2} e^{\pi i y}$, which implies that $$\sum_{n = -\infty}^{\infty} e^{-(n + 1/4)^2} = \sqrt{\pi} + 2\sqrt{\pi} \sum_{n = 1}^{\infty} (-1)^n e^{-\pi^2 n^2}.$$ $\endgroup$ Commented Jun 10 at 21:21
  • 3
    $\begingroup$ This is a duplicate of math.stackexchange.com/questions/3562092/…. When $x=1/4$, the first error term occurs when $n=2$ (since $n=1$ yields $\cos(n\pi/2)=0$) which explains the magnitude of the error of $|\log_{10}(e^{-4\pi^2})|\approx17$ digits. This also explains why $1/4$ is the only near miss, as $n=1$ yields a nonzero term for other choices like $1/3$ or $1/5$, so the magnitude of the error there is at most $|\log_{10}(e^{-\pi^2})|\approx5$ digits. $\endgroup$ Commented Jun 10 at 21:49
  • 2
    $\begingroup$ Duplicate of Sum of Gaussian pdfs $\endgroup$
    – Nemo
    Commented Jun 11 at 18:23

1 Answer 1

12
$\begingroup$

This example is like Sum 12 in Borwein and Borwein's wonderful article, "Strange series and high precision fraud." In their case, the approximation to $\sqrt{\pi}$ was good up to about 42 billion digits. Yours is only true to about 17 digits. The reasoning has to do with the transformation properties of Jacobi theta functions, as explained in Section 6 of their paper.

$\endgroup$
2
  • $\begingroup$ Hmm... Sum 12 in that (very cool) article is the following: $$\left(\frac{1}{10^5} \sum_{n=-\infty}^{\infty} e^{-\left(n^2 / 10^{10}\right)}\right)^2 \doteq \pi$$ This seems different -- here they're essentially just taking a Riemann series with a very small rectangle width (compared to the width of the Gaussian), so it's no surprise it has low error. In the case I presented, the Riemann series has a rectangle width that is comparable to the width of the Gaussian, so it seems surprising that it would have such low error. $\endgroup$ Commented Jun 11 at 1:59
  • 1
    $\begingroup$ (Hmm... perhaps the surprising thing with Sum 12 isn't that the approximation to $\sqrt{\pi}$ is merely quite good, but that it's 42 billion digits good, and to get that good you need some special properties of Jacobi theta fns?) $\endgroup$ Commented Jun 11 at 2:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .