4
$\begingroup$

As far as I know for $\log_2 x$ to be defined $x$ must be higher than 0. However when I enter $2^{\log_2(-5)}$ into wolframalpha it gives result $-5$. Is it mistake?

  • 0
    It's being interpreted as complex logarithm. See http://en.wikipedia.org/wiki/Complex_logarithm .2012-05-28
  • 0
    I just entered 2^(log_2(0)) into Wolfram Alpha and it gave me $0$. Then I tried 1^(log_1(2)) and it said it's indeterminate. Then I tried log_1(2) and it said $\tilde{\infty}$, i.e. $\infty$ with a tilde over it.2012-05-28

2 Answers 2

6

Yes...and, no.

There are ways to define $\log_2(-5)$. They require knowing something about complex numbers. And if you use one of those ways to define $\log_2(-5)$, then $2^{\log_2(-5)}=-5$.

Now, if WA says $2^{\log_2(0)}=0$, then I'll be worried.

  • 1
    it does So I should treat it as incorrect if we didn't learn about complex numbers?2012-05-28
  • 0
    If you haven't done complex numbers, then there is no sensible way for you to define $\log_2(-5)$, hence, no sensible way for you to define $2^{\log_2(-5)}$. The answer WA gives is --- for your purposes --- incorrect.2012-05-28
  • 0
    btw, WA does say that $e^{\ln 0}=0$, which makes no sense.2012-05-28
  • 0
    @Dennis, if it's viewed as shorthand for $\lim_{x\to0}e^{\log x}=0$, then it makes sense --- but I don't like it.2012-05-29
  • 0
    "Now, if WA says $2^{\log_2 (0)} =0$ , then I'll be worried. " ...and it actually does! It is a huge mistake, both the OP's input and yours, based on the fact that $\,\displaystyle{a^{\log_ax}}=x...\forall x >0$ !!2012-05-28
  • 0
    I'm not too bothered by this, personally. The function $z\mapsto 2^{\log_2 z}$ is defined and equal to the identity away from $0$, so it is natural to remove the hole at $0$ by defining $2^{\log_2 0} = 0$. I guess one should be aware that this has been done, though.2012-05-28
  • 0
    Indeed, yet WA call $\log$ the natural logarithm. No mention of the complex one, which should also make clear, imo, what branch it is choosing. Thus I assume WA is taking real logarithms and then it is a mistake.2012-05-28
  • 0
    if I specify log_2 it's clearly not a natural logarhitm?2012-05-28
  • 0
    WA uses the change of basis: $\,\displaystyle{\log_2x=\frac{\ln x}{\ln 2}}\,$ and then they call $\ln$ the natural logarithm...2012-05-28
3

It is not a mistake, though you are right to be worried. What they are using is the complex logarithm. It is possible to define logarithms $\log z$ of any nonzero complex number $z$, just by saying that $\log z$ is a complex number $w$ with the property that $e^{w} = z$. Unfortunately there are infinitely many such solutions, so there are infinitely many logarithms $\log z$ of $z$. By definition, though, they all have the property that $e^{\log z} = z$, which is what wolframalpha gave you.

  • 0
    With slight modifications to deal with base-2 logarithms rather than the natural logarithm that froggie is writing about.2012-05-28