Integration using Euler $\int \frac{\sqrt{x^2+2x-1} }x\,dx$ I've just tried to use the Euler's formula for my integral, but I can't get the correct answer. So if anyone could help me I would really appreciate that.
This is my integral:
$$\int\frac{\sqrt{x^2+2x-1} }{x}\,dx$$
P.S. The ingral must be solven using Euler's formula
This is where I've got stuck:
I started with this substitution:
$$\sqrt{x^2+2x-1} = -x + t$$
After derivating I get $dx= t^2 + 2x -1 /2(t+1)^2$.
After immpleneting it into my integral, I get to this point
$$\int\frac{(t^2+2t-1)(t^2+2t-1)}{(t^2+1)2(t+1)^2}\,dt$$ I don't have any idea what I should do next (thought to do another substitution but don't know what to substitute).
 A: After we get $$\int\frac{(t^2+2t-1)(t^2+2t-1)}{(t^2+1)2(t+1)^2}\,dt$$
We can try to transform it into alternate form. Just let
$$\frac{(t^2+2t-1)(t^2+2t-1)}{(t^2+1)2(t+1)^2} = a + \frac{b}{t+1} + \frac{ct+d}{(t+1)^2} + \frac{e}{t^2+1}$$
We can reduct the right to a common denominator.Then compare the coefficient.
Or we can substitute some t then we can get a lot of linear equation then solve them.(For convinience, we can substitute $t=0$,$t=1$,$t=2$,$t=3$,$t=4$,then get five equations.) 
After solved, we get:
$$
\left\{
\begin{array}{c}
a=\frac{1}{2}\\
b=1\\
c=0\\
d=1\\
e=-2
\end{array}
\right.$$
Then it's tranformed into (I do it by WA)
$$\int\left(\frac{1}{2} + \frac{1}{t+1} + \frac{1}{(t+1)^2} - \frac{2}{t^2+1}\right)dt$$
And now we can get the answer:
$$\frac{t}{2} + ln(t+1) - \frac{1}{t+1} - 2arctan(t)$$
It's hard and boring to caculate. But it works(●'◡'●)
A: Before applying any substitutions, rewrite the integral as
\begin{align}
I=&\int\frac{\sqrt{x^2+2x-1} }{x}\,dx\\
= &\ \sqrt{x^2+2x-1} +\int \frac1{\sqrt{x^2+2x-1} }dx
- \int \frac1{x\sqrt{x^2+2x-1} }dx
\end{align}
Then, with the Euler substitution $\sqrt{x^2+2x-1} = t-x $
\begin{align}
&\int \frac1{\sqrt{x^2+2x-1} }dx=\int \frac1{1+t}dt =\ln|1+t|\\
&\int \frac1{x\sqrt{x^2+2x-1} }dx=\int \frac2{1+t^2}dt = 2\tan^{-1}t\\
\end{align}
As a result
\begin{align}
I= \sqrt{x^2+2x-1} +\ln\left|1+x+ \sqrt{x^2+2x-1}\right|\\
- 2\tan^{-1}(x+ \sqrt{x^2+2x-1})\\
\end{align}
A: Complete the square, then substitute. The subsequent partial fraction expansion is a slightly simpler.
$$\begin{align*}
I&= \int \frac{\sqrt{(x+1)^2-2}}{x}\,dx \\
&= \int \frac{\sqrt{y^2-2}}{y-1}\,dy & y=x+1\\
&= \frac12 \int \frac{(z^2-2)^2}{(z^2+2z+2)z^2} \, dz & z=\sqrt{y^2-2}-y \\
&= \frac12 \int \left(1-\frac2z+\frac2{z^2} - \frac{4}{1+(z+1)^2}\right) \, dz
\end{align*}$$
