Integral of $ \int \frac {\tanh(x) dx}{\tanh(x)+\operatorname{sech}(x) }$ My attempt at solution:



Also I got a question, is there a way this can be solved without using hyperbolic tangential half angle substitution? Because I don't get how you can treat hyperbolic functions as if they were trigonometric and deducing sinx and cosx from a right triangle
Play time.

$\begin{array}\\
\int \frac {\tanh(x) dx}{\tanh(x)+\operatorname{sech}(x) }
&amp;=\int \frac {\frac{\sinh(x)}{\cosh(x)} dx}{\frac{\sinh(x)}{\cosh(x)}+\frac{1}{\cosh(x)}}\\
&amp;=\int \frac {\sinh(x) dx}{\sinh(x)+1}\\
&amp;=\int \frac {\frac12(e^x-e^{-x}) dx}{\frac12(e^x-e^{-x})+1}\\
&amp;=\int \frac {(e^x-e^{-x}) dx}{(e^x-e^{-x})+2}\\
&amp;=\int \frac {(y-1/y) dy/y}{y-1/y+2}
\qquad y=e^x, dy=e^x dx, dx = e^{-x}dy = dy/y \\
&amp;=\int \frac {(y-1/y) dy}{y^2+2y-1}\\
&amp;=\int \frac {(y^2-1) dy}{y(y^2+2y-1)}\\
&amp;= -\log(-y + \sqrt{2} - 1)/\sqrt{2} + \log(y) + \log(y + \sqrt{2} + 1)/\sqrt{2}
\qquad\text{According to Wolfy}\\
&amp;= -\log((\sqrt{2} -(y+ 1))(\sqrt{2} +(y+ 1)))/\sqrt{2} + \log(y)\\
&amp;= -\log(2-(y+1)^2)/\sqrt{2} + \log(y)\\
&amp;= -\log(2-(e^x+1)^2)/\sqrt{2} +x\\
\end{array}
$
The integral can also be seen as the following:
\begin{align}
\int \frac{\tanh(x) \, dx}{\tanh(x) + sech(x)} &amp;= \int \frac{\sinh(x) \, dx}{\sinh(x) + 1} = \int \left( 1 - \frac{1}{1 + \sinh(x)} \right) \, dx \\
&amp;= x + \sqrt{2} \, \tanh^{-1}\left( \frac{1}{\sqrt{2}} \, \left(1 - \tanh\left(\frac{x}{2}\right) \right) \right)   
\end{align}