0
$\begingroup$

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]
Simplify[Conjugate[f]]

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

but for a more complex expression:

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

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

which is wrong. What can I do about it?

$\endgroup$
2
$\begingroup$

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@# &;

Then

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

gives

  a*E^(I*a) + b*E^(I*b)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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