I need integrate this $\int_{} \frac{1}{\sqrt{1-z^2}-z} dz$ I don't know how to integrate this $\int_{} \frac{1}{\sqrt{1-z^2}-z}  dz$ I tried with suspstitution $ t=\sqrt{1-z^2}-z $ but it doesn't work. Please help!
 A: Let $\displaystyle I = \int\frac{1}{\left(\sqrt{1-z^2}-z\right)}dz\;,$ Put $z=\sin \phi\;,$ Then $dz = \cos \phi d\phi$
So we get $$I = \int\frac{\cos \phi}{\cos \phi - \sin \phi}d\phi = \frac{1}{2}\int \frac{(\cos \phi -\sin \phi)+(\cos \phi +\sin \phi)}{\cos \phi-\sin \phi}d\phi$$
So $$I = \frac{1}{2}\int 1\cdot  d\phi+\frac{1}{2}\int\frac{\cos \phi+\sin \phi}{\cos \phi-\sin \phi}d\phi$$
Now Put $\cos \phi-\sin \phi = t\;,$ Then $(\sin \phi+\cos \phi)d\phi = -dt$
So we get $$I = \frac{1}{2}\phi-\frac{1}{2}\int\frac{1}{t}dt = \phi-\ln|\cos \phi-\sin \phi|+\mathcal{C}$$
So we get $$I = \frac{1}{2}\sin^{-1}(z)-\frac{1}{2} \ln \left|\sqrt{1-z^2}-z\right|+\mathcal{C}$$
A: $$\int\frac{1}{\sqrt{1-z^2}-z}\space\text{d}z=$$

Substitute $z=\sin(u)$ and $\text{d}z=\cos(u)\space\text{d}u$. Then $\sqrt{1-z^2}=\sqrt{1-\sin^2(u)}=\cos(u)$ and $u=\sin^{-1}(z)$:

$$\int\frac{\cos(u)}{\cos(u)-\sin(u)}\space\text{d}u=$$
$$\int\frac{\sec^2(u)}{\sec^2(u)-\sec^2(u)\tan(u)}\space\text{d}u=$$
$$\int\frac{\sec^2(u)}{1-\tan(u)+\tan^2(u)-\tan^3(u)}\space\text{d}u=$$

Substitute $s=\tan(u)$ and $\text{d}s=\sec^2(u)\space\text{d}u$:

$$\int\frac{1}{-s^3+s^2-s+1}\space\text{d}s=$$
$$\int\left(\frac{s+1}{2(s^2+1)}-\frac{1}{2(s-1)}\right)\space\text{d}s=$$
$$\int\frac{s+1}{2(s^2+1)}\space\text{d}s-\int\frac{1}{2(s-1)}\space\text{d}s=$$
$$\frac{1}{2}\int\frac{s+1}{s^2+1}\space\text{d}s-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$
$$\frac{1}{2}\int\left(\frac{s}{s^2+1}+\frac{1}{s^2+1}\right)\space\text{d}s-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$
$$\frac{1}{2}\int\frac{s}{s^2+1}\space\text{d}s+\frac{1}{2}\int\frac{1}{s^2+1}\space\text{d}s-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$

Substitute $p=s^2+1$ and $\text{d}p=2s\space\text{d}s$:

$$\frac{1}{4}\int\frac{1}{p}\space\text{d}p+\frac{1}{2}\int\frac{1}{s^2+1}\space\text{d}s-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$
$$\frac{\ln\left|p\right|}{4}+\frac{1}{2}\int\frac{1}{s^2+1}\space\text{d}s-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$
$$\frac{\ln\left|p\right|}{4}+\frac{\tan^{-1}\left(s\right)}{2}-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$
$$\frac{\ln\left|p\right|}{4}+\frac{\tan^{-1}\left(s\right)}{2}-\frac{1}{2}\int\frac{1}{s-1}\space\text{d}s=$$

Substitute $w=s-1$ and $\text{d}w=\text{d}s$:

$$\frac{\ln\left|p\right|}{4}+\frac{\tan^{-1}\left(s\right)}{2}-\frac{1}{2}\int\frac{1}{w}\space\text{d}w=$$
$$\frac{\ln\left|p\right|}{4}+\frac{\tan^{-1}\left(s\right)}{2}-\frac{\ln\left|w\right|}{2}+\text{C}=$$
$$\frac{\ln\left|s^2+1\right|}{4}+\frac{\tan^{-1}\left(s\right)}{2}-\frac{\ln\left|s-1\right|}{2}+\text{C}=$$
$$\frac{\ln\left|\tan^2(u)+1\right|}{4}+\frac{\tan^{-1}\left(\tan(u)\right)}{2}-\frac{\ln\left|\tan(u)-1\right|}{2}+\text{C}=$$
$$\frac{\ln\left|\tan^2\left(\sin^{-1}(z)\right)+1\right|}{4}+\frac{\tan^{-1}\left(\tan\left(\sin^{-1}(z)\right)\right)}{2}-\frac{\ln\left|\tan\left(\sin^{-1}(z)\right)-1\right|}{2}+\text{C}=$$
$$\frac{1}{4}\left(-\ln\left|1-2z^2\right|+2\tanh^{-1}\left(\frac{z}{\sqrt{1-z^2}}\right)+2\sin^{-1}(z)\right)+\text{C}$$
