Analytical Integration of Arcsec x

We can integrate  
\[sec^{-1} x\]
  by parts by writing  
\[sec^{-1}x=1 \times sec^{-1}x\]
.
Let  
\[u=sec^{-1}x \rightarrow secu=x \rightarrow secutanu \frac{du}{dx}=1\]
  then  
\[\frac{du}{dx}= \frac{1}{secutanu} =\frac{1}{x \sqrt{sec^2 u-1}}=\frac{1}{x \sqrt{x^2-1}}\]
.
\[\frac{dv}{dx}=1 \rightarrow v=x\]

\[\begin{equation} \begin{aligned} \int 1 \times sec^{-1}xdx &= x sec^{-1}x - \int x \times \frac{1}{x \sqrt{x^2-1}}dx \\ &= x sec^{-1}x- \int \frac{1}{\sqrt{x^2-1}}dx \\ &= x sec^{-1}x -ln(x+\sqrt{x^2-1})+c \end{aligned} \end{equation}\]