TITLE: Integral of $\ln(\cosh x)$?
QUESTION [5 upvotes]: $$\int \ln(\cosh x) dx$$
Tried for some time, couldn't get anywhere.
This IS an elementary function, isn't it?
Thanks in advance.

REPLY [3 votes]: The integral $\int \log(\cosh(x))\,dx$ cannot be expressed in terms of elementary functions.  To see this, we enforce the substitution $x=\log(u)$ to obtain
$$\begin{align}
\int \log(\cosh(x))\,dx&=\int \frac{\log(1+u^2)-\log(u)}{u}\,du-\log(2)x \\\\
&=\int \frac{\log(1+u^2)}{u}\,du -\frac12 x^2-\log(2)x \tag 1
\end{align}$$
Next, we let $u=\sqrt{v}$ in the integral on the right-hand side of $(1)$ to reveal
$$\begin{align}
\int \log(\cosh(x))\,dx&=\int \frac{\log(1+v)}{2v}\,dv -\frac12 x^2-\log(2)x \\\\
&=\bbox[5px,border:2px solid #C0A000]{-\frac12\text{Li}_2(-e^{2x})-\frac12x^2-\log(2)x+C}\tag 2
\end{align}$$
which expresses the primitive in terms of the dilogarithm function, a special function given by $\text{Li}_2(x)=-\int_0^x \frac{\log(1-t)}{t}\,dt$.