TITLE: Order of vanishing at the cusps for the modular theta function
QUESTION [8 upvotes]: I am trying to examine the behavior of the theta function $\theta(z)=\sum_{n\in\mathbb{Z}} e^{2\pi i n^2 z}$, which is modular for $\Gamma_0(4)$ of weight 1/2, at the cusps 0 and 1/2.  My calculations seem to show that it vanishes at least at one of these cusps.  I would like to calculate the order of vanishing.
Apostol discusses this theta function in some detail in his second number theory book.  He gives a transformation formula as $\theta(-1/z)=(-iz)^{1/2}\theta(z)$.  This transformational formula doesn't make clear what the function's behavior is at the cusp at $\infty$.
Koblitz talks some about the order's of vanishing at the 0 cusp, but doesn't mention the order of vanishing at other cusps.
Does anyone have a good reference for this problem?
I've also tried looking for the valence formula for $\Gamma_0(4)$ to help with the calculation, but couldn't find it written down anywhere.  A source for this would be helpful as well.

REPLY [15 votes]: [Edited for consistency with the normalization
$\theta(z) = \sum_{n=-\infty}^\infty e^{\pi i n^2 z}$ of the proposer
(and of my own article!);
expansions in powers of $e^{2\pi i z}$ are more common,
but for this modular form $q = e^{\pi i z}$ does seem to be the better choice.]
The function
$$
\theta(z) = \sum_{n=-\infty}^\infty q^{n^2}
$$
(where $q = e^{\pi i z}$) has a product formula converging in $|q|<1$,
and thus for all $z$ in the upper half-plane:
$$
\theta(z) = \frac{\eta(z)^5}{\bigl(\eta(z/2)\eta(2z)\bigr)^2}
= \frac{1+q}{1-q} \cdot
 \frac{1-q^2}{1+q^2} \cdot
 \frac{1+q^3}{1-q^3} \cdot
 \frac{1-q^4}{1+q^4} \cdot
 \frac{1+q^5}{1-q^5} \cdot
 \frac{1-q^6}{1+q^6} \cdots
$$
(where
  $\eta(z) = e^{\pi i z/12} \prod_{m=1}^\infty (1-e^{2\pi i m z})$
as usual).
It follows from this formula that $\theta$ cannot vanish except at a cusp:
as long as $|q|<1$, the factors converge quickly to $1$ and none of them
has a zero or pole.
But $\theta$ is a modular form of positive weight, so it must vanish
somewhere.  It is clear from the sum formula that $\theta \neq 0$
as $q \rightarrow 1$ and $q \rightarrow 0$, so $\theta$ does not
vanish at the cusps $z=0$ and $z=\infty$.  Hence it must vanish
at the remaining cusp of $\Gamma(2)$.  Indeed each factor
$(1 \pm q^n) / (1 \mp q^n)$ vanishes at $q = -1$
(and stays in $(0,1)$ for $-1 < q < 0$),
so $\theta$ must vanish at the corresponding cusp $z=1$.
The author of the question also asked for a source for "a good reference
for this problem".  It's not clear what level of exposition is most
appropriate here.  Perhaps 
this paper might be of use, since I needed to use the vanishing order
of $\theta$ in a context where I could not assume the reader had any
background in modular forms:

Elkies N.D.: A characterization of the ${\bf Z}^n$ lattice,
  Math. Research Letters 2 (1995), 321-326 (arxiv:math.NT/9906019).