system
Given the following post, respond as if you're commenting on Reddit:
human
Logarithms of complex numbers? Logarithms with complex bases?

I was recently thinking about math, and I realized that I could use Euler's Identity [e^(ix) = cos(x) + i*sin(x)] to define logarithms of complex numbers. Here's how: those of you answering this question should know that any complex number a+bi can be transformed through Euler's identity into the form re^(ix), where r is the radius from the origin and x is the angle this radius makes with the real axis. This can be further transformed into e^[ln(r)+ix]. So if I have a complex number z = e^[ln(r)+ix], I can take the natural log of both sides to get ln(z) = ln(r) + ix

This, in itself, is crazy enough. I was taught all throughout grade 11 and 12 that you cannot take logs of negative numbers, yet this equation allows it and produces results consistent with each other and with Euler's formula. For example, the natural log of -1 is i(pi). The natural log of i is (1/2)i(pi); ln(i) is half of ln(-1), because i is the square root of -1.
I'm getting side tracked.

Evaluating the natural log of complex numbers allows for logs with complex bases. Start with ln(x) = y, then apply change of base formula by converting to exponential form {e^y = x}, taking a complex log of both sides {log_z(e^y) = log_z(x)}, using log properties to bring y out front {y*log_z(e) = log_z(x)}, then replace y with it's equivalent from the starting equation {ln(x)log_z(e) = log_z(x)}. So, a complex logarithms can be taken as long as we can evaluate log_z(e), which we can. Knowing that z = re^(ix) = e^[ln(r)+ix], the question is "What power should we put on e^[ln(r)+ix] to get e? The answer, of course, is 1/[ln(r)+ix]. So my equation from before becomes log_z(x) = ln(x)/[ln(r)+ix]. This allows lots of interesting things, like logs with negative or imaginary bases. 

I'm sorry if this comes off as rambling and not much like a question. My question is, is all of this mathematically valid? Has it been discovered already? Has it been discovered, but left undefined for the same reason that 0/0 is? Why do my teachers tell me I can't take logs of negative numbers?
gpt
Yes, all of this works, except there's one thing you haven't taken into account:

when you write z = re^(ix), that representation isn't unique, you could take x' = x + 2pi, and z = re^ix' as well. Thus, when defining the logarithm^(*), you have to be careful and take this into account. You can address this by saying "x is the angle between 0 and 2pi such that z = e^(ix) " or (more commonly) "x is the angle between -pi and pi such that z = e^(ix) ", or something like that. This is called a "branch cut" and is needed to prevent the function from being multi-valued (only one output for each input).

One final note, you still can't define the value of log(0).

\*: usually, in complex analysis and further mathematics, "log" is synonymous with "natural logarithm", since the base 10 logarithm isn't really special, important or needed.