Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Logs of negative numbers.

  • 12-11-2005 9:06pm
    #1
    Registered Users, Registered Users 2 Posts: 443 ✭✭


    My maths book, she tells me you can't get the log of a negative number! Yet-2^3=-8
    => log(-2)-8=3....

    That makes perfect sense to me... So what am I thinking wrong?


Comments

  • Registered Users, Registered Users 2 Posts: 1,080 ✭✭✭Crumbs


    My maths book, she tells me you can't get the log of a negative number!
    Unless your base is negative, as in your example.
    To the base 10 or base e, you can't.

    Edit: Actually, thinking about it more, it's a bit more complicated than that. There are reasons you can't use negative bases due to it leading into complex numbers.


  • Closed Accounts Posts: 1,829 ✭✭✭JackieChan


    Edit: Actually, thinking about it more, it's a bit more complicated than that. There are reasons you can't use negative bases due to it leading into complex numbers.
    This would only cause a problem if you were working in non-complex dimensions(eg Reals,Integers,Rationals).


  • Closed Accounts Posts: 281 ✭✭incisor71


    Crumbs wrote:
    Unless your base is negative, as in your example.
    To the base 10 or base e, you can't.

    Edit: Actually, thinking about it more, it's a bit more complicated than that. There are reasons you can't use negative bases due to it leading into complex numbers.
    I know this isn't directly related to the original logarithms question, but because exponents and logarithms are complementary operations, I thought I'd drop this into the discussion...

    I stumbled across a footnote in one of the O'Reilly books "Learning Perl" (strangely enough) that, if you want to avoid the complex numbers domain, you may raise a negative value only to an integer-value exponent, such as the example cited above (-2)^3 = 8 or (-3.5)^3 = -12.25.

    If you wanted to raise a negative value to a non-integer exponent like so: (-2)^2.5 you'd have to split up the operation as follows:

    (-2)^2.5 = (-2)^2 * (-2)^0.5
    = 4 * (-1)^0.5 * (2)^0.5


    and since (-1)^0.5 = i, then the result is

    = 4 * (2)^0.5 i
    ......which is a purely imaginary number.

    I don't know how one would handle computation of (-1)^0.3 or some other exponent that's not a multiple of 0.5, but no doubt some enlightened soul can inform me/us.

    So it appears that one can obtain the logarithm of certain negative numbers, but even then only under very restricted conditions.


  • Registered Users, Registered Users 2 Posts: 1,372 ✭✭✭silverside


    you can get a log of anything

    say x = ||x|| (cos theta + i sin theta)

    remember your argand diagrams

    then log x = log ||x|| + i (theta + 2n pi ).

    http://mathworld.wolfram.com/Logarithm.html

    of course to raise things to powers, do the same in reverse. the basic idea (for complex numbers and integer powers) is in the leaving cert course , from what i remember


  • Closed Accounts Posts: 281 ✭✭incisor71


    silverside wrote:
    you can get a log of anything

    say x = ||x|| (cos theta + i sin theta)
    Ah yes, Euler's identity... forgot completely about that one (how embarrassing, seeing as my first Masters degree involved a lot of DSP)! Thank you. :)


  • Advertisement
  • Closed Accounts Posts: 281 ✭✭incisor71


    silverside wrote:
    of course to raise things to powers, do the same in reverse. the basic idea (for complex numbers and integer powers) is in the leaving cert course , from what i remember

    Euler stated that cos theta + i sin theta = exp (i theta).

    Tell me if this looks to you (re-using the previous example, where I want to raise -2 to the power of 2.5):

    Find the mag/arg, or polar representation, of -2, which in this case is:

    2*exp (i*PI).

    or -2, at an angle of PI on the Argand diagram.

    Raise both mag and arg to the power of 2.5, which gives:

    mag = 2^2.5 = 4*[2^0.5]
    arg = {exp (i*PI)}^2.5 = exp (i*2.5PI) = exp (i*0.5PI) = cos (0.5PI) + i sin (0.5PI) = = 0 + i


    Combine them to yield:

    mag/arg = {4*[2^0.5]} i

    = 5.6568 i
    as before. Seems ok to me! :)


Advertisement