Integrate with square root in square $\int \left(1 + \sqrt{\frac{x-1}{x+1}}\right)^2 dx$
How would you attack this? I've tried variable substitution with $t = \sqrt{\frac{x-1}{x+1}}$

OK
$$
t = \sqrt{\frac{x-1}{x+1}} \\
x = \frac{1+t^2}{1-t^2} \\
dx = \frac{4t}{(1-t^2)^2}\;dt = \frac{4t}{(1-t)^2(1+t)^2}\;dt \\
\int\left(1+\sqrt{\frac{x-1}{x+1}}\right)^2 dx =
\int (1+t)^2\frac{4t}{(1-t)^2(1+t)^2}\;dt
= \int \frac{4t}{(1-t)^2}\;dt \\
\qquad = \int\left(\frac{4}{t-1} + \frac{4}{(t-1)^2}\right) dt
= 4\log(t-1) - \frac{4}{t-1} +C
$$
and substitute back to get the answer in terms of $x$.
