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?

    Thanks!!
     
  2. jcsd
  3. Oct 7, 2009 #2

    Hepth

    User Avatar
    Gold Member

    if its mathematica 6 or above

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

    Hepth

    User Avatar
    Gold Member

    and
    "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...
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Mathematica: Im[z] = 0 if z is real?
  1. 3D Z-Transform Matlab (Replies: 3)

Loading...