Limit with polylog How do you show the following limit? 
$$\lim_{x\to\infty} x\log(-e^x + 1)+\operatorname{Li}_2(e^x)-\frac12x^2=\frac{\pi^2}3$$
Where $\operatorname{Li}_n(x)$ is the polylogarithm. 
This question is inspired by a thread in the sagemath mailinglist. 

The asymptotic expansion of dilog is :
$$Li_2(X)=-\frac{1}{2}\ln^2\left(\frac{1}{X}\right)+i\pi\ln\left(\frac{1}{X}\right)+\frac{\pi^2}{3}+O\left(\frac{1}{X}\right)$$
$$Li_2(e^x)=-\frac{1}{2}\ln^2\left(\frac{1}{e^x}\right)+i\pi\ln\left(\frac{1}{e^x}\right)+\frac{\pi^2}{3}+O\left(e^{-x}\right)=-\frac{x^2}{2}-i\pi x+\frac{\pi^2}{3}+O\left(e^{-x}\right)$$
The asymptotic expansion of $x\ln(1-e^x)$ is :
$$x\ln(1-e^x)=x\ln\left(-e^x(1-e^{-x})\right)=x\ln(-e^x)+x\ln(1-e^{-x})=x^2+i\pi x+O\left(xe^{-x}\right)$$
Then, comming back to $Li_2(e^x)+x\ln(1-e^x)-\frac{x^2}{2}$
$$Li_2(e^x)+x\ln(1-e^x)-\frac{x^2}{2}=-\frac{x^2}{2}-i\pi x+\frac{\pi^2}{3}+x^2+i\pi x-\frac{x^2}{2}+O\left(xe^{-x}\right)$$
After simplification :
$$Li_2(e^x)+x\ln(1-e^x)-\frac{x^2}{2}=\frac{\pi^2}{3}+O\left(xe^{-x}\right)$$
So, the limit for $x$ tending to infinity is $\frac{\pi^2}{3}$
