How to integrate $\int \frac{dx}{\cosh x + \sinh x + 2}$ How to integrate $\displaystyle \int \frac{dx}{\cosh x + \sinh x + 2}$?
Is it substitution or by parts?
 A: Hint Write $\cosh x$ and $\sinh x$ in terms of $e^x$, and then make a natural substitution.
A: Using the fact  that
$$\forall x\in \mathbb R \;\;\;\cosh(x)+\sinh(x)=e^x. $$
and putting $t=e^x$, the integral becomes $$\int \frac{e^xdx}{e^x (e^x+2)}=\int \frac{dt}{t (t+2)} $$
$$=\frac {1}{2}\int (\frac {1}{t}-\frac {1}{t+2})dt$$
$$=\frac {1}{2}\ln (|  \frac {t}{t+2} |  )+C $$
$$=\frac {1}{2}\ln (  \frac{e^x} {e^x+2} )+C$$
A: $$shx+chx+2=e^x+2\\
t=e^x+2,\ dt=e^xdx,\ dx=\frac{dt}{t-2}\\
\int \frac{dx}{chx+shx+2}=\int\frac{dt}{t^2-2t}=\int\frac{dt}{(t-1)^2-1}$$
A: It's possible (though by no means necessary) to do everything strictly in terms of the hyperbolic functions, using the identity $\cosh^2x-\sinh^2x=1$ and the derivatives $(\cosh x)'=\sinh x$ and $(\sinh x)'=\cosh x$.  
Note that
$${1\over\cosh x+\sinh x+2}={\cosh x-\sinh x\over(\cosh^2x-\sinh^2x)+2(\cosh x-\sinh x)}={\cosh x-\sinh x\over1+2(\cosh x-\sinh x)}$$
If we let $u=\cosh x-\sinh x$, then $du=(\sinh x-\cosh x)\,dx$, in which case
$$\int{dx\over\cosh x+\sinh x+2}=\int{(\cosh x-\sinh x)\,dx\over1+2(\cosh x-\sinh x)}=\int{-du\over1+2u}=-{1\over2}\ln(1+2u)+C\\
=-{1\over2}\ln(1+2(\cosh x-\sinh x))+C$$
