<s>[INST] How many ways to deal with the integral $\int \frac{d x}{\sqrt{1+x}-\sqrt{1-x}}$? I tackle the integral by rationalization on the integrand first.
$$
\frac{1}{\sqrt{1+x}-\sqrt{1-x}}=\frac{\sqrt{1+x}+\sqrt{1-x}}{2 x}
$$
Then splitting into two simpler integrals yields  $$
\int \frac{d x}{\sqrt{1+x}-\sqrt{1-x}}=\frac{1}{2}\left [\underbrace{\int\frac{\sqrt{1+x}}{x}}_{J} d x+\underbrace{\int\frac{\sqrt{1-x}}{x} d x}_{K}\right]
$$
To deal with $J$, we use rationalization instead of substitution. $$
\begin{aligned}
J &=\int \frac{\sqrt{1+x}}{x} d x \\
&=\int \frac{1+x}{x \sqrt{1+x}} d x \\
&=2 \int\left(\frac{1}{x}+1\right) d(\sqrt{1+x}) \\
&=2 \int \frac{d(\sqrt{1+x})}{x}+2 \sqrt{1+x} \\
&=2 \int \frac{d(\sqrt{1+x})}{(\sqrt{1+x})^{2}-1}+2 \sqrt{1+x} \\
&=\ln \left|\frac{\sqrt{1+x}-1}{\sqrt{1+x}+1} \right| +2 \sqrt{1+x}+C_{1}
\end{aligned}
$$
$\text {Replacing } x \text { by } -x \text { yields }$
$$
\begin{array}{l} \\
\displaystyle K=\int \frac{\sqrt{1-x}}{-x}(-d x)=\ln \left|\frac{\sqrt{1-x}-1}{\sqrt{1-x}+1}\right|+2 \sqrt{1-x}+C_{2}
\end{array}
$$
Now we can conclude that $$
I=\sqrt{1+x}+\sqrt{1-x}+\frac{1}{2}\left(\ln \left|\frac{\sqrt{1+x}-1}{\sqrt{1+x}+1}\right|+\ln \left|\frac{\sqrt{1-x}-1}{\sqrt{1-x}+1}\right|\right)+C
$$
My question is whether there are  any simpler methods such as integration by parts , trigonometric substitution, etc…
Please help if you have. Thank you for your attention.
 [/INST] Let $x=\cos 2 \theta$, for $0\leq 2\theta < \pi$, then $d x=-2 \sin 2 \theta d \theta$ and
$$
\begin{aligned}
I &=\int \frac{-2 \sin 2 \theta d \theta}{\sqrt{1+\cos 2 \theta-\sqrt{1-\cos 2 \theta}}} \\
&=-2 \int \frac{\sin 2 \theta d \theta}{\sqrt{2 \cos ^{2} \theta}-\sqrt{2 \sin ^{2} \theta}} \\
&=-\sqrt{2} \int \frac{\sin 2 \theta}{\cos \theta-\sin \theta} \cdot d \theta \\
&=-\sqrt{2} \int \frac{1-(\cos \theta-\sin \theta)^{2}}{\cos \theta-\sin \theta} d \theta \\
&=\sqrt{2}\left[\underbrace{\int\frac{d \theta}{\sin \theta-\cos \theta}}_{J}+\underbrace{\int(\cos \theta-\sin \theta) d \theta}_{K}\right]
\end{aligned}
$$
$$
\begin{array}{l}
\displaystyle J=\frac{1}{\sqrt{2}} \ln \left|\frac{\sin \theta-\cos \theta}{\sqrt{2}+\cos \theta+\sin \theta}\right|+C_{1} \\
\displaystyle I=\ln \left|\frac{\sin \theta-\cos \theta}{\sqrt{2}+\cos \theta+\sin \theta}\right|+\sqrt{2}(\sin \theta+\cos \theta)+C
\end{array}
$$
Since  $0\leq \theta < \dfrac{\pi}{2}$, putting $ \displaystyle \sin \theta=\sqrt{\frac{1-\cos 2 \theta}{2}}=\sqrt{\frac{1-x}{2}}$ $\textrm{ and }$
$\displaystyle \cos \theta=\sqrt{\frac{1+x}{2}}$ yields
$$
I=\sqrt{1-x}+\sqrt{1+x}+\ln \left|\frac{\sqrt{1-x}-\sqrt{1+x}}{2+\sqrt{1+x}+\sqrt{1-x}}\right|+C
$$
</s>