Limit of $\sqrt{\frac{\pi}{1-x}}-\sum\limits_{k=1}^\infty\frac{x^k}{\sqrt{k}}$ when $x\to 1^-$?

In order to make user90369's (excellent and elementary) answer a real answer, we have to show that $$\lim_{x\to 1^-}\sqrt{1-x}\sum_{n\geq 1}\frac{x^n}{\sqrt{n}}=\sqrt{\pi}\tag{1}$$ or: $$ \lim_{x\to 1^-} (1-x)\sum_{m\geq 2}\left(\sum_{n=1}^{m-1}\frac{1}{\sqrt{n}\sqrt{m-n}}\right)x^m=\pi\tag{2} $$ but that follows from the same argument it is usually exploited to prove Hilbert's inequality, namely that for large $m$s, $$ \sum_{n=1}^{m-1}\frac{1}{\sqrt{n}\sqrt{m-n}}=\frac{1}{m}\sum_{n=1}^{m-1}\frac{1}{\sqrt{\frac{n}{m}}\sqrt{1-\frac{n}{m}}}\approx \int_{0}^{1}\frac{dx}{\sqrt{x}\sqrt{1-x}}=\pi.\tag{3} $$ If we set $f(x)=\sum_{n\geq 1}\frac{x^n}{\sqrt{n}}$ and $h(x)=\sqrt{\frac{\pi}{1-x}}$, $(1)$ alone is not enough to ensure that $h(x)-f(x)$ is bounded in a left neighbourhood of $x=1$. However, the study of the Taylor coefficients is:

$$\begin{eqnarray*}h(x)-f(x)&=&\sum_{n\geq 1}\left(\frac{\sqrt{\pi}}{4^n}\binom{2n}{n}-\frac{1}{\sqrt{n}}\right)x^n\\&=&\sum_{n\geq 1}\left(\frac{\Gamma\left(n+\frac{1}{2}\right)}{\Gamma(n+1)}-\frac{1}{\sqrt{n}}\right)x^n\\&\ll&\sum_{n\geq 1}\frac{1}{n\sqrt{n}}\ll 1\tag{1bis}\end{eqnarray*} $$ by Gautschi's inequality. Now we may exploit an analytic continuation. $$ f(x)=\sum_{n\geq 1}\frac{x^n}{\sqrt{n}} = \sum_{n\geq 1}\frac{(-1)^{n+1} x^n}{\sqrt{n}}+2\sum_{n\geq 1}\frac{x^{2n}}{\sqrt{2n}}=g(x)+\sqrt{2}\,f(x^2)$$ hence: $$ g(x)=\sum_{n\geq 1}\frac{(-1)^{n+1} x^n}{\sqrt{n}} = f(x)-\sqrt{2}\,f(x^2)\tag{4}$$ while $h(x)=\sqrt{\frac{\pi}{1-x}}$ fulfills: $$ h(x)-\sqrt{2}\,h(x^2) = h(x)\left(1-\sqrt{\frac{2}{1+x}}\right) \tag{5}$$ hence:

$$\begin{eqnarray*} \lim_{x\to 1^-}\left(h(x)-f(x)\right) &=& \frac{1}{1-\sqrt{2}}\lim_{x\to 1^-}\left[h(x)-\sqrt{2}\,h(x^2)-f(x)+\sqrt{2}\,f(x^2)\right]\\&=&\frac{1}{\sqrt{2}-1}\lim_{x\to 1^-}g(x)\\&=&\frac{1}{\sqrt{2}-1}\sum_{n\geq 1}\frac{(-1)^{n+1}}{\sqrt{n}}=\color{red}{-\zeta\left(\frac{1}{2}\right)}. \tag{6}\end{eqnarray*}$$


Following the comment posted by @Achillehui, we recognize that the series $\sum_{k=1}^\infty \frac{x^k}{\sqrt{k}}$ is a series representation of the polylogarithm function $\text{Li}_{1/2}(x)$, for $|x|<1$.

An alternative series representation (SEE HERE) of $\text{Li}_{1/2}(x)$ is given by

$$\text{Li}_{1/2}(x)=\sqrt{\frac{\pi}{-\log(x)}}+\sum_{k=0}^\infty \frac{\zeta(1/2-k)}{k!}\log^k(x) \tag 1$$

for $|x|<e^{2\pi}$.

Note that we can expand the logarithm function around $x=1$ as

$$\begin{align} -\log(x)&=(1-x)\left(1+\sum_{k=2}^\infty\frac{(-1)^{k-1}(x-1)^{k-1}}{k}\right)\\\\ &=(1-x)\left(1+O\left((x-1)\right)\right) \tag 2 \end{align}$$

Using $(2)$ in $(1)$, we obtain

$$\text{Li}_{1/2}(x)=\sqrt{\frac{\pi}{1-x}}++\zeta(1/2)+O\left(\sqrt{1-x}\right)+\sum_{k=1}^\infty \frac{\zeta(1/2-k)}{k!}\log^k(x) \tag 3$$

Finally, it is easy to see from $(3)$ that

$$\lim_{x\to 1^-}\left(\sqrt{\frac{\pi}{1-x}}-\sum_{k=1}^\infty \frac{x^k}{\sqrt{k}}\right)=-\zeta(1/2)$$

And we are done!


$f(x):=\sum\limits_{k=1}^\infty\frac{x^k}{\sqrt{k}}$

$g(x):= \sqrt{\frac{2\pi}{1-x}}-f(x)$

$\sum\limits_{k=1}^\infty (-1)^{k-1} \frac{x^k}{\sqrt{k}}=f(x)-\sqrt{2}f(x^2)$ is convergent for $x\uparrow 1$ .

=>

$\sum\limits_{k=1}^\infty (-1)^k \frac{x^k}{\sqrt{k}}+\sqrt{\frac{2\pi}{1-x}}-\sqrt{2}\sqrt{\frac{2\pi}{1-x^2}}= g(x)-\sqrt{2}g(x^2)$.

For $x\uparrow 1$ we get $\sum\limits_{k=1}^\infty (-1)^k \frac{1}{\sqrt{k}}=(1-\sqrt{2})g(1)$.

Therefore is the limit $g(1)=\frac{1}{\sqrt{2}-1}\sum\limits_{k=1}^\infty (-1)^{k-1} \frac{1}{\sqrt{k}}$.

EDIT: See above, it's not $\sqrt{2\pi}$, it's $\sqrt{\pi}$

Thank you all for your efforts!

EDIT 2: $g(1)=-\zeta(\frac{1}{2})$