$\arccos(i)=z$ (Complex Variables) Working through the Schaum's Complex variables outline. In problem 79 of chapter 2, I just do not know how this answer was obtained. I can get one answer using the famous formula for inverse cosine of a complex variable, but they have a second answer which is:$$2k\pi +\frac{3\pi}2 -i\ln(\sqrt{2}-1) $$
Please Help
 A: suppose $\arccos(i) = z,$ then $\cos z = \cos(x + iy) = \cos x \cosh y + i \sin x \sin h y = i  $  we get two equations 
$$ \cos x \cosh y = 0, \sin x \sinh y = 1$$ solutions are $x = \pm \pi/2 + 2k\pi$  and $ \sinh y = \pm 1$ solving $\sinh y = \pm 1$ you get $y = \ln(1+\sqrt 2), \ln(\sqrt 2 - 1)$  altogether you have $$x = \pm \pi /2 + 2k\pi, y = \ln(\sqrt 2 \pm 1)$$
A: Regarding herashefat's final comment, I wanted to post this to see what everyone thinks. Referencing herashefat's last comment pertaining to the solution above, "My question now is why I cannot get these 2 answers using this formula (which I believe was the intention of this chapter)...The formula is ArccosZ=-iln(z+root(zsquared-1))."
In other words, herashefat is asking how to get both solutions from the formula

$\cos^{-1}(z)=-i\log\big(z+(z^{2}-1)^{^{\frac{1}{2}}}\big)$.

This formula is in my book as well (I'm currently studying for an exam, and this very same problem arose as a practice problem...hence the reason why I wanted to post a solution); the book is by Edward Saff, $Fundamentals~of~Complex~Analysis,$ 3rd Ed. -- see PG.135.
Here's what I did...
$\cos^{-1}(z)=-i\log\big(i+(i^{2}-1)^{^{\frac{1}{2}}}\big)$
$~~~~~~~~~~~~~ = -i\log\big(i+(i^{2}-1)^{^{\frac{1}{2}}}\big)$
$~~~~~~~~~~~~~ = -i\log\big(i+(-2)^{^{\frac{1}{2}}}\big)$
$~~~~~~~~~~~~~ = -i\log\big(i\pm\sqrt{2}i\big)$  $~~~~~~~~~~~~$[[ Recalling both, distinct, square roots of $-2$ ]]
$~~~~~~~~~~~~~ = -i\bigg[\text{Log}\big(\big|i\big(1\pm\sqrt{2}\big)\big|\big)+i\big[\text{Arg}\big[i\big(1\pm\sqrt{2}\big)+2k\pi\big]\bigg]$, $~~$for all $k\in\mathbb{Z}$
$~~~~~~~~~~~~~ = -i\bigg[\text{Log}\big(\sqrt{3\pm 2\sqrt{2}}\big)+i\big(\pm\frac{\pi}{2}+2k\pi\big)\bigg]$
$~~~~~~~~~~~~~ = \pm\frac{\pi}{2}+2k\pi-i~~\!\!\text{Log}\big(\sqrt{3\pm 2\sqrt{2}}\big)$
$~~~~~~~~~~~~~ = \pm\frac{\pi}{2}+2k\pi+i~~\!\!\text{Log}\bigg(\dfrac{1}{\sqrt{3\pm 2\sqrt{2}}}\bigg)$.
Note, the capitalized "$\text{Log}$" signifies the real (single-valued) logarithmic function (as opposed to the complex, multi-valued, logarithmic function). Furthermore, in the sixth equality above, taking the absolute value of $i\big(1\pm\sqrt(2)\big)$ within the argument for the real logarithm, I carried out squaring the irrational numbers $1\pm\sqrt{2}$ within the overall square root, as opposed to the square root and the squared term canceling out, because we will end up with the $\text{Log}\big(1\pm\sqrt{2}\big)$, and the minus part is undefined (as $1-\sqrt{2}<0$). This gives different solutions compared to what the OP had asked and the solutions above; but, in light of herashefat's comment, we have two solutions as a result of (or driven out by) using the formula he specified that is referenced above in my solution (I'm guessing there may be some algebraic simplification that we can use to make everything look more familiar to the solutions above...maybe I'm wrong).
Overall, I want to see what everyone thinks in the process. Also, the $\pm$ within the $\pm\frac{\pi}{2}$ term may be unnecessary since the operation here is $\pm\frac{\pi}{2}+2k\pi$, for any $k\in\mathbb{Z}$; overall, I hope I didn't make a wrong move somewhere.
