       Behavior of ComplexExpand

• To: mathgroup at yoda.physics.unc.edu
• Subject: Behavior of ComplexExpand
• From: Levent Kitis <lk3a at kelvin.seas.virginia.edu>
• Date: Wed, 4 Aug 93 17:34:27 -0400

```Does someone have an explanantion for the discrepancy between
Out and  Out?

In:= ComplexExpand[ Conjugate[ Exp[a I] ] ]

Out= Cos[a] + I Sin[a]

In:= ComplexExpand[ Exp[a I] ]

Out= Cos[a] + I Sin[a]

If a is replaced with a numerical value the same situation persists:

In:= ComplexExpand[ Conjugate[ Exp[2 I] ] ] == ComplexExpand[ Exp[2 I] ]

Out= True

But ComplexExpand works with a little help:

In:= ComplexExpand[ Conjugate[z], {z} ]

Out= -I Im[z] + Re[z]

In:= ComplexExpand[ Conjugate[z], {z}] /. {z -> Exp[2 I]}

Out= Cos - I Sin

and with a symbolic argument a:

In:= ComplexExpand[ Conjugate[z], {z}] /. {z -> Exp[a I]}

Out= -I Im[E^(I a)] + Re[E^(I a)]

In:= ComplexExpand[%]

Out= Cos[a] - I Sin[a]

and this too works:

In:= ComplexExpand[ Conjugate[Exp[a I]], {Exp[a I]}]

Out= Cos[a] - I Sin[a]

In:= ComplexExpand[ Conjugate[Exp[a I]], {a I}]

Out= Cos[a] + I Sin[a]

Why shouldn't In be equivalent to In ? All this in Version 2.0.

Levent

```

• Prev by Date: Nodal
• Next by Date: Re: Non-linear optimization