I was doing a problem, namely $\tan (x)= 3$, which I knew had real roots, by Euler's formula.
I got some results in the form: $-i\ln (a+bi)$ where $a$ and $b$ were constants.
However, one of my friends told me that $\ln(x)$ does not hold for complex values, in particular when calculating $\tan (x)$.
I had previously solved $\sin (x) = 2$ and $\cos (x) = 2$, and the values were predictably imaginary and seemed accurate enough (I verified them from Wolfram Alpha). So why should $\tan (x)$ not hold while $sin (x)$ and $ cos (x)$ did?
So I tried a very simple calculation by 2 approaches to see if they matched, namely: $$\cos (x) = \frac 12$$
Here is what I did:
The two approaches matched showing that $ln (x)$ does hold in the complex plane.
However I am not entirely sure if my working was right. Could anybody verify this for me? And could anybody explain why does it not hold while solving for $tan (x)$ (if it does not hold).
Thanks in advance!
https://www.wolframalpha.com/input/?i=ln+(1%2F2+%2B(i%2F2)sqrt3)
P.S. I am sorry but I could not type all that in mathjax. And please pardon me for my despicable handwriting. This was as good as I could write.