# How would you integrate $\sqrt{1+\frac{1}{x^2}}$ [duplicate]

I need to integrate $\sqrt{1+\frac{1}{x^2}}$

I've tried to let $u=1/x^2$ but end up with, $\int \frac{\sqrt{1+u^2}}{u^{3/2}}du$ . I attempted to then substitute $u=\tan\theta$ and lead me to $-\frac{1}{2}\int \frac{1}{(\sin\theta\cos\theta)^{3/2}}d\theta$.

Not sure how to progress from here. Is there any alternative way of doing this?

## marked as duplicate by Chris Culter, Claude Leibovici, Najib Idrissi, Martin Sleziak, kingW3Feb 14 '15 at 10:13

$$\int\sqrt{1+\frac{1}{x^2}}\,dx=\int \frac{\sqrt{1+x^2}}{x}\,dx=\int \frac{x\sqrt{1+x^2}}{x^2}\,dx$$ Let $1+x^2=u^2$ so that$$\int \frac{x\sqrt{1+x^2}}{x^2}\,dx=\int \frac{u^2}{u^2-1}\,du$$ hence we have that $$\int \frac{u^2}{u^2-1}\,du=u+\frac{1}{2}\ln |\frac{u-1}{u+1}|+c$$

user62498 gave you the good answer but, if I may, let me detail a bit more $$\frac{u^2}{u^2-1}=\frac{u^2-1+1}{u^2-1}=1+\frac{1}{u^2-1}$$ Now use partial fraction decomposition and show that $$\frac{1}{u^2-1}=\frac{1}{2 (u-1)}-\frac{1}{2 (u+1)}$$ Now, you have the the small pieces to make the integration easy.

Let $x=\tan y,y=\arctan x\implies-\dfrac\pi2\le y\le\dfrac\pi2$

$$\implies 1+\frac1{x^2}=\frac1{\sin^2y},dx=\frac{dy}{\cos^2y}$$

$$\int\sqrt{1+\frac1{x^2}}dx=\int\frac{dy}{|\sin y|\cos^2y}$$

$$=\text{sign of}(\sin y)\int\frac{\sin y\ dy}{(1-\cos^2y)\cos^2y}$$

Setting $\sin y=u,$

$$\int\frac{\sin y\ dy}{(1-\cos^2y)\cos^2y}=\int\frac{du}{u^2(1-u^2)}=\int\frac{du}{1-u^2}+\int\frac{du}{u^2}$$

Hope you can take it from here

Let $x=\cot\theta$, so $dx=-\csc^{2}\theta$ and $\displaystyle\int\sqrt{1+\frac{1}{x^2}} \;dx=\int\sec\theta \;(-\csc^{2}\theta) \;d\theta$.

Now let $u=\sec\theta$, $dv=-\csc^{2}\theta d\theta$ to get

$\int\sec\theta \;(-\csc^{2}\theta) \;d\theta=\sec\theta\cot\theta-\int\sec\theta\;d\theta=\csc\theta-\ln\lvert\sec\theta+\tan\theta\rvert+C$

$\displaystyle=\sqrt{x^2+1}-\ln\left|\frac{\sqrt{x^2+1}+1}{x}\right|+C$.

• This answer seems a bit off from the previous answers but +1 for the method regardless. – sachinruk Sep 17 '14 at 0:30
• Thanks - my answer does look different, but I checked the derivative before posting it. – user84413 Sep 17 '14 at 0:34