The Student Room Group

Why can't my calculator do log -2(4) ?

I don't get why.
Original post by lhh2003
I don't get why.


Because logarithms cannot take in a negative number. (At A-Level, anyway)
Original post by lhh2003
I don't get why.

Needs a bigger calculator: https://www.wolframalpha.com/input/?i=Log%5B-2%2C+4%5D
Original post by RDKGames
Because logarithms cannot take in a negative number. (At A-Level, anyway)

Wait Logs can take negative values? (I’m not questioning the statement, just curious as I’ve not come across it, I’m at A-level), how does it work? Is it to do with complex numbers?
Reply 4

(-2)^2 = 4 , so what is with all the imaginary numbers in that calculator ? I don't do FM btw.
Original post by Physicsqueen
Wait Logs can take negative values? (I’m not questioning the statement, just curious as I’ve not come across it, I’m at A-level), how does it work? Is it to do with complex numbers?

Write the number in complex exponent form and it should be obvious what to do next
Original post by Physicsqueen
Wait Logs can take negative values? (I’m not questioning the statement, just curious as I’ve not come across it, I’m at A-level), how does it work? Is it to do with complex numbers?

Yes, it's to do with complex numbers.

Any complex number can be written as z=zeiargzz = |z|e^{i \arg z} therefore, taking logs means

logz=log(zeiargz)=logz+log(eiargz)=logz+iargz\log z = \log(|z|e^{i \arg z}) = \log |z| + \log (e^{i \arg z}) = \log |z| + i \arg z

But since argz\arg z can take on multiple values (we call them branches) then we can agree on the so-called principal value of logz\log z. This occurs when we only take the argument of zz to be over the interval π<argzπ-\pi < \arg z \leq \pi

Hence, we have the natural log of a complex number zz along the principal branch as:

Log z=logz+iArg z\mathrm{Log} \ z = \log |z| + i \mathrm{Arg} \ z

where the capital L and A letters symbolise that we are taking the principal branch value.

Anyway, once we have this established, it is clear that for z=2z = -2 we have

Log (2)=log2+πi\mathrm{Log} \ (-2) = \log 2 + \pi i

If you want other branches, just add/subtract 2π2\pi from the argument; hence really, it means that log(2)\log (-2) takes on infinitely many values of the form

log(2)=log2+(π+2πn)i\log (-2) = \log 2 + \left( \pi + 2 \pi n \right) i

where nZn \in \mathbb{Z}.
(edited 3 years ago)
Original post by lhh2003
(-2)^2 = 4 , so what is with all the imaginary numbers in that calculator ? I don't do FM btw.


Life gets more complicated when you take ordinary every day functions and start to think of them in terms of complex numbers (which is something that you have to do as soon as you start thinking about logarithms involving negative numbers).

Remember that answer that Wolfram gave:

https://www.wolframalpha.com/input/?i=Log%5B-2%2C+4%5D

Feed it back, raising (-2) to its power:

https://www.wolframalpha.com/input/?i=%28-2%29%5E%28Log%5B4%5D%2F%28I*Pi+%2B+Log%5B2%5D%29%29

and you get 4. Sort of suggest that there is more than one answer to the original question.

It turns out that you have to be very careful about what these sorts of things mean. For example, you can write a number like -2 as 2 x exp(-i x Pi), and therefore log(-2) = log(2) - i x Pi (where we're using natural logarithms). If you recall the formula for changing between bases of logarithms, you should now see where the imaginary numbers that Wolfram gave come from!

But why doesn't Wolfram give the "obvious" answer of 2 to the question "what is log(-2, 4)"? It's because complex logarithms are "many valued" unless you start doing things to make them single valued. When you start doing these things (in a particular way), all of a sudden the single values that you get are not necessarily the ones you might think you should get.
Reply 8
Original post by RDKGames
Yes, it's to do with complex numbers.

Any complex number can be written as z=zeiargzz = |z|e^{i \arg z} therefore, taking logs means

logz=log(zeiargz)=logz+log(eiargz)=logz+iargz\log z = \log(|z|e^{i \arg z}) = \log |z| + \log (e^{i \arg z}) = \log |z| + i \arg z

But since argz\arg z can take on multiple values (we call them branches) then we can agree on the so-called principal value of logz\log z. This occurs when we only take the argument of zz to be over the interval π<argzπ-\pi < \arg z \leq \pi

Hence, we have the natural log of a complex number zz along the principal branch as:

Log z=logz+iArg z\mathrm{Log} \ z = \log |z| + i \mathrm{Arg} \ z

where the capital L and A letters symbolise that we are taking the principal branch value.

Anyway, once we have this established, it is clear that for z=2z = -2 we have

Log (2)=2π2i\mathrm{Log} \ (-2) = 2 - \dfrac{\pi}{2}i

If you want other branches, just add/subtract 2π2\pi from the argument; hence really, it means that log(2)\log (-2) takes on infinitely many values of the form

log(2)=2(π2+2πn)i\log (-2) = 2 - \left( \dfrac{\pi}{2} + 2 \pi n \right) i

where nZn \in \mathbb{Z}.


You made a mistake for log(-2)
Original post by B_9710
You made a mistake for log(-2)

Whoops!
Reply 10
Original post by RDKGames
Whoops!

Even still
Original post by RDKGames
Yes, it's to do with complex numbers.

Any complex number can be written as z=zeiargzz = |z|e^{i \arg z} therefore, taking logs means

logz=log(zeiargz)=logz+log(eiargz)=logz+iargz\log z = \log(|z|e^{i \arg z}) = \log |z| + \log (e^{i \arg z}) = \log |z| + i \arg z

But since argz\arg z can take on multiple values (we call them branches) then we can agree on the so-called principal value of logz\log z. This occurs when we only take the argument of zz to be over the interval π<argzπ-\pi < \arg z \leq \pi

Hence, we have the natural log of a complex number zz along the principal branch as:

Log z=logz+iArg z\mathrm{Log} \ z = \log |z| + i \mathrm{Arg} \ z

where the capital L and A letters symbolise that we are taking the principal branch value.

Anyway, once we have this established, it is clear that for z=2z = -2 we have

Log (2)=log2+πi\mathrm{Log} \ (-2) = \log 2 + \pi i

If you want other branches, just add/subtract 2π2\pi from the argument; hence really, it means that log(2)\log (-2) takes on infinitely many values of the form

log(2)=log2+(π+2πn)i\log (-2) = \log 2 + \left( \pi + 2 \pi n \right) i

where nZn \in \mathbb{Z}.

Thank you :smile:

Quick Reply

Latest