Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to work with complexes and I want Mathematica to know that all variables are real unless I explicitly assigned the variable with an I so I wrote:

$Assumptions = Except[I,_] ∈ Reals

It worked fine for simple expressions

f = Exp[-I*a] * a + Exp[-I*b]

Exp[I*a] * a + Exp[I*b]

but for a more complex expression:

g = Exp[-I*a] * a + Exp[-I*b] * b

Exp[-I*a] * a + Exp[-I*b] * b

which is wrong. What can I do about it?

share|improve this question

You cannot use Except in $Assumptions like you do.
Just use ComplexExpand which assumes that are variables are real. E.g.:

conj = TrigToExp@ComplexExpand@Conjugate@# &;


  conj[ Exp[-I*a]*a + Exp[-I*b]*b ]


  a*E^(I*a) + b*E^(I*b)
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.