Integrate $\int \sqrt{\frac{1+x}{1-x}}dx$ using $x = \cos(u) $ I have to integrate $\int \sqrt{\frac{1+x}{1-x}}$ using $x = \cos(u)\Rightarrow dx = -\sin(u) du$
My attempts:
$$\int \sqrt{\frac{1+x}{1-x}}dx=\int \sqrt{\frac{(1+x)(1-x)}{(1-x)(1-x)}}dx=\int \frac{\sqrt{1-x^2}}{1-x}dx=\int \frac{\sqrt{1-x^2}}{1-x}dx$$
$$\int \frac{\sqrt{\sin^2(u)}}{1-\cos(u)}( -\sin(u))du=\int \frac{-\sin(u)^2}{1-\cos(u)}du=\int \frac{-(1 - \cos^2(u)) }{1-\cos(u)}du$$ , someone could help because i block here because i don't get the same resultat with this website

There are many ways, and a natural temptation is to exploit the fact that $g(z)=\frac{1-z}{1+z}$ is an involution, $g(g(z))=z$. In particular
$$ \int\sqrt{\frac{1+x}{1-x}}\,dx = \int \frac{dx}{\sqrt{g(x)}}\stackrel{x\mapsto g(z)}{=}\int\frac{g'(z)\,dz}{\sqrt{z}}\stackrel{z\mapsto u^2}{=}2\int g'(u^2)\,du =4\int\frac{du}{(1+u^2)^2}$$
and the last integral is elementary. By partial fraction decomposition or IBP
$$ \int\frac{du}{(1+u^2)^2}=C+\frac{1}{2}\left(\frac{u}{1+u^2}+\arctan u\right) $$
and now it is enough to substitute $u=\sqrt{g(x)}$ in the RHS.
