# What am I doing wrong with this Euler substitution?

I want to evaluate the integral $$\displaystyle\int\frac{1}{x\sqrt{x^2+2}}dx$$ using the substitution $$\sqrt{x^2+2}=-x+t$$.

So I get from the substitution $$x=\frac{t^2-2}{2t}$$, $$dx=\frac{t^2+2}{2t^2}dt$$ and $$\sqrt{x^2+2}=\frac{t^2+2}{2t}$$. Substituting all this in I get:

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

$$\displaystyle= 2\int\frac{1}{t^2-2}dt$$

$$\displaystyle=\frac{1}{\sqrt{2}}\int\frac{1}{t-\sqrt{2}}-\frac{1}{t+\sqrt{2}}dt$$

$$\displaystyle=\frac{1}{\sqrt{2}}\ln{\left(\frac{t-\sqrt{2}}{t+\sqrt{2}}\right)}+c$$

$$\displaystyle=\frac{1}{\sqrt{2}}\ln{\left(\frac{x+\sqrt{x^2+2}-\sqrt{2}}{x+\sqrt{x^2+2}+\sqrt{2}}\right)}+c$$

However the answer on Wolfram Alpha seems to be $$\displaystyle=\frac{1}{2\sqrt{2}}\ln{\left(\frac{\sqrt{x^2+2}-\sqrt{2}}{\sqrt{x^2+2}+\sqrt{2}}\right)}+c$$. I'm am completely new to these Euler substitutions so could someone check if I'd done it right?

• If this is not an assigment where you are required to use Euler's substitution,then you can also think of subsituting $x$ as $1/t$ or $\sqrt{2}\tan t$,because Euler's substitution is usually treated as last resort to integrate due to cumbersome calculations.
– user1012971
Mar 3, 2022 at 9:36
• @RamanujanXV This was like an introductory question, so it kept the numbers relatively nice while I try to get the hang of this substitution, didn't work through :( Mar 3, 2022 at 9:40
• @MatthewTowers Yes it was a typo Mar 3, 2022 at 9:46

Both the answers are correct as $${\left(\frac{x+\sqrt{x^2+2}-\sqrt{2}}{x+\sqrt{x^2+2}+\sqrt{2}}\right)}^2={\left(\frac{x^2+2+x\sqrt{x^2+2}-\sqrt{2x^2+4}-\sqrt{2}x}{x^2+2+x\sqrt{x^2+2}+\sqrt{2x^2+4}+\sqrt{2}x}\right)}={\left(\frac{\sqrt{x^2+2}-\sqrt{2}}{\sqrt{x^2+2}+\sqrt{2}}\right)}$$
It can be proved by using compendo-dividendo: ($$\frac{a}{b}=\frac{c}{d}\implies \frac{a+b}{a-b}=\frac{c+d}{c-d})$$
$${\left(\frac{x^2+2+x\sqrt{x^2+2}-\sqrt{2x^2+4}-\sqrt{2}x}{x^2+2+x\sqrt{x^2+2}+\sqrt{2x^2+4}+\sqrt{2}x}\right)}={\left(\frac{\sqrt{x^2+2}-\sqrt{2}}{\sqrt{x^2+2}+\sqrt{2}}\right)}$$
$$\implies$$ $${\left(\frac{x^2+2+x\sqrt{x^2+2}}{\sqrt{2x^2+4}+\sqrt{2}x}\right)}={\left(\frac{\sqrt{x^2+2}}{\sqrt{2}}\right)}$$