Integral of $\mathrm{sech}(x)$

calculusintegrationtrigonometric-integralstrigonometry

I have to take the following integral:
$$\int \mathrm{sech}(x)dx$$

I have decided to do the following substitution:

$$\int \frac{1}{\cosh(x)}dx$$
Then I proceed to the following manipulation:
$$\int \frac{\cosh(x)}{\cosh^2(x)}dx=\int \frac{\cosh(x)}{1+\sinh^2(x)}dx$$
Then I proceed to $u=\sinh(x)$, and $du=\cosh(x)dx$

$$\int \frac{du}{1+u^2}=\tan^{-1}(u)+C \\ =\tan^{-1}(\sinh(x))+C$$

Is my work is valid?
This way has not been done on the site so I did it.

Best Answer

One way to validate your own answer is by differentiating your result: $\newcommand{\sech}{\mathrm{sech}} \newcommand{\diff}{\frac{d}{dx}} \newcommand{\LHS} {(\tan^{-1}(\sinh(x))}$

$$\begin{align} \diff \LHS&=\diff\int \sech(x)dx = \sech(x) \\ \diff \LHS &= \frac{1}{1+\sinh^2(x)}\times\cosh(x) \\ \diff \LHS&=\frac{1}{\cosh{x}}=\sech(x)\end{align}$$

Because taking the derivative yielded the same result as the integrand, thus leading one to say that presented method is a valid one.