I'm looking for a general formula for solving a problem of the form $\log_x(y)$ when $y<0$. It seems like the formula is $\frac{\ln(|y|)+\pi i}{\ln(x)}$, but I would like to know how this is derived, or a proof for it. I got this this from looking at the answer of wolfram alpha, so this formula may not be correct.
-
Do you know functions of a complex variable? Otherwise this is not going to work... – DonAntonio Feb 21 '14 at 13:39
-
Vaguely, but you are free to include them in your answer. – recursive recursion Feb 21 '14 at 13:39
2 Answers
The complex logarithm function is defined as
$$\text{Log}\,z:=\log|z|+i\arg z\;\;,\;\;0\neq z\in\Bbb C$$
with $\;\log\;$ the usual, real logarithm.
But, as we know, the argument of a complex number is defined only up to an integer multiple of $\;2\pi\;$, so the above definition in fact gives us infinite possibilities.
Another fact, way more advanced, is that $\;z=0\;$ is an acute problem here, and every time we "go around" the origin we add (substract) a multiple of $\;2\pi\;$ to the number's argument, so in order to have a more or less nice logarithm function we must choose a complex "branch" for the function, and in this case this means to choose a chunck of the complex plane that we're going to "throw away" so that in the remaining domain the function's well and nicely defined. The main branch here is the non-negative real axis $\;\Bbb R_-:=\{z\in\Bbb C\;;\;\text{Re}\,z\le 0\}\;$ , and in $\;\Bbb C\setminus \Bbb R_-\;$ the function is well defined, continuous and all.
Please do observe then that $\;\text{Log}\,y:=\log|y|\;$ , for any real $\;y\;$
- 211,718
- 17
- 136
- 287
-
so in other words, the complex logarithm function is only not injective when the $a$ in $a+bi$ is $\leq 0$? – recursive recursion Feb 21 '14 at 14:14
There are problems when you try to $\log$ a negative value, and you will not be able to escape them. Look at the example when $x=e$. The problem is that $\ln y$ is defined as the real number $a$ for which $e^a=y$. As you may know, there is no real number $a$ for which $e^a$ would be negative, meaning that on the reals, $\ln y$ does not exist for negative indices.
If you look at complex values of $z$ and see which values $e^z$ can reach, things get complicated. Because $$e^{a+bi} = e^a(\cos b + i\sin b),$$ you can see that any number, except for $0$, can be reached with this function. However, because $$e^{a+(b+2\pi) i} =e^a(\cos (b+2\pi) + i \sin(b+2\pi))=e^a(\cos b + i\sin b) = e^{a+bi},$$ you now face a different problem. Unlike the real exponent function, this new complex function is not injective. This means it iw hard to define a function $\log$ to work on the whole convex plain. For example, if you are solving the equation $$e^z=y$$ where $y<0$ is a real number, then one solution is $\ln|y| + i\pi,$ but $\ln |y| + 3\pi i$, $\ln|y| + 5\pi i$ and $\ln |y| + (2k+1)\pi i$ in general all solve the same equation.
- 123,496
- 6
- 128
- 204
-
This function's injectivity holds for any logarithmic base? (not just $e$). That would make sense. But how do I determine what any solutions is? For example, how did you get $\ln(|y|) + \pi i$? – recursive recursion Feb 21 '14 at 14:02
-
Since $a^x = e^{x\cdot \ln a}$, the arguments above hold, similarly, for all bases.
If you want just a solution, then $z=\ln |y| + i\arg (y)$ always solves the equation $e^z=y$. Here, $\arg(y)$ is the angle (in radians) between $y$ (as a vector in $\mathbb C$) and $1$ (as a vector in $\mathbb C$). For example, for negative numbers, the angle is $180$ degrees or $\pi$ radians.
– 5xum Feb 21 '14 at 14:08