TITLE: Is $x \, \tan(x)$ integrable in elementary functions?
QUESTION [18 upvotes]: I'm teaching Calculus and my students asked me to calculate the integral of $x \, \tan(x)$.
I spent quite a lot of effort to do this, but I'm now even not sure if the integral could be presented in elementary functions.
Does anybody know how to calculate it, or otherwise prove it is not integrable in elementary functions?

REPLY [3 votes]: $\int x \tan x \,dx=\frac{1}{2} i \text{Li}_2\left(-e^{2 i x}\right)+\frac{i x^2}{2}-x \log\left(1+e^{2 i x}\right)+C $
Where $\text{Li}_2$ is the dilogarithm function