<s>[INST] Finding $\int \frac{d x}{x+\sqrt{1-x^{2}}}$. 
I have to calculate the following integral:
$$
\int \frac{d x}{x+\sqrt{1-x^{2}}}
$$

An attempt:$$
\begin{aligned}
\int \frac{d x}{x+\sqrt{1-x^{2}}} & \stackrel{x=\sin t}{=} \int \frac{\cos t}{\sin t+\cos t} d t \\
 &=\int \frac{\cos t(\cos t-\sin t)}{\cos 2 t} d t
\end{aligned}
$$
I find the solution is
$$\frac{\ln{\left(x + \sqrt{1 - x^{2}} \right)}}{2} + \frac{\sin^{-1}{\left(x \right)}}{2}+C$$
How can I get this without  trigonometric substitution?
 [/INST] Let $t=\frac{x}{\sqrt{1-x^2}} $, then $x=\frac{t}{\sqrt{1+t^2}}$ and $d x=\frac{1}{\left(1+t^2\right)^{\frac{3}{2}}} d t$, which transforms the integrand into a rational function.
$$
\begin{aligned}
\int \frac{d x}{x+\sqrt{1-x^{2}}} &=\int \frac{d t}{(1+t)\left(1+t^2\right)} \\
&=\frac{1}{2} \int\left(\frac{1}{1+t}+\frac{1-t}{1+t^2}\right) d t \\
&=\frac{1}{2}\left(\ln |1+t|+\int \frac{d t}{1+t^2}-\int \frac{t d t}{1+t^2}\right) \\
& =\left.\frac{1}{2}[\ln |1+t|+\tan ^{-1} t-\frac{1}{2} \ln \left(1+t^2\right)\right]+C \\
&=\frac{1}{2}\left[\ln \left|1+\frac{x}{\sqrt{1-x^2}}\right|+ \sin ^{-1} x-\frac{1}{2} \ln \left|1+\frac{x^2}{1-x^2}\right|+C\right.\\
&= \frac{1}{2}\left[\ln \left|x+\sqrt{1-x^2}\right|+\sin ^{-1} x\right]+C
\end{aligned}
$$
</s>