Integral of $$$\tanh{\left(x \right)}$$$

The calculator will find the integral/antiderivative of $$$\tanh{\left(x \right)}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \tanh{\left(x \right)}\, dx$$$.

Solution

Rewrite the hyperbolic tangent as $$$\tanh\left(x\right)=\frac{\sinh\left(x\right)}{\cosh\left(x\right)}$$$:

$${\color{red}{\int{\tanh{\left(x \right)} d x}}} = {\color{red}{\int{\frac{\sinh{\left(x \right)}}{\cosh{\left(x \right)}} d x}}}$$

Let $$$u=\cosh{\left(x \right)}$$$.

Then $$$du=\left(\cosh{\left(x \right)}\right)^{\prime }dx = \sinh{\left(x \right)} dx$$$ (steps can be seen »), and we have that $$$\sinh{\left(x \right)} dx = du$$$.

So,

$${\color{red}{\int{\frac{\sinh{\left(x \right)}}{\cosh{\left(x \right)}} d x}}} = {\color{red}{\int{\frac{1}{u} d u}}}$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$${\color{red}{\int{\frac{1}{u} d u}}} = {\color{red}{\ln{\left(\left|{u}\right| \right)}}}$$

Recall that $$$u=\cosh{\left(x \right)}$$$:

$$\ln{\left(\left|{{\color{red}{u}}}\right| \right)} = \ln{\left(\left|{{\color{red}{\cosh{\left(x \right)}}}}\right| \right)}$$

Therefore,

$$\int{\tanh{\left(x \right)} d x} = \ln{\left(\cosh{\left(x \right)} \right)}$$

Add the constant of integration:

$$\int{\tanh{\left(x \right)} d x} = \ln{\left(\cosh{\left(x \right)} \right)}+C$$

Answer

$$$\int \tanh{\left(x \right)}\, dx = \ln\left(\cosh{\left(x \right)}\right) + C$$$A