Re: Simplify complex equation

*To*: mathgroup at smc.vnet.net*Subject*: [mg114447] Re: Simplify complex equation*From*: Herman Kuun <oomkoos1 at gmail.com>*Date*: Sat, 4 Dec 2010 06:16:34 -0500 (EST)

In q1 = Iz; There is no space between imaginary "I" and z Best On Fri, Dec 3, 2010 at 12:22 PM, mailcwc at gmail.com <mailcwc at gmail.com>wrote: > I tried the following code which attend to extract the real and the > imaginary part of q4. > z, s, f, s2 are all real numbers. > Why I get imaginary part in the first answer and zero in the 2nd > answer? > > > q1 = Iz; > q2 = q1 + s; > q3 = (q2 f)/(f - q2); > q4 = q3 + s2; > ComplexExpand[Re[q4]] > ComplexExpand[Im[q4]] > > Out = s2 + (f s)/(f - s - Iz) + (f Iz)/(f - s - Iz) > > Out = 0 > >