Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica real part

  1. Feb 4, 2009 #1
    Dear all,

    I try to get the Real part of the following function in Mathematica:

    Code (Text):
    (-0.0006451572617131402 + 0.01297637024965604i)*
    Log[(1.3104275557173537 - 1.368518505178231i]) + x]

    by using Re[z]. However, it gives no solution other than just repetition of what I entered:

    Code (Text):
    Re[(-0.0006451572617131402 + 0.01297637024965604i)*
    Log[(1.3104275557173537 - 1.368518505178231i]) + x]]

    Any suggestions? Thanks in advance.

  2. jcsd
  3. Feb 5, 2009 #2
    You have a rogue square bracket in your logarithm.
  4. Feb 8, 2009 #3
    OK. Right, thank you.

    It was my "copy-paste fault". Must be like that:

    Code (Text):
    (-0.0006451572617131402 + 0.01297637024965604i)*
    Log[(1.3104275557173537 - 1.368518505178231i) + x]
    The problem is, I think, the lack of definition of x as real. But how? tried almost every way, no way? :(

  5. Feb 8, 2009 #4
    You have written the imaginary symbol "i" wrongly in your code. Replace it with a capital "I" or alternatively use the mathematica symbol for an imaginary number, which you can get by typing Esc, ii, Esc (Esc is the button Esc on the keyboard).

    Try either method and you should get the code to work.
  6. Feb 8, 2009 #5


    Staff: Mentor

    Also, you can use ComplexExpand to get a symbolic representation assuming that x is real.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?