Answer
$$2 \tan ^{-1}\left(\tanh \frac{x}{2}\right)+C$$
Work Step by Step
Given $$\int \operatorname{sech} x \, d x$$
Let $u=\tanh (x/2)$
$$ \cosh x=\frac{1+u^{2}}{1-u^{2}}, \quad \sinh x=\frac{2 u}{1-u^{2}}, \quad d x=\frac{2 d u}{1-u^{2}}$$
Then
\begin{aligned}
\int \operatorname{sech} x \, d x &=\int \frac{1-u^{2}}{1+u^{2}}\left(\frac{2 d u}{1-u^{2}}\right) \\
&=2 \int \frac{d u}{1+u^{2}} \\
&=2\left(\tan ^{-1} u+C\right)\\
&= 2 \tan ^{-1}\left(\tanh \frac{x}{2}\right)+C
\end{aligned}