Show
$$
\int_{0}^{\infty} 1- \tanh x \, dx = \ln 2
$$
Solution
You are one the right track by writing the problem in exponential form.
Substitution
We have
$$
\tanh x = \frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}
$$
Use the substitution
$$
\color{blue}{u = \cosh x}, \qquad \color{blue}{du = \sinh x \, dx}
$$
The integral is now
$$
\int \tanh x \, dx = \int \frac{e^{x}-e^{-x}}{e^{x}+e^{-x}} dx
= \int \frac{du}{u} = \ln u
$$
The full integral is
$$
\int 1- \tanh x \, dx = x - \ln \cosh x
$$
Evaluate boundary terms
Take the limits
$$
\lim_{x\to \infty} \left( x - \ln \cosh x \right) = \lim_{x\to\infty} \left( x - \ln \frac{e^{x}}{2} \right) =
\lim_{x\to\infty} \left( x - \ln e^{x} + \ln 2 \right) = \ln 2
$$
The limit $x\to 0$ is trivial. The final answer is
$$
\boxed{
\int_{0}^{\infty} 1- \tanh x \, dx = \ln 2
}
$$