Show $S(t) =\sum_{n=-\infty}^\infty\sin{(n^2t^2)}e^{-tn^2}$ is $O(t^p)$ at zero An old qualifying exam problem: For $t>0$, define $$S(t) =\sum_{n=-\infty}^\infty\sin{(n^2t^2)}e^{-tn^2}.$$
Show that $S(t) = C t^p + o(t^p)$ as $t\to 0$ . Find $C$ and $p$.
There are a couple of solutions here, both of which are fairly complicated. I wondered if anyone had an alternate, perhaps simpler method. (Perhaps the problem does not admit one).
 A: This sum has the value
$$ S(t) = 2\sum_{n\ge 1} \sin(n^2 t^2) e^{-n^2 t}
= \frac{1}{i} \sum_{n\ge 1} \left(\exp(i n^2 t^2) - \exp(-i n^2 t^2)\right)e^{-n^2 t}.$$
Now introduce
$$T(x) = \sum_{n\ge 1} e^{-n^2 x^2}$$
so that $$S(t) = \frac{1}{i} T(\sqrt{t-i t^2}) - \frac{1}{i} T(\sqrt{t+i t^2}).$$
The sum term $T(x)$ is harmonic and may be evaluated by inverting its Mellin transform.
Recall the harmonic sum identity
$$\mathfrak{M}\left(\sum_{k\ge 1} \lambda_k g(\mu_k x);s\right) =
\left(\sum_{k\ge 1} \frac{\lambda_k}{\mu_k^s} \right) g^*(s)$$
where $g^*(s)$ is the Mellin transform of $g(x).$
In the present case we have
$$\lambda_k = 1, \quad \mu_k = k \quad \text{and} \quad
g(x) = e^{-x^2}.$$
The Mellin transform $g^*(s)$ of $g(x)$ is trivially seen to be
$$\int_0^\infty e^{-x^2} x^{s-1} dx = \frac{1}{2} \Gamma\left(\frac{s}{2}\right).$$
Therefore the asymptotic expansion of $T(x)$ in a neighborhood of zero can be obtained by evaluating the Mellin inversion integral for the Mellin transform $Q(s)$ of $T(x)$ which is
$$\frac{1}{2\pi i} \int_{3/2-i\infty}^{3/2+i\infty} Q(s)/x^s ds$$
in the left half-plane, where
$$Q(s) =  \frac{1}{2} \Gamma\left(\frac{s}{2}\right) \zeta(s).$$
Here we have a fortunate constellation of expressions, as the trivial zeros of the zeta function cancel all the poles of the gamma function, leaving just two poles, which contribute the following two residues:
$$\mathrm{Res}(Q(s)/x^s; s=1) = \frac{\sqrt\pi}{2x}
\quad\text{and}\quad
\mathrm{Res}(Q(s)/x^s; s=0) = -\frac{1}{2}.$$
So we get, again in a neighborhood of zero that
$$ T(x) \sim \frac{\sqrt\pi}{2x} -\frac{1}{2}.$$
This gives the following for the initial sum (observe that $x$ goes to zero as $t$ goes to zero and vice versa):
$$ S(t) \sim 
\frac{\sqrt\pi}{2i\sqrt{t-it^2}} - \frac{\sqrt\pi}{2i\sqrt{t+it^2}}
= 
\frac{\sqrt\pi}{2i}\frac{1}{\sqrt t}
\left((1-it)^{-1/2}-(1+it)^{-1/2}\right).$$
Now we are using the branch of the square root with the cut on the negative real axis, so we are justified in applying the Newton binomial series to the square root terms, getting
$$\frac{\sqrt\pi}{2i}\frac{1}{\sqrt t}
\left(\sum_{k=0}^\infty {k-1/2\choose k} (it)^k
- \sum_{k=0}^\infty {k-1/2\choose k} (-it)^k\right).$$
This simplifies to
$$\frac{\sqrt\pi}{\sqrt t} \sum_{q=0}^\infty (-1)^q {2q+1/2\choose 2q+1} t^{2q+1}$$
which is
$$ \frac{\sqrt\pi}{\sqrt t} 
\left(\frac{1}{2}\,t-{\frac {5}{16}}\,{t}^{3}+{\frac {63}{256}}\,{t}^{5}
-{\frac {429}{2048}}\,{t}^{7}+{
\frac {12155}{65536}}\,{t}^{9}-\cdots\right).$$
We now have all the constants the problem is asking for and may conclude that
$$ S(t) \sim \frac{\sqrt\pi}{2}\sqrt{t} + o\left(t^{1/2}\right).$$
The linked solution text did not evaluate the leading constant for some reason.
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert #1 \right\vert}%
 \newcommand{\yy}{\Longleftrightarrow}$
$\ds{{\rm S}\pars{t} =\sum_{n = -\infty}^{\infty}\sin\pars{n^{2}t^{2}}\expo{-tn^2}\,,\qquad \tau \equiv t - \ic t^{2}}$

With $\it\mbox{Euler-Maclaurin Summation Formula}$:
\begin{align}
{\rm S}\pars{t}&=
2\Im\sum_{n = 1}^{\infty}\expo{-\tau\pars{n - 1}^{2}}
\approx
2\Im\braces{\int_{0}^{\infty}\expo{-\tau\pars{x - 1}^{2}}\,\dd x
-
\bracks{\left.{1 \over 2}\,\expo{-\tau\pars{x - 1}^{2}}\right\vert_{x = 0}}}
\\[3mm]&=
2\Im\bracks{\tau^{-1/2}\lim_{W \to \infty}
\int_{-\tau^{1/2}}^{\tau^{1/2}W}\expo{-x^{2}}\,\dd x
-
{1 \over 2}\,\expo{-\tau}}
\approx
2\Im\bracks{\pars{t - \ic t^{2}}^{-1/2}\,{\root{\pi} \over 2}}
\\[3mm]&\approx
\root{\pi}\Im\bracks{t^{-1/2}\pars{1 + {1 \over 2}\,\ic t}} = {\root{\pi} \over 2}\,t^{1/2}\,,\qquad\qquad t \sim 0
\end{align}

$$\color{#0000ff}{\large%
\sum_{n = -\infty}^{\infty}\sin\pars{n^{2}t^{2}}\expo{-tn^2}
\approx
{\root{\pi} \over 2}\,t^{1/2}\,,\qquad t \sim 0}
$$
