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?

$\endgroup$
  • $\begingroup$ It's being interpreted as complex logarithm. See en.wikipedia.org/wiki/Complex_logarithm . $\endgroup$ – data May 28 '12 at 12:54
  • $\begingroup$ 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. $\endgroup$ – Michael Hardy May 28 '12 at 16:17
6
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ it does So I should treat it as incorrect if we didn't learn about complex numbers? $\endgroup$ – Templar May 28 '12 at 12:58
  • $\begingroup$ "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$ !! $\endgroup$ – DonAntonio May 28 '12 at 13:01
  • $\begingroup$ 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. $\endgroup$ – froggie May 28 '12 at 13:05
  • $\begingroup$ 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. $\endgroup$ – Gerry Myerson May 28 '12 at 13:12
  • $\begingroup$ 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. $\endgroup$ – DonAntonio May 28 '12 at 13:16
3
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ With slight modifications to deal with base-2 logarithms rather than the natural logarithm that froggie is writing about. $\endgroup$ – Gerry Myerson May 28 '12 at 13:01

Your Answer

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

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