# Solving a limit about sum of series

what's the limit of $$\sqrt{1-t}\sum _{n=0}^{\infty}t^{n^2}$$ as $$t$$ goes to the left of $$1$$? i.e. $$t\to 1^{-}$$? I tried several times but failed. Here is my thought:

This is a $$0\cdot\infty$$ problem, so I just tried with $$\frac{\sum _{n=0}^\infty t^{n^2}}{\frac{1}{\sqrt{1-t}}}$$. Then it becomes a $$\frac{\infty}{\infty}$$ one which we could apply L'hospital rules. But it seems that the $$n$$-order derivative of $$\frac{1}{\sqrt{1-t}}$$ is always $$\infty$$ for $$t\to 1^{-}$$...so what else can I do? Thanks!

The sum $$\sum _{n=0}^{\infty}t^{n^2}$$ evaluates for $$t<1$$ to an elliptic theta function, and then taking the limit $$t\rightarrow 1$$ from below gives $$\lim_{t\nearrow 1}\sqrt{1-t}\sum _{n=0}^{\infty}t^{n^2}=\tfrac{1}{2}\sqrt{\pi}.$$

Alternatively, I can write $$t=1-\epsilon$$, with $$(1-\epsilon)^{n^2}\rightarrow e^{-\epsilon n^2}$$ for $$\epsilon\rightarrow 0,n\rightarrow\infty$$ at constant $$\epsilon n^2$$, and then approximate the sum by an integral, $$\lim_{t\nearrow 1}\sqrt{1-t}\sum _{n=0}^{\infty}t^{n^2}=\lim_{\epsilon\rightarrow 0}\sqrt{\epsilon}\int_0^\infty e^{-\epsilon x^2}\,dx=\tfrac{1}{2}\sqrt{\pi}.$$

• ah nice for using $(1-\epsilon)^{n^2}$ goes to $e^{-\epsilon n^2}$. I didnt realize this...I am just using Taylor expansion to do this... Apr 5, 2023 at 13:49
• It is an heuristic argument, not a proof. Writing $(1-\epsilon)^{đť‘›^2} \to e^{-\epsilon n^2}$ does not make sense. Apr 5, 2023 at 19:02

An alternative to Carlo Beenakker's argument, which explains the appearance of $$\pi$$ geometrically, is as follows: With $$A(t)=\sum_{n=0}^{\infty}t^{n^2}$$ we have $$$$\frac{1}{1-t}A(t)^2=\sum_{n=0}^{\infty}p(n)t^n,$$$$ where $$p(n)$$ is the number of solutions $$a^2+b^2\le n$$ for nonnegative integers $$a$$ and $$b$$. Thinking of these pairs $$(a,b)$$ as lattice points, we see that $$p(n)=\frac{\pi}{4}n+O(\sqrt{n})=\frac{\pi}{4}(n+1)+O(\sqrt{n})$$. Thus $$$$\sum_{n=0}^{\infty}p(n)t^n=\frac{\pi}{4}\frac{1}{(1-t)^2}+\sum_{n=0}^{\infty}O(\sqrt{n})t^n.$$$$ Therefore $$$$(1-t)A(t)^2=\frac{\pi}{4}+(1-t)^2\sum_{n=0}^{\infty}O(\sqrt{n})t^n.$$$$ The second sum goes to $$0$$ for $$t\nearrow 1$$, for instance because for every $$\varepsilon>0$$, $$\sqrt{n}<\varepsilon n$$ for all $$n>1/\varepsilon^2$$.

• thanks for the answer! Btw I was not familiar with the elliptic things...but it's interesting Apr 5, 2023 at 13:52
• it's a very cool solution Apr 5, 2023 at 15:57
• Itâ€™s also a cool way of evaluating $\int_0^\infty e^{-x^2}dx$, if one put it together with the other solutions Apr 5, 2023 at 19:25
• It seems a discrete version of the Poisson's computation of the Gaussian integral from $\int_{\mathbb R^2}e^{-(x^2+y^2)}dxdy$ (via double integration vs integration in polar coordinates) Apr 6, 2023 at 7:53
• @PietroMajer In kconrad.math.uconn.edu/blurbs/analysis/gaussianintegral.pdf Keith Conrad records 11 methods to compute the Gaussian integral, none uses this idea with the lattice point count combined with the discretization of the integral by a Riemann sum. So maybe it is worth a short note in the Amer. Math. Monthly? Apr 6, 2023 at 13:21

The function $$x \mapsto t^{x^2}$$ decreases on $$\mathbb{R}_+$$, so for every $$n \in \mathbb{N}$$, $$t^{(n+1)^2} \le \int_n^{n+1}t^{x^2}dx \le t^{n^2}$$ By summation over $$n$$, $$\sum_{n=1}^{\infty}t^{n^2} \le \int_0^\infty t^{x^2}dx \le \sum_{n=0}^{\infty}t^{n^2}.$$ $$\int_0^\infty t^{x^2}dx \le \sum_{n=0}^{\infty}t^{n^2} \le \int_0^\infty t^{x^2}dx - 1.$$ But $$\int_0^\infty t^{x^2}dx = \int_0^\infty e^{x^2 \ln(t)}dx = \frac{1}{2}\sqrt\frac{\pi}{-\ln(t)}$$ Since $$-\ln(t) \sim 1-t$$ as $$t \to 1-$$, we derive $$\lim_{t \to 1-}\sqrt{1-t}\sum_{n=0}^{\infty}t^{n^2}=\frac{1}{2}\sqrt{\pi}.$$