In Algebra II, I learned that you cannot take the logarithm of a negative number. However, when visiting the topic again, I realized that the identity $e^{i \theta} = \cos{\theta} + i\sin{\theta}$ gives a way to solve for this.

Given the problem $\log_2 {x} + \log_2 (x+2) = 3.$ The given solution excluded -4 as extraneous. I plugged it in, getting $$\log_2 {8} + 2(\log_2 (-1)) = 3,$$ which resolves into $$2(\log_2 (-1)) = 0,$$ $$\frac{2(\log (-1)}{\log (2)} = 0.$$ I then used $e^{i\pi} = -1$, which follows that $\log (-1) = \frac{i\pi}{\ln (10)}$. When plugging back in the value of $\log (-1)$, I saw that everything had a real value except $i$, which then means $i = 0$. What am I doing wrong?

  • $\begingroup$ If I formatted something wrong or if you need clarification, please let me know. $\endgroup$
    – user192061
    Jan 21 '15 at 20:13
  • 1
    $\begingroup$ "Given the problem log2 (x) + log2 (x+2) = 3. The given solution excluded -4 as extraneous. I plugged it in, getting log2 (8) + 2[log2 (-1)] = 3" I'm not sure what you did here. $\endgroup$
    – Don Larynx
    Jan 21 '15 at 20:15
  • $\begingroup$ @AdamJamil you could use LaTeX to clean up the math quite a bit. For example, instead of "e^(i * theta) = cos(theta) + isin(theta)" try "e^{i \theta} = \cos(\theta)+i\sin(\theta)" . Wrap that expression in "$\$$" symbols (one or two one each side) to get $$e^{i \theta} = \cos(\theta)+i\sin(\theta)$$ $\endgroup$
    – graydad
    Jan 21 '15 at 20:17
  • 4
    $\begingroup$ How do you go from $\log_2(-4)+\log_2(-4+2)=3$ to $\log_2(8)+2\log_2(-1)=3$? $\endgroup$ Jan 21 '15 at 20:18
  • $\begingroup$ In addition to the questions about the $8$ and $-1$, I'll point something else out. Sometimes the formula $\log AB = \log A + \log B$ works for complex numbers, and sometimes it doesn't. The two sides always differ by a multiple of $2\pi i$, however this multiple need not be zero. The only way to avoid this problem would be to in some sense make $\log$ a "multivalued function." It would be somewhat similar to declaring that $\sqrt{4}$ can be both $2$ and $-2$. $\endgroup$
    – user208259
    Jan 21 '15 at 20:25

In the complex numbers, you can take the logarithm of negative numbers as you are thinking. Unfortunately, the answer is not unique because of the periodicity of $\sin$ and $\cos$. From $e^{i\theta}=\cos \theta + i\sin \theta$ you also get $e^{i(\theta+2\pi)}=\cos \theta + i\sin \theta$, so you can add any integral multiple of $2\pi i$ to the log and get another value. You can restrict the values of the integer part of the log function to an interval of length $2 \pi i$ (say to $[-\pi i,\pi i)$ )to make it single valued, similar to what we do with $\arcsin$ and $\arccos$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy