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?


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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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