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

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

1 Answer 1

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.