How to integrate $\int\frac{\sqrt{1+x^2}}{x}\,\mathrm dx$

I want to know how to integrate $$\int\frac{\sqrt{1+x^2}}{x}\,\mathrm dx$$

Could anyone solve it?

Thanks

-
What have you tried? –  Ahaan S. Rungta Dec 3 '13 at 15:28
Hint: Substitute $x = \tan \phi$. –  Ahaan S. Rungta Dec 3 '13 at 15:29
Use the substion $\sqrt{1+x^2}=t-x$. Now we have $x=\frac{t^2-1}{2t},$ $\sqrt{1+x^2}=\frac{t^2+1}{2t},$, and $dx=\frac{t^2+1}{2t^2}dt,$ and for the gven integral now we have $$\int\frac{\sqrt{1+x^2}}{x}=\int\frac{(t^2+1)^2 dt}{2t^2(t^2-1)}$$ –  Madrit Zhaku Dec 3 '13 at 15:46
@yes I have tried put x =tan(&) the it becomes sec^3(&)/tan(&) the it becomes 1/(sin(&)cos^2(&) so? –  user32104 Dec 3 '13 at 15:47
in the case $x=\tan(\phi)$ we have $$\int\frac{d\phi}{\sin\phi\cos^2\phi}$$ –  Madrit Zhaku Dec 3 '13 at 15:49

Let $x = \tan \theta \implies dx = \sec^2 \theta d\theta$

\begin{align} \int \frac{\sqrt{ 1 + x^2}}{x}\,dx & = \int\frac{d\theta}{\sin\theta\cos^2\theta}\\ \\ & = \int \csc \theta \sec^2\theta \,d\theta \\ \\ &= \int \csc \theta(1 + \tan^2\theta)\,d\theta \\ \\ & = \int \csc\theta \,d\theta + \int \csc\theta\tan^2 \theta \,d\theta \\ \\ & = \int \csc\theta \,d\theta + \int \dfrac{\sin\theta}{\cos^2 \theta}\,d\theta\end{align}

-
so what is the integral of these ? –  user32104 Dec 3 '13 at 15:59
For the second, use the substitution $u = \cos \theta \implies du = -\sin\theta \,d\theta$ to get $$\int -\dfrac{du}{u^2} = \dfrac 1u + C$$ –  amWhy Dec 3 '13 at 16:06
But $\int \csc \theta \, d\theta = -\ln \left( \csc \left( \theta \right) +\cot \left( \theta \right) \right) +C$. –  user64494 Dec 3 '13 at 16:10
@user64494 Thank you! Yes, I was working on the two integrals simultaneously and got mixed up on the first part of my comment. –  amWhy Dec 3 '13 at 16:13
See the original comment by amWhy here. –  user64494 Dec 3 '13 at 16:15

$$\int\frac{\sqrt{1+x^2}}{x}\,dx=\int\frac{x\sqrt{1+x^2}}{x^2}\,dx$$

Let $u=x^2+1, du =2x dx$. Then

$$\int\frac{\sqrt{1+x^2}}{x}\,dx= \frac{1}{2}\int\frac{\sqrt{u}}{u^2-1}\,du$$

If $v=\sqrt{u}$ the n $u=v^2, du=2vdv$. Thus

$$\int\frac{\sqrt{1+x^2}}{x}\,dx=\int\frac{v^2}{v^4-1}\,dv$$

By Partial Fraction Decomposition $$\frac{v^2}{v^4-1}=\frac{A}{v-1}+\frac{B}{v+1}+\frac{Cv+D}{v^2+1}$$

find $A,B,C,D$, and use $v=\sqrt{u}=\sqrt{x^2+1}$ and you are done.

-

Working backwards from an answer by WolframAlpha one obtains the following.

We set $u=\sqrt{x^2+1}$. Then $u^2=x^2+1$ and $2u\,du=2x\,dx$. Being careful not to forget that $u$ and $x$ are not independent variables we calculate \begin{align*} \int\frac {\sqrt{x^2+1}}x\,dx&= \int\frac ux\,dx=\int\frac{u-1}x\,dx+\int\frac1x\,dx= \int\frac{(u-1)u}{x^2}\,du+\int\frac1x\,dx =\\&= \int\frac{(u-1)u}{u^2-1}\,du+\int\frac1x\,dx = \int\frac{u}{u+1}\,du+\int\frac1x\,dx =\\&= \int 1-\frac{1}{u+1}\,du+\int\frac1x\,dx =\\&=u-\ln(u+1)+\ln x +C =\\&=\sqrt{x^2+1}-\ln\left(\sqrt{x^2+1}+1\right)+\ln x +C. \end{align*} This is admittedly not the most elegant solution.

I had meant to append the following to user64494's answer, but it was rejected as too big a change. Fair enough.

If one looks at Maple's solution one sees the two key steps: Substitute $u=\sqrt{x^2+1}$, use partial fraction decomposition afterwards. Using this one easily arrives at the following.

Differentiating $u^2=x^2+1$ yields $2u\,du=2x\,dx$ and hence \begin{align*} \int\frac{\sqrt{x^2+1}}x\,dx &= \int\frac ux\,dx = \int \frac{u^2}{x^2}\,du=\int\frac{u^2}{u^2-1}\,du =\int1+\frac{1/2}{u-1}+\frac{-1/2}{u+1}\,du \\&= u + \frac12\ln(u-1)-\frac12\ln(u+1) + C. \end{align*} Note that some people will frown at the integrals containing both $x$ and $u$, so one might want to avoid these.

-


-

You can change the form of the function to: $$\frac{1+x^2}{x^2} \frac{x}{\sqrt{1+x^2}}$$.

-

The Maple command $$Student[Calculus1]:-IntTutor(sqrt(x^2+1)/x, x)$$ does it step by step with explanation, producing $$\sqrt {{x}^{2}+1}+1/2\,\ln \left( \sqrt {{x}^{2}+1}-1 \right) -1/2\, \ln \left( \sqrt {{x}^{2}+1}+1 \right) .$$ See that link and the output for info.

-
The downvoters: Don't laugh the people. –  user64494 Dec 3 '13 at 16:02
I have seen your 'work' here user. Have you yet been accused of being a rep for Maple? I am just wondering if it has arisen. Do I think you are? No I don't. –  Jp McCarthy Dec 3 '13 at 16:06
Maple does it better. –  user64494 Dec 3 '13 at 16:07
That isn't what I asked you. –  Jp McCarthy Dec 3 '13 at 16:08
And I had wanted to answer wolframalpha.com/input/… –  Carsten Schultz Dec 3 '13 at 16:32