TITLE: What is $\lim_{x\to1^{-}} (1-x)\left(\sum_{i=0}^{\infty} x^{i^2}\right)^{2}$?
QUESTION [12 upvotes]: This is the problem I was presented with:
$$\text{Given } f(x) = \sum_{i=0}^{\infty} x^{i^2} ,$$
$$\text{find } \lim_{x\to1^{-}} (1-x)f(x)^2 .$$
At first, I tried figuring out a generating function for $f(x)$, squaring it, and multiplying it by $(1-x)$. I then learned that $f(x)$ does not have a traditional generating function connected to it. I then tried dividing $f(x)^2$ by $(1+x+x^2+x^3+x^4+x^5+\cdots)$, the expanded form of $\frac{1}{1-x}$. I couldn't figure out how to make that work out either. Is there some way I should simplify $f(x)$ to make this an easier limit to solve?

REPLY [4 votes]: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{\lim_{x \to 1^{\large -}}\bracks{\pars{1 - x}
\pars{\sum_{i = 0}^{\infty}x^{i^{\large 2}}}^{2}}} =
\lim_{x \to 0^{\large +}}\braces{x
\bracks{\sum_{i = 0}^{\infty}\pars{1 - x}^{i^{\large 2}}}^{2}}
\\[5mm] = &\
\lim_{x \to 0^{\large +}}\braces{x
\bracks{\sum_{i = 0}^{\infty}\exp\pars{i^{2}\ln\pars{1 - x}}}^{2}}
\\[5mm] = &\
\lim_{x \to 0^{\large +}}\braces{x
\bracks{\int_{0}^{\infty}\exp\pars{-x\,i^{2}}\,\dd i}^{2}}
\\[5mm] = &\
\lim_{x \to 0^{\large +}}\bracks{x
\pars{{1 \over 2}\root{\pi \over x}}^{2}} =
\bbx{\pi \over 4}
\end{align}

See $\ds{\quad\underline{\textsf{Laplace Method for Sums}}\quad }$ in
  Analytic Combinatorics by Philippe Flajolet and Robert Sedgewick, Cambridge University Press $2009$.