<s>[INST] How to evaluate $\int \frac{\sqrt{1+x}+\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}} dx$? I am trying to evaluate
$$\int \frac{\sqrt{1+x}+\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}} dx \quad (1)$$

The typical way to confront this kind of integrals are the conjugates i.e:
$$\int \frac{\sqrt{1+x}+\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}} dx  = $$
$$ \int \left(\frac{\sqrt{1+x}+\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}}\right)\left(\frac{\sqrt{1+x}+\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\right)\left(\frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}-\sqrt{1-x}}\right) dx = $$
$$\int \left(\frac{(\sqrt{1+x})^2-(\sqrt{1-x})^2}{(\sqrt{1+x})^2-(\sqrt{1-x})^2}\right)\left(\frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\right)dx = $$
$$\int 1*\left(\frac{\sqrt{1+x}-\sqrt{1-x}}{\sqrt{1+x}+\sqrt{1-x}}\right)dx $$
That's a dead end.

I also tried other conjugate approaches (only the numerator, only the denominator etc) with no better luck.
Any ideas?
 [/INST] Substitute $x$ with $\cos{2\theta}$.
The above integral will simplify to:
$-2\int \frac{\cos\theta + \sin\theta}{\cos\theta - \sin\theta} \sin{2\theta} \mathrm d\theta $.
Then you can use integration by parts.
Note that: $-\mathrm d(\cos\theta - \sin\theta) = (\cos\theta + \sin\theta) \mathrm d\theta$.
</s>