# Prove that $\arcsin(z)=\frac{\pi}{2}+i\log(z+i\sqrt{1-z^2})$

I'm stuck here:

Prove that $w=\arcsin(z)=\frac{\pi}{2}+i\log(z+i\sqrt{1-z^2})$

By using the definition of $z=\sin(w)$, I found that

$$\arcsin(z)=\frac{1}{i}\log(iz+\sqrt{1-z^2})$$

But where that $\frac{\pi}{2}$ comes from? How can I rearrange my expression to have $\frac{\pi}{2}+i\log(z+i\sqrt{1-z^2})$?

In order to get to the final expression you need to use the log identity:

$$\ln(a+b)=\ln(a)+\ln(1+\frac{b}{a})$$

$$\frac{1}{i}\left[\ln(iz+\sqrt{1-z^2})\right] = \frac{1}{i}\left[\ln(iz) + \ln\left(1+\frac{\sqrt{1-z^2}}{iz}\right)\right]$$

We know that when $z>0$,

$$\ln(iz)=\frac{i\pi}{2}+\ln(z)$$

Also, by doing some algebra:

$\ln\left(1+\frac{\sqrt{1-z^2}}{iz}\right) = \ln\left(1+\frac{i\sqrt{1-z^2}}{(-1)z}\right) = \ln\left(\frac{z}{z}-\frac{i\sqrt{1-z^2}}{z}\right)$

$= \ln\left(\frac{z-i\sqrt{1-z^2}}{z}\right)=\ln\left(z-i\sqrt{1-z^2}\right) - \ln(z)$

Putting it all together:

$\frac{1}{i}\left[\ln(z)+\frac{i\pi}{2}+\ln(z-i\sqrt{1-z^2}) -\ln(z)\right]$

$=\frac{\pi}{2}+\frac{i}{i^2}\ln(z-i\sqrt{1-z^2}) = =\frac{\pi}{2}-i\ln(z-i\sqrt{1-z^2})$

Doing some more algebra:

$-i\ln(z-i\sqrt{1-z^2}) = i \ln\left(\left(\frac{1}{z-i\sqrt{1-z^2}}\right)\left(\frac{z+i\sqrt{1-z^2}}{z+i\sqrt{1-z^2}}\right)\right)$

$= i\ln\left(\frac{z+i\sqrt{1-z^2}}{z^2-i^2(1-z^2)}\right)=i\ln(z+i\sqrt{1-z^2})$

Hence the expression is true:

$$\arcsin(z)=\frac{\pi}{2}+i\ln(z+i\sqrt{1-z^2})$$