# Evaluating an integral with a $\sqrt{x^2+1}$ in it ; How to solve it?

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?

• One of the standard substitutions would be $x=\sinh t$, when $\sqrt{x^2+1}=\cosh t$, and $dx=\cosh t\,dt$. Did you try that? Commented Jul 24, 2023 at 11:32

Try $$x=\tan\theta$$ instead. Then the integrand becomes $$(\sec\theta\tan\theta+\csc\theta)\,\mathrm{d}\theta$$ which is straightforward.
$$\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}.$$
\begin{aligned}\int \frac{\sqrt{x^2+1}}{x} d x = & \int \frac{x^2+1}{x \sqrt{x^2+1}} d x \\ = & \int \frac{x^2+1}{x^2} d\left(\sqrt{x^2+1}\right) \\ = & \int\left(1+\frac{1}{x^2}\right) d\left(\sqrt{x^2+1}\right) \\ = & \sqrt{x^2+1}+\int \frac{d\left(\sqrt{x^2+1}\right)}{\left(\sqrt{x^2+1}\right)^2-1} \\ = & \sqrt{x^2+1}+\frac{1}{2} \ln \left|\frac{\sqrt{x^2+1}-1}{\sqrt{x^2+1}+1}\right|+C \end{aligned}
Continue from where you are stuck: $$I=\int -\frac{1}{\cos u \sin^2 u}\mathrm{d}u=-\int\frac{\sin^2u+\cos^2 u}{\cos u \sin^2 u}\mathrm{d}u =-\int \sec u \mathrm{d}u -\int\frac{\cos u}{\sin^2 u} \mathrm{d}u$$ and the last two integrals are elementary.