Final step while integrating $\int\frac{dx}{x\sqrt{x^2+1}}$

I was solving a integration problem in which we have to integrate the following $$\int\frac{dx}{x\sqrt{x^2+1}}$$

I tried it lot , I think almost got the last step but the answer did not match. My try and the answer are as follows $$x=\frac1t,\quad dx=-\frac{dt}{t^2},$$ \begin{align} \int\frac{dx}{x\sqrt{x^2+1}}&=-\int\frac{dt}{\sqrt{1+4t^2}}\\ &=-\frac12\int\frac{dt}{\sqrt{\frac14+t^2}}\\ &=-\ln\left[t+\sqrt{\frac14+t^2}\right]+c \end{align} and the answer is $$\ln\left[\left(x+\frac12\right)+\sqrt{x^2+x+1}\right]+c.$$

• The answer you were given appears to be wrong. – smcc Jul 29 '16 at 11:36
• @smcc it might be – user123733 Jul 29 '16 at 11:37
• Yes indeed: that seems to be wrong, but differentiate it and check. – DonAntonio Jul 29 '16 at 11:37
• @DonAntonio how can i differentiate it – user123733 Jul 29 '16 at 11:50
• @user123733 You have to know perfectly well how to differentiate functions before you even begin with indefinite integrals (also known as anti-differentiation), otherwise it is going to be a very tough subject for you... – DonAntonio Jul 29 '16 at 13:07

$$\int\frac{dx}{x\sqrt{x^2+1}}$$ $$x=\frac{1}{t}$$ $$dx=-\frac{1}{t^2}dt$$ $$t^2dx=-dt$$ $$\int\frac{t^2}{\sqrt{1+t^2}}{dx}$$ $$\int\frac{-dt}{\sqrt{1+t^2}}$$

From the beginning, let $x= 2\tan \theta$. Then $dx = 2\sec^2\theta \, d\theta$, and $\sqrt{x^2+4}= \sqrt{4\tan^2\theta +4} =\sqrt{4\sec^2\theta} = 2\sec\theta.$

Then we have: $$\int\frac{dx}{x\sqrt{x^2+4}} = \int\frac{2\sec^2\theta\,d\theta}{2\tan\theta \cdot 2\sec\theta} = \dots$$

An idea:

$$t^2=x^2+4\implies t\,dt=x\,dx\implies dx=\frac{t\,dt}{\sqrt{t^2-4}}\implies$$

$$\int\frac{dx}{x\sqrt{x^2+4}}=\int\frac{t\,dt}{\sqrt{t^2-4}}\cdot\frac1{\sqrt{t^2-4}\,t}=\int\frac{dt}{t^2-4}=\frac14\left(\int\frac1{t-2}dt-\int\frac1{t+2}dt\right)=$$

$$=\frac14\;\log\frac{t-2}{t+2}+C=\frac14\;\log\frac{\sqrt{x^2+4}-2}{\sqrt{x^2+4}+2}+C$$

I already checked the above indeed is the primitive of the original integrand. Now you check that what you say the answer is also is a primitive...or not.

• What do you mean by primitive – user123733 Jul 29 '16 at 11:40
• @user123733 A function $\;F(x)\;$ is a primitive of a function $\;f(x)\;$ in some interval if $\;F'(x)=f(x)\;$ for all the values in that interval – DonAntonio Jul 29 '16 at 13:00

I'm not sure how you're going from your second last to your last step.

A better substitution would be $x^2 + 4 = y^2$.

The integral becomes $\int \frac{1}{y^2 - 4}dy$, which is easily solvable by partial fractions. Remember to reverse the substitution at the end to get the integral in terms of $x$.

• I have got the last step by taking t = tan b – user123733 Jul 29 '16 at 11:39
• Wouldn't it be $\sqrt{y^2-4}$ in the denominator? – tilper Jul 29 '16 at 11:40
• @tilper No, not after the substitution is completed, including the element of integration. – Deepak Jul 29 '16 at 12:28
• I see what I did wrong now. Put a pretend $x$ in the numerator. I need to stop using this site/app immediately after waking up. – tilper Jul 29 '16 at 12:51