Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am curious as to why Wolfram|Alpha is graphing a logarithm the way that it is. I was always taught that a graph of a basic logarithm function $\log{x}$ should look like this:

enter image description here

However, Wolfram|Alpha is graphing it like this:

enter image description here

As you can see, there is a "real" range in the region $(-\infty, 0)$, and an imaginary part indicated by the orange line. Is there a part about log graphs that I am missing which would explain why Wolfram|Alpha shows the range of the log function as $\mathbb{R}$?

share|improve this question
3  
The graph on the negative side is the graph of the log as a complex valued function. Note that "$\log(-x)=\log (x) + \log(-1)$", and $\log(-1)$ is a complex number. You can figure easily which one if you are familiar with the Euler formula $e^{i \pi} =-1$. –  N. S. Jan 29 '12 at 23:54
add comment

2 Answers 2

up vote 3 down vote accepted

$\ln(x)$ is formally defined as the solution to the equation $e^y=x$.

If $x$ is positive, this equation has an unique real solution, anyhow if $x$ is negative this doesn't have a real solution. But it has complex roots.

Indeed, $\ln(x)= a+ib$ is equivalent to

$$x= e^{a+ib}= e^{a} (\cos(b)+i \sin (b)) \,.$$

If $x <0$ we need $e^{a}=|x|$, $\cos(b)=-1$ and $\sin(b)=0$.

Thus, $a= \ln(|x|)$ and $b=\frac{3\pi}{2}+2k\pi$....

share|improve this answer
    
Excellent! Thank you for the detailed explanation! –  spryno724 Jan 30 '12 at 0:07
add comment

As well as being an $\mathbb{R^+} \to \mathbb{R}$ function, the logarithm can also be extended to a multi-valued complex function. Wolfram Alpha interprets the logarithm as the complex logarithm, then restricts it to real line again for graphing. See http://enwp.org/wiki/Complex_logarithm for a full graph of the complex logarithm.

share|improve this answer
    
FYI, the link did not work for me. –  Emmad Kareem Jan 30 '12 at 0:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.