Since \(\tanh(x) = \frac{\sinh(x)}{\cosh(x)}\):
\[ \int \tanh(x) \ dx = \int \frac{\sinh(x)}{\cosh(x)} \ dx \]
Let \(u = \cosh(x)\):
\[\begin{gathered} du = \sinh(x) \ dx \\ \int \tanh(x) \ dx = \int \frac{1}{u} \ du \end{gathered}\]
This means:
\[\int \tanh(x) \ dx = \ln|u| + C = \ln|\cosh(x)| + C\]
This is the integral of \(\tanh(x)\). As for \(\coth(x)\), let's start with:
\[ \int \coth(x) \ dx = \int \frac{\cosh(x)}{\sinh(x)} \ dx \]
Let \(u = \sinh(x)\):
\[\begin{gathered} du = \cosh(x) \ dx \\ \int \tanh(x) \ dx = \int \frac{1}{u} \ du \end{gathered}\]
This means:
\[\int \coth(x) \ dx = \ln|u| + C = \ln|\sinh(x)| + C\]