TITLE: Approximating sum by Gaussian integral - how big is the error?
QUESTION [5 upvotes]: I have the following infinite sum:
$$S=\sum_{n=1}^{\infty}e^{-an^2}$$
Where $a$ is a positive constant. Is there a simple way to estimate the error when approximating $S$ by:
$$S \approx \int_0^ \infty e^{-ax^2}dx .$$
Does this depend at all on the value of $a$?

REPLY [5 votes]: A very simple estimate (which is what you were asking for) would be the following:
$f(x) = e^{-a x^2}$ is strictly decreasing, therefore
$$
f(n+1) < \int_n^{n+1} f(x)\,dx < f(n)
$$
for all $n \in \mathbb N_0$. Summation gives
$$
\sum_{n=1}^\infty f(n) < \int_0^\infty f(x)\,dx < f(0) + \sum_{n=1}^\infty f(n)
$$
So the difference between sum and integral is at most $f(0) = 1$.