I am having trouble with proving a statement in Ramanujan's Lost Notebook Part 1 (1.16). The statement is as follows:
$\varphi(q)=f(q,q)=\sum_{n=-\infty}^\infty q^{n^2} = (-q;q^2)_\infty^2(q^2;q^2)_\infty=\frac{(-q;-q)_\infty}{(q;-q)_\infty}$. I think I am close to solving the equality between $(-q;q^2)_\infty^2(q^2;q^2)_\infty=\frac{(-q;-q)_\infty}{(q;-q)_\infty}$, but I am having trouble proving that $\sum_{n=-\infty}^\infty q^{n^2} = (-q;q^2)_\infty^2(q^2;q^2)_\infty$. Does anyone have any suggestions?
The identity follows immediately from the Jacobi triple product, $$ \prod_{m=1}^\infty( 1 - x^{2m})( 1 + x^{2m-1} y^2)( 1 + x^{2m-1} y^{-2})=\sum_{n=-\infty}^\infty x^{n^2} y^{2n} $$ (take $x=q$, $y=1$).
(The Jacobi triple product has various proof but none of them is really easy, I'm afraid. I like one that uses q-binomial theorem — it's described e.g. in Bressoud's «Proofs and confirmations». Another one can be found on the Wikipedia page linked above.)