# Maple: simplifying Im(a+I*b) - why it does not work for me? [closed]

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))?

-

## closed as off topic by Grigory M, Asaf Karagila, LVK, sdcvvc, Old JohnAug 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.

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));

-