I need to solve the following integral: $\displaystyle\int\frac{x}{\cos(x)}\,dx$. My procedure is the following:
\begin{align*}\int\frac{x}{\cos(x)}\,dx &= \int x\sec(x)\,dx\\ &=x\ln(\tan(x)+\sec(x))-\int\ln(\tan(x)+\sec(x))\,dx. \end{align*}
But, I'm stuck at this step, after using integration by parts I have $\ln(\tan(x)+\sec(x))$ inside the new integral and then I do not know how to solve it, I was trying using by parts again but it gets more complicated.
Any advice on how to continue? I looked for related questions to this problem here in math.stackexchange but did not find anything useful.
Wolfram Alpha returns
$$x (\log(1 - i e^{i x}) - \log(1 + i e^{i x})) + i (\text{Li}_2(-i e^{i x}) - \text{Li}_2(i e^{i x}))$$
which you can trust with closed eyes.
Alpha uses to return solutions valid in $\mathbb C$, which sometimes makes the expression look complicated. In the case on hand, maybe the logarithmic terms can be rewritten with reals only. But maybe not the dilogarithmic ones.
And you can be sure that no elementary solution is possible.