Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

So I want to simplify z:=a+I*b; Im(z) where a, b are real variables So I try:

s:= 1+2*I
Im(s) // outputs 2
z:=a+I*b
Im(z) // outputs  Im(a+I*b)

So I wonder is it any how possible to simplify Im(z) so to get b as output (here we look at general case meaning z could be any complex expression from real values (like a, b, c etc and complex I))?

share|improve this question
add comment

closed as off topic by Grigory M, Asaf Karagila, LVK, sdcvvc, Old John Aug 29 '12 at 8:40

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

As J. M. suggested, Maple is unable to simplify Im(z) because it does not know that a and b are real. One solution is to use the assume() facility.

assume(a,real);
assume(b,real);
Im(a+b*I);

You can also use the evalc() function, because it assumes that all unknown variables represent real quantities.

evalc(Im(a+b*I));
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.