Numerical coincidence? Why is sum(x^(k^2)) = sum(x^((k+1/2)^2)) for x = 0.8?

$$\sum_{k \in \mathbb Z} x^{k^2} = \theta_3(0,x)$$ while $$\sum_{k \in \mathbb Z} x^{(k+1/2)^2} = \theta_2(0,x)$$ where $\theta_2$ and $\theta_3$ are Jacobi theta functions. The difference $$\theta_2(0,0.8) - \theta_3(0,0.8) \approx 9.280378636257491074676461535977 \times 10^{-19}$$ according to Maple.

EDIT: The difference $$\theta_3(0,x) - \theta_2(0,x) = \sum_{j \in \mathbb Z} (-1)^j x^{(j/2)^2} =\theta_3(\pi/2, x^{1/4}) $$ The Poisson summation formula gives us the identity $$ \theta_3(\pi/2, e^{-t^2}) = \frac{\sqrt{\pi}}{t} \theta_2(0, e^{-\pi^2/t^2})$$ and for $t \to 0+$, this goes to $0$ very rapidly: $$\theta_3(\pi/2, e^{-t^2}) \sim \frac{2 \sqrt{\pi}}{t} e^{-\pi^2/(4 t^2)}$$ i.e. $$ \theta_3(0,x) - \theta_2(0,x) \sim \frac{4 \sqrt{\pi}}{\sqrt{\ln(1/x)}} \exp\left(-\frac{\pi^2}{\ln(1/x)}\right) $$ For $x = 0.8$, the right side above is extremely close to the value I gave for $\theta_2(0,0.8) - \theta_3(0,0.8)$ (all digits shown match).


The two values $a(0.8)$ and $b(0.8)$ appear "deceivingly" equal, but they actually are not!

Other "near-miss" values include $$0<\theta_3(0,0.9)-\theta_2(0,0.9)<0.5\times 10^{-39}.$$

Let $f(x)=\theta_3(0,x)-\theta_2(0,x)$. The graph of $f(x)$, for values $0<x<1$ shows a global minimum at $x_*$ near $x=0.9$ (of course $f(x_*)>0$, still) and also a local maximum for some $0.9<x^*<1$. It would be really interesting to figure out these numbers, especially $x_*$. In any case, there are two values of $x$ in the range $0.8<x<1$ for which $$\theta_3'(0,x)=\theta_2'(0,x).$$

By the way, can someone post the graph for $y=f(x)$? It would be a nice documentation for the discussion and analysis here.

Tags:

Theta Series