# Help with an infinite sum of exponential terms?

I've been trying to calculate the mean squared displacement of a particle confined to a one-dimensional box, and I managed to get an answer in terms of an infinite series of the basic form $$\sum_{n=1}^\infty\frac{(-1)^n}{n^2}\exp(-an^2)\;\;.$$ I can't figure out if this series has a simple solution; I can't find it in any table of series, nor can I seem to expand the exponential and collect like terms without running into $\sum(-1)^2$ terms. Does this have a solution or is this as far as I can go? Thanks in advance.

This is developed by the following. Differentiate $f(a)$ to obtain $$f^{'}(a) = \sum_{n=1}^{\infty} (-1)^{n+1} \, e^{-a \, n^{2}}.$$ Now, $$\theta(x, it) = 1 + 2 \, \sum_{n=1}^{\infty} e^{- \pi \, t \, n^{2}} \, \cos(2 n \pi x)$$ which yields $$f^{'}(a) = \frac{1}{2} \, \left( 1 - \theta\left(\frac{1}{2}, \frac{i \, a}{\pi}\right) \right).$$ Integrating with respect to $a$ yields $$f(a) = \frac{a}{2} - \frac{1}{2} \, \int_{0}^{a} \theta\left(\frac{1}{2}, \frac{i \, u}{\pi}\right) \, du + c_{0}$$ Since $f(0) = - \frac{1}{2} \, \zeta(2)$ then the presented result is obtained.