Notices
Results 1 to 6 of 6

Thread: Log question/help

  1. #1 Log question/help 
    Forum Freshman
    Join Date
    Aug 2007
    Posts
    8
    This question is semi-related to the square root question and I'm sure it has a similar answer, sorry if it's obvious lol

    K, so if you have a+bi enabled on your calculator (yes, I know I'm relying on my calculator lol), then it allows you to take logs of negative numbers.
    Now, is that at all correct, or is this similar/identical to the squares of negative numbers question I asked earlier?
    Thanks!

    Also, I swear I'm not a troll.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Bachelors Degree Demen Tolden's Avatar
    Join Date
    Sep 2007
    Location
    St. Paul, Minnesota, USA
    Posts
    475
    I'll try to answer this since I need to keep up practice with logs.

    First of all are you asking about the natural log, such as you might type in your calculater:
    Log[b]

    where b is a negative number? This of course would really mean
    log<sub>10</sub> b = c

    or more simply be written:
    ln b = c

    or are you asking if in the equation
    log<sub>a</sub> b = c

    that b can be a negative number? The first equation you could change around to say
    e<sup>c</sup> = b

    and any number of c that I know of that you could enter in would not give a negative b. Lets look at the second equation then
    log<sub>a</sub> b = c

    This you could change around to say
    a<sup>c</sup> = b

    And in this instance you could have a negative a and an odd c to retreive a negative b it seems.

    I'm sorry if I wasn't much help. Here is a link where serpico describes aspects of nonreal numbers in some length.

    http://www.thescienceforum.com/All-about-i-10211t.php

    and there is always wiki
    http://en.wikipedia.org/wiki/Imaginary_unit


    The most important thing I have learned about the internet is that it needs lot more kindness and patience.
    Reply With Quote  
     

  4. #3  
    Forum Professor serpicojr's Avatar
    Join Date
    Jul 2007
    Location
    JRZ
    Posts
    1,069
    NOTE: When I say "log" I mean "ln". At some point in your mathematical career, you'll just realize that you don't need a logarithm to any other base than e.

    This is indeed very similar to the square root question you asked before. The logarithm function is not well-defined on the complex numbers because every nonzero complex number has infinitely many valid choices for its logarithm.

    How does this happen? Well, we have to look at the log as the inverse function to the exponential. And it turns out that the exponential has a very nice definition over the complex numbers. We have (and I'm not sure why I didn't just state this in generality in the post Demen Tolden references):

    e<sup>a+bi</sup> = e<sup>a</sup>(cos(b) + i sin(b))

    Now every nonzero complex number is in the image of the exponential function: you can get all complex numbers z with |z| = 1 since cos(b) + i sin(b) traces out the unit circle as b ranges over the reals, and then you can multiply by an appropriate magnitude e<sup>a</sup> to get the complex number you want. What happens when you try to go backwards? Well, given a complex number z, we want to find real numbers a and b so that:

    z = x + iy = e<sup>a</sup>(cos(b) + i sin(b))

    Taking absolute values, we have:

    |z| = sqrt(x<sup>2</sup> + y<sup>2</sup>) = e<sup>a</sup>

    And the logarithm function is well-defined on positive real numbers (just like the square root function), so we can uniquely determine a from this relation, i.e.:

    a = log|z|

    Great. Now dividing by e<sup>a</sup>, we just need to find a b such that:

    ze<sup>-a</sup> = cos(b) + i sin(b)

    Well, I already said this exists, but for now let's just ignore exactly how we find it. The point I'd like to make is this is exactly where the ambiguity creeps in. Cosine and sine are periodic functions of period 2π. So:

    cos(b+2π) = cos(b)
    sin(b+2π) = sin(b)

    So if z = e<sup>a+ib</sup>, we also have z = e<sup>a+i(b+2π)</sup> and z = e<sup>a+i(b+4π)</sup> and, in general for any integer n, z = e<sup>a+i(b+2nπ)</sup>. So the logarithm of z could be any of the numbers a+i(b+2nπ).

    So how do we "fix" this? (And, again, this isn't something that really needs to be fixed--the "failure" of the log to be nice over the complex numbers leads to some fascinating mathematics.) Well, for positive real numbers, there's always a good choice for b, namely b = 0, so cos(0) = 1, sin(0) = 0. And if we just want to stick to reals, then we just get the usual log function.

    What is your calculator doing? Well, it's choosing a branch of the log. Specifically, it's saying, "When we calculate 'b' in 'log z = a + ib', we'll let it be a value in the interval (-π,π]." This gives you the usual log function when you restrict to real numbers. It'll give you, for negative real numbers -r (where r > 0):

    log(-r) = log(r) + iπ

    (In particular, if r = 1, we get:

    log(-1) = iπ

    Which is related to the wonderful formula:

    e<sup>iπ</sup>+1 = 0)
    Reply With Quote  
     

  5. #4  
    Forum Freshman
    Join Date
    Aug 2007
    Posts
    8
    Ok, so if I interpreted that right ( :? ) then the log of a negative number is acceptable, it's just complex?(whereas the square root wasn't acceptable)
    Reply With Quote  
     

  6. #5  
    Forum Professor serpicojr's Avatar
    Join Date
    Jul 2007
    Location
    JRZ
    Posts
    1,069
    No, sorry, I didn't mean to give that impression. I was trying to say:

    1. The functions log and sqrt have natural definitions on positive real numbers.

    2. Logarithms and square roots exist for all nonzero complex numbers, including real numbers. However, any nonzero complex has infinitely many logarithms, and any nonzero complex has two square roots.

    And I should have said:

    3. We can extend the functions sqrt and log to all nonzero complex numbers, but there isn't a unique way of doing so, since square roots and logarithms are not unique.

    So let's extend sqrt to all complex numbers. Given what I was saying about logarithms, we know that every complex number z can be written in the form:

    z = re<sup>it</sup>

    where r ≥ 0 and -π < t ≤ π. We can then define sqrt(z) to be:

    sqrt(z) = sqrt(r) e<sup>it/2</sup>

    And this gives us an extension of sqrt to all complex numbers. This gives, for example, sqrt(-1) = i. Note that, since -π < t ≤ π, we have -π/2 < t/2 ≤ π/2. You can show that this then implies that, if we write sqrt(z) = a+bi, then a > 0 (unless z is a negative real number, in which case a = 0). We would then say that this definition of sqrt(z) returns the square root of z that lies in the "right half-plane". What I just described is exactly analogous to taking logarithms log(z) = a + bi with -π < b ≤ π.

    And now I need to reiterate:

    4. If we extend the definition of the functions log and sqrt to all nonzero complex numbers, we lose the special properties of log and sqrt. Namely, we don't always have:

    sqrt(ab) = sqrt(a)sqrt(b)

    or:

    log(ab) = log(a)+log(b)

    You already gave an example of the first property failing. In the second case note:

    log(-1*-1) = log(1) = 0

    log(-1)+log(-1) = 2log(-1) ≠ 0

    No matter what you choose log(-1) to be, it can't be 0. Above, I chose log(-1) = πi, and certainly 2πi ≠ 0.

    But here's the catch--things aren't really all that messed up. In your example, you had:

    sqrt(-1*-1) = sqrt(1) = 1

    sqrt(-1)sqrt(-1) = i*i = -1

    Both results are square roots of 1! So although the function property doesn't work out, we at least have that the product of the square roots and the square root of the product are both valid square roots--just different ones because of the way we defined sqrt. Similarly, with my log example, 2πi is a valid logarithm of 1. So the logarithm of the product and the sum of the logarithms both return valid logarithms--just different ones because of the way we defined log.
    Reply With Quote  
     

  7. #6  
    Forum Freshman
    Join Date
    Aug 2007
    Posts
    8
    Oh ok, I see what you mean now. Thanks!
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •