Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to evaluate the following:

Simplify[Meter Nano Re[(a + I b)/(Meter Nano)], Assumptions -> Element[{a, b}, Reals]]

However, Mathematica returns:

Meter*Nano*Re[(a + I*b)/(Meter*Nano)]

And if I try:

Convert[Meter Nano Re[(a + I b)/(Meter Nano)], 1]

I get the error:

Convert::incomp: "Incompatible units in Meter Nano Re[(a+I b)/(Meter Nano)] and 1."

How can I factor out the "Meter Nano" from within Re[] and simplify the above to:


One solution:

As suggested by rcollyer, use ComplexExpand:

ComplexExpand[Meter Nano Re[(a + I b)/(Meter Nano)]]

which gives


Note: ComplexExpand, as written above, assumes a and b are Reals.

share|improve this question
Have you tried ComplexExpand? –  rcollyer Apr 2 '13 at 3:26
thanks rcollyer! ComplexExpand works. –  Sunil Sandhu Apr 2 '13 at 3:32
Please use the code markup, as per my edits, to display code. $\TeX$, while pretty, does not copy well. –  rcollyer Apr 2 '13 at 3:41

1 Answer 1

up vote 1 down vote accepted
ComplexExpand[Meter Nano Re[(a + I b)/(Meter Nano)]]


As a side note: in v9, the Miscellaneous`Units` package that you are using (and which you don't mention in your question) has been superseded by the new built-in unit system. The above expression would have been simplified without Simplify:

Quantity[1, "Nanometers"]Re[Quantity[a + I*b, "Nanometers"^(-1)]] 

-Im[b] + Re[a]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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