I'm trying to evaluate $\sum_{a=-\infty}^{\infty} e^{-2 \pi z a^2}$ using Euler-Maclaurin, but I get $\frac{1}{\sqrt{2z}}$. The only alternative I have is to calculate the remainder term directly for a small level of approximation, but I don't want to do this if there's a simple mistake I'm making and fixing it would let me avoid doing so, or if for some reason Euler-Maclaurin doesn't work at all.
SUMMARY:
By Euler-Maclaurin, we have:
$\sum_{a=-\infty}^{\infty}e^{-ca^2}-\int_{-\infty}^{\infty} e^{-ca^2} da = \sum_{k=2}^{\infty} \frac{b_k}{k!}(e^{-cx^2})^{(k-1)'}\vert_{-\infty}^{\infty}$, where $b_k=B_k(0)$ are the Bernoulli numbers. Implicitly, the remainder term (due to the large factorial) and the halved endpoints of the sum (due to $e^{-ca^2}$ vanishing in the infinite limits) vanish.
First, observe $\frac{d^n}{da^n}e^{-c a^2}$ is of the form $e^{-c a^2}p(a)$ for a polynomial $p$. (1)
Secondly, observe that $lim_{a \rightarrow \infty} \frac{p(a)}{e^{c a^2}} = 0$ for any polynomial $p$ and constant $c \gt 0$. (2)
Thirdly, observe that $e^{-ca^2}$ is even, and hence its odd derivatives (the derivatives taken for even $k$) are odd, and its even derivatives (odd $k$) are even.
The latter implies that for odd $k$, $(e^{-cx^2})^{(k-1)'}\vert_{-\infty}^{\infty}$ vanishes, and for even k, $(e^{-cx^2})^{(k-1)'}\vert_{-\infty}^{\infty} = 2 \lim_{a \rightarrow \infty} (e^{-cx^2})^{(k-1)'}(a) = 2 \lim_{a \rightarrow \infty} e^{-ca^2}p(a) = 0.$
Therefore all terms of the series vanish, implying $\sum_{n=-\infty}^{\infty}e^{-cx^2} = \int_{-\infty}^{\infty} e^{-cx^2} da = \frac{\sqrt{\pi}}{\sqrt{c}}$, and in this case $\frac{\sqrt{\pi}}{\sqrt{2 \pi z}} = \frac{1}{\sqrt{2z}}.$
DETAILS:
(1) follows by induction from $\frac{d}{da}e^{-ca^2}p(a) = e^{-ca^2}(\frac{d}{da}p(a)-2ca\ p(a)),$ which is of the form $e^{-ca^2}p(a)$.
Proof of (2): $\frac{\frac{d}{dx}a^n}{\frac{d}{dx}e^{c a^2}} = \frac{a^{n-1}}{2cae^{c a^2}} = \frac{a^{n-2}}{2ce^{c a^2}}, \implies \frac{\frac{d^m}{dx^m}a^n}{\frac{d^m}{dx^m}e^{c a^2}} = \frac{a^{n-2m}}{(2c)^m e^{ca}}, \implies lim_{a \rightarrow \infty} \frac{a^n}{e^{c a^2}} = 0 \implies lim_{a \rightarrow \infty} \frac{p(a)}{e^{c a^2}} = 0$
I have also derived an explicit formula for the derivatives from Faà di Bruno's formula together with $\frac{d^n}{dx^n}f(cx)=c^nf^{(n)}(cx)$, which yields a polynomial multiple of $e^{-ca^2}$, which by (2) vanishes in the limit, and is again even for even derivatives and odd for odd ones.