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

Mathematica: Im[z] = 0 if z is real?

  1. Oct 6, 2009 #1
    Hi there!

    A stupid question maybe but I've found this issue neither in the Mathematica documentation nor in the web:

    I specified Element[z, Reals] but if I want to evaluate Im[z], Mathematica just says Im[z] again instead of 0. I tried Simplify, FullSimplify and Evaluate but nothing worked. I also tried Simplify[Im[z], Assumptions->{Element[z, Reals]}] but this didn't work either. Any ideas?

  2. jcsd
  3. Oct 7, 2009 #2


    User Avatar
    Gold Member

    if its mathematica 6 or above

    $Assumptions = z \[Element] Reals;
  4. Oct 7, 2009 #3


    User Avatar
    Gold Member

    "Simplify[Im[x], Assumptions -> {Element[x, Reals]}]"

    works on my version. says 0.
  5. Oct 7, 2009 #4
    Thanks!! Simplify[Im[z], Assumptions -> {Element[z, Reals]}] now works fine... I don't know what I did yesterday...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook