Integration by parts for $\tanh(x)$

131 Views Asked by At

Can you integrate $\tanh(x)$ by parts?

I realize it's probably easier to use a derivative substitution, but can it be done?

Essentially I just want some clarification that I'm using integration by parts correctly.

$u=\tanh(x)$, $u'=sech^2(x)$

$v=x$, $v'=1$

$$\int uv' = uv - \int u'v$$ $$\int \tanh(x)\,dx = x\,\tanh(x) - \int x\, sech ^2(x)\,dx$$

1

There are 1 best solutions below

0
On

Why not simply proceed as follows? \begin{align*} \int \tanh(x) dx &=\int \frac{e^x+e^{-x}}{e^x-e^{-x}} dx\\ &=\int \frac{d(e^x-e^{-x})}{e^x-e^{-x}}\\ &=\ln\, \left|\,e^x-e^{-x}\right| + C\\ \end{align*}