Solution (source code)

= Solution

The hyperbolic identity $\cosh^2x-\sinh^2x=1$ and $\cosh x+\sinh x=e^x$ reduce the integrand to $1+e^x$. Therefore
$$
\boxed{\int(\cosh^2x+\cosh x-\sinh^2x+\sinh x)\,dx=x+e^x+C}.
$$