TITLE: Integration using Euler $\int{\sqrt{x^2+2x-1} }/{x}\,dx$
QUESTION [5 upvotes]: 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$$ and I don't have any idea what I should do next (thought to do another substitution but don't know what to substitute).

REPLY [3 votes]: 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(●'◡'●)