Jacobi Triple product : a special case Hello I would like to solve this :
$$
 \lim_{x \rightarrow 1^-}
 \sum_{n=0}^{+\infty}(-1)^{n}x^{n^2}=\dfrac{1}{2} $$ 
So my idea was to use the triple product of Jacobi wich is the following :
$$\sum_{n=-\infty}^{\infty}z^nq^{n^2}=\prod_{n\geq 0}(1-q^{2n+2})(1+zq^{2n+1})(1+z^{-1}q^{2n+1})$$
But  I have some problems like the negative infinity and others things ...
Could someone help me ? 
 A: Let us set $x=e^{-z}$. The original limit can be computed through a convolution with an approximate identity:
$$ \lim_{z\to 0^+}\sum_{n\geq 0}(-1)^n e^{-n^2 z} = \lim_{m\to +\infty}\int_{0}^{+\infty}\sum_{n\geq 0} (-1)^n e^{-n^2 z} m^2 e^{-m^2 z}\,dz = \lim_{m\to +\infty}\sum_{n\geq 0}\frac{m^2 (-1)^n}{m^2+n^2}$$
On the other hand, by applying $\frac{d}{dz}\log(\cdot)$ to the Weierstrass product for the hyperbolic sine function we get an explicit form for the last series involved:
$$ \lim_{z\to 0^+}\sum_{n\geq 0}(-1)^n e^{-n^2 z} = \lim_{m\to +\infty}\left(\frac{1}{2}+\frac{\pi m}{\sinh(\pi m)}\right)=\color{red}{\frac{1}{2}}$$
so the given limit is simple to compute even without invoking Jacobi's triple product, the Poisson summation formula or the identity $r_2(n) = 4(\chi_4*1)(n)$.
A: With $z=-1$ and $q=x$, your formula becomes
$$\sum_{n=-\infty}^{\infty}(-1)^nx^{n^2}=\prod_{n\geq 0}(1-x^{2n+2})(1-x^{2n+1})^2.$$
Since $(-1)^{-n}=(-1)^n$, the LHS is $\displaystyle2\sum_{n=0}^{+\infty}(-1)^{n}x^{n^2}-1$, giving
$$\sum_{n=0}^{+\infty}(-1)^{n}x^{n^2}=\frac12\left(1+\prod_{n\geq 0}(1-x^{2n+2})(1-x^{2n+1})^2\right).$$ Of course, the product converges $\to0$ with $x\to1-$, and faster than any power of $1-x$. The Poisson sum formula would give the same result, naturally.
