How to prove $\lim \limits_{x \to 1^-} \sum\limits_{n=0}^\infty (-1)^nx^{n²} = \frac{1}{2} \ $? $\lim \limits_{x \to 1^-} \displaystyle \sum_{n=0}^\infty (-1)^nx^{n²} = \frac{1}{2}$
The power $n^2$ is problematic. Can we bring this back to the study of usual power series?
I do not really have any idea for the moment.
 A: The function under limit is $(1+\vartheta_{4}(x))/2$ where $\vartheta_{4}(x)$ is one of Jacobi's theta functions. And theta functions satisfy various transformation formulas like $$\sqrt{s} \vartheta_{4}(e^{-\pi s}) =\vartheta_{2}(e^{-\pi/s}),\,s>0\tag{1}$$ where $$\vartheta_{2}(x)=2x^{1/4}\sum_{n=0}^{\infty}x^{n(n+1)}\tag{2}$$ is another Jacobi theta function. Therefore $$\vartheta_{4}(e^{-\pi s}) =2s^{-1/2}e^{-\pi/4s}\sum_{n=0}^{\infty}e^{-\pi n(n+1)/s}$$ and letting $s\to 0^{+}$ we get the desired result that $\vartheta_{4}(x)\to 0$ as $x\to 1^{-}$.
A: If you look here as pisco commented, you will read that "one important such use of Poisson summation concerns theta functions" and
$$\sum_{n=0}^\infty (-1)^nx^{n^2}=\frac{1}{2} (1+\vartheta _4(0,x))$$ and $\vartheta _4(0,x)$ varies extremely fast as shown in the table below
$$\left(
\begin{array}{cc}
 0.50 & 0.121124 \\
 0.55 & 0.073941 \\
 0.60 & 0.039603 \\
 0.65 & 0.017578 \\
 0.70 & 0.005876 \\
 0.75 & 0.001245 \\
 0.80 & 0.000118 \\
 0.85 & 0.000002
\end{array}
\right)$$
A: We may consider a convolution with an approximate identity. We have
$$\begin{eqnarray*} \lim_{x\to 1^-}\sum_{n\geq 0}(-1)^n x^{n^2} = \lim_{z\to 0^+}\sum_{n\geq 0}(-1)^n e^{-n^2 z}&=&\lim_{m\to +\infty}m^2\int_{0}^{+\infty}\sum_{n\geq 0}(-1)^n e^{-(n^2+m^2) z}\,dz\\&=&\lim_{m\to +\infty}m^2\sum_{n\geq 0}\frac{(-1)^n}{n^2+m^2}\\&\stackrel{(*)}{=}&\lim_{m\to +\infty}\frac{m^2}{2}\left(\frac{1}{m^2}+\frac{\pi}{m\sinh(\pi m)}\right)=\color{red}{\frac{1}{2}}\end{eqnarray*}$$
where $(*)$ follows from Herglotz' trick or standard Weierstrass products.
A: EDITED. Here is yet another answer based on my recent answer. Indeed, if $P$ is a non-constant polynomial with coefficients in $\mathbb{R}$ such that $P(n) \to +\infty$ as $n \to +\infty$, one immediately deduces from the result in the link that
$$ \lim_{x \uparrow 1^-} \sum_{n=0}^{\infty} (-1)^n x^{P(n)}
= \lim_{s \to 0^+} \sum_{n=0}^{\infty} (-1)^n e^{-P(n)s}
= \frac{1}{2}, $$
which entails OP's question as a special case with $P(n) = n^2$.

Here is an elementary derivation. First, let $g : (0,\infty) \times (0, 1) \to \mathbb{R}$ by
$$ g(a,x) = \frac{1 - x^{a}}{1 - x^{2a+2}}. $$
We make the following observations on $g$.

Observation. $g$ is increasing in $a$ and non-increasing in $x$.

Its proof is more of less calculus computations, so we leave it to the end. To see how this function is related to our problem, notice that 
$$ f(x) = \sum_{n=0}^{\infty} (-1)^n x^{n^2} = \sum_{n=0}^{\infty} \left( x^{4n^2} - x^{4(n+1)^2} \right) g(4n+1, x). $$
We prove that liminf and limsup of $f(x)$ as $x \uparrow 1$ are both $\frac{1}{2}$.
Liminf. An immediate consequence is that $g(4n+1, x) \geq \lim_{r\uparrow 1}g(4n+1, r) = \frac{4n+1}{8n+4}$. So for each fixed $N \geq 1$, we can bound $f(x)$ below first by truncating first $N$ terms and then by utilizing the aforementioned lower bound of $g(4n+1, x)$:
\begin{align*}
f(x)
&\geq \sum_{n=N}^{\infty} \left( x^{4n^2} - x^{4(n+1)^2} \right) \frac{4n+1}{8n+4} \\
&\geq \frac{4N+1}{8N+4} \sum_{n=N}^{\infty} \left( x^{4n^2} - x^{4(n+1)^2} \right)
 = \frac{4N+1}{8N+4} x^{4N^2}.
\end{align*}
So it follows that
$$ \liminf_{x\uparrow 1}f(x) \geq \frac{4N+1}{8N+1} \xrightarrow[\quad N\to\infty \quad]{} \frac{1}{2}. $$
Limsup. For the other direction, fix $\epsilon > 0$ and define $N = N(\epsilon, x) = \lfloor \epsilon / \log(1/x) \rfloor$. Then for $x$ close to $1$, the sum of first $N$ terms can be bounded by using $g(4n+1, x) \leq g(4N-3, x)$:
\begin{align*}
\sum_{n=0}^{N-1} \left( x^{4n^2} - x^{4(n+1)^2} \right) g(4n+1, x)
&\leq \sum_{n=0}^{N-1} \left( x^{4n^2} - x^{4(n+1)^2} \right) g(4N-3,x) \\
&\leq g(4N-3,x)
 = \frac{1 - e^{(4N-3)\log x}}{1 - e^{(8N-4)\log x}} \\
&\to \frac{1-e^{-4\epsilon}}{1-e^{-8\epsilon}} \quad \text{as } N \to \infty.
\end{align*}
For the remaining terms, we may utilize $g(4n+1, x) \leq g(\infty,x) = 1$ to obtain
\begin{align*}
\sum_{n=N}^{\infty} \left( x^{4n^2} - x^{4(n+1)^2} \right) g(4n+1, x)
&\leq \sum_{n=N}^{\infty} \left( x^{4n^2} - x^{4(n+1)^2} \right) \\
&= x^{4N^2}
= e^{4N^2 \log x}
 \to 0 \quad \text{as } N \to \infty.
\end{align*}
So it follows that
$$ \limsup_{x\uparrow 1}f(x)
\leq \frac{1-e^{-4\epsilon}}{1-e^{-8\epsilon}}
\xrightarrow[\quad \epsilon \downarrow 0 \quad]{} \frac{1}{2}. $$

Here is the proof of the observation:


*

*We notice that
$$ \frac{\partial g}{\partial a}(a,x) = \frac{x^a \log (1/x)}{(1-x^{2a+2})^2} \left(x^{2a+2}-2 x^{a+2}+1\right) > 0 $$
since $x^{2a+2}-2 x^{a+2}+1 = x^2(x^a - 1)^2 + (1-x^2) > 0$. So $g$ is increasing in $a$ for any $x \in (0, 1)$.

*Similarly, we find that
$$ \frac{\partial g}{\partial x}(a,x) = - \frac{x^{a-1}}{(1-x^{2a+2})^2} \left( (a+2)x^{2a+2} + a - (2a+2) x^{a+2} \right). $$
By the AM-GM inequality, we have
$$ \frac{a+2}{2a+2} \cdot x^{2a+2} + \frac{a}{2a+2} \cdot 1 \geq x^{a+2} $$
and hence $g$ is non-increasing in $x$ for any $a \in (0, \infty)$.
A: I'll sketch one suggestion because it illustrate another approach to this problem (I don't know if it's ok but why not play with math formally)
Consider solving
$$
F(y+1)-F(y) = e^{i\pi y} x^{y^2} = e^{i \pi y -ay^2},
$$ with $a=|ln(x)|$, Take the fourier transform,
$$
\mathcal{F}(f)(s)= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}f(x)e^{i x s}
$$
of this and we get
$$
\hat F(s)(e^{-is} - 1) = \frac{e^{-\frac{(s + \pi)^2)}{2 a}}}{\sqrt{2a}}
$$ And we get,
$$
\hat F(s) = \frac{e^{-\frac{(s + \pi)^2)}{2 a}}}{\sqrt{2a}(e^{is} - 1)}
$$ Now the sum is telescoping and therefore
$$
\sum_{i=0}^\infty F(i+1)-F(i) = -F(0) = -\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\hat F(s)\, ds
$$
Now the hand waving is that as $x\to 1$, then $a \to 0$ and we identify $\hat F /\sqrt{2 \pi}$ which is $1/(1-e^{i\pi})$ times a gaussian $N(m,\sigma^2)=N(-\pi,2a)$, that turns into a delta meaassure and the problematic part of the integral is sort of away of the center of the integral and we could guess the value would converge and that
$$
F(0) = -\frac{1}{2}
$$ Hence the limit $1/2$ as in the question.
This indicates a general approach to finding solutions where $n^2$ is changed to other polynomials. Calculate the fourier transform if possible and then try to show that the solution converge to a delta meassure at some point which lead to a solution. for example this approach should work 
 and yield limits for many variants of $-b n^2 + z n$, with $b$ positive real and $z$ complex. I'm not sure how t treat the singularity though so maybe I'm just dreaming this up.
A: I was thinking to a proof by Cesaro sum as follow. 
Since $\forall x  \quad 0<x<1$  the alternating series $\sum_{n=0}^\infty (-1)^nx^{n^2}$ converges to L we have that
$$s_k=\sum_{n=0}^k (-1)^n x^{n^2}\implies \lim_{k\to+\infty} \frac{s_k}{k}=L$$
Now let $x=1-e^{-y}\to1^-$ with $y\to+\infty$, we have
$$x^{n^2}=(1-e^{-y})^{n^2}=1-n^2e^{-y}+o(e^{-y})$$
thus
$$s_k= \sum_{n=0}^k (-1)^n x^{n^2}=g_k-r_k=\sum_{n=0}^k (-1)^n- \sum_{n=0}^k (-1)^n[n^2e^{-y}+o(e^{-y})]$$
and
$$\lim_{y\to+\infty} \lim_{k\to+\infty} \frac{s_k}{k}=\lim_{y\to+\infty} \lim_{k\to+\infty}\left(\frac{g_k}{k}-\frac{r_k}{k}\right)=\frac12$$
indeed
$$\lim_{y\to+\infty} \lim_{k\to+\infty} \frac{g_k}{k}=\lim_{y\to+\infty} \left(\lim_{k\to+\infty} \frac{\sum_{n=0}^k (-1)^n}{k}\right)= \lim_{y\to+\infty} \frac12=\frac12$$
and
$$\lim_{y\to+\infty} \lim_{k\to+\infty} \frac{r_k}{k}=0$$
indeed
$$\left|\frac{r_k}{k}\right|=e^{-y}\frac{\sum_{n=0}^k (n^2+o(1))}{k}=e^{-y}\cdot p(k)\to 0$$
therefore
$$\lim \limits_{x \to 1^-} \displaystyle \sum_{n=0}^\infty (-1)^nx^{n²} = \frac{1}{2}$$
Note
I'm not completely sure about this proof, in particular, for the arbitrary assumption on $x=1-e^{-y}$. Any comments or ammendment is highly appreciated, Thanks!
