Problem:
Perform the following integration: $$ \int \dfrac{\sqrt{x^2+1}}{x} \,\, dx $$ Answer:
Let $I$ be the integral we are trying to evaluate. \begin{align*} I &= \int \sqrt{ 1 + \dfrac{1}{x^2} } \,\, dx \end{align*} Now, I will try letting $ x = -\cot \theta $. We have: \begin{align*} dx &= -\csc^2 \theta \,\, d\theta \\ I &= \int ( -\csc^2 \theta ) \sqrt{ 1 + \tan^2 \theta } \,\, d\theta \\ I &= \int ( -\csc^2 \theta ) \sqrt{ \sec^2 \theta } \,\, d\theta \\ I &= \int - \dfrac{1}{ \cos \theta \sin^2 \theta } \,\, d\theta \end{align*} Now, I feel stuck. I will try a different approach. I will use integration by parts with $u = \dfrac{ \sqrt{x^2+1} } {x}$ and $dv = dx$. We have: \begin{align*} du &= \dfrac{ x(2x)(x^2+1)^{\dfrac{-1}{2}} - \sqrt{x^2+1} } { x^2 } \,\, dx \\ \end{align*} I do not think integration by parts is going to work. What is the right way to evaluate this integral?
$\sqrt{x^2+1}=u^2$, $x^2=u^2-1$, $x=\sqrt{u^2-1}$, $dx=\frac{2udu}{2\sqrt{u^2-1}}$.
Then $\int \frac{\sqrt{x^2+1}dx}{x}=\int \frac{\sqrt{u^2}\times 2udu}{\sqrt{u^2-1} \times 2\sqrt{u^2-1}}=\int \frac{u^2 du}{u^2-1}=\int \frac{u^2-1+1}{u^2-1}du=\int du +\int \frac{du}{u^2-1}.$
This is easy.