We are all aware of the dilogarithm function (Spence's function):
$$\sum_{n=1}^{\infty} \frac{x^n}{n^2}, \;\; x \in (-\infty, 1]$$
Also it is known that:
$$\sum_{n=1}^{\infty} \frac{\cos n x}{n^2}= \frac{\pi^2}{6}-\frac{\pi x}{2} + \frac{x^2}{4}$$
This can be shown by using the known Fourier series $\displaystyle \sum_{n=1}^{\infty} \frac{\sin nx}{n} =\frac{\pi-x}{2}$ and integrating termwise.
My main goal here is to evaluate ${\rm Li}_2(e^{ix})$. I begin by using Euler's identity:
$$e^{ix}=\cos x + i \sin x$$
Hence:
$${\rm Li}_2\left ( e^{ix} \right )= \underbrace{\sum_{n=1}^{\infty }\frac{\cos n x}{n^2}}_{\frac{\pi^2}{6}- \frac{\pi x}{2}+ \frac{x^2}{4}}+ i \sum_{n=1}^{\infty}\frac{\sin nx}{n^2}$$
So what remains now is to evaluate the last series. The only thing I have come up with is to use the Fourier series:
$$\sum_{n=1}^{\infty} \frac{\cos nx}{n} = -\ln \left( 2 \sin \frac{x}{2} \right)$$
and integrate termwise. But I cannot integrate the RHS. I believe that there is no closed form, unless I am wrong ? I'd like your help for the last step.