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

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

Related calculator: Integral Calculator

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$$$.

The integral becomes

$${\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