# simplify not working correctly with conjugate?

In my notebook environment when I do this :

var('v','a')
t=(I*a/2)*(v-conjugate(v))
(t**3).expand()


It gives me the correct result. However when I do :

(t**3).expand().simplify()


The answer I get is zero. Is this a bug, or is there something I don't understand about the simplify function? Additionally: Is there another, better way to simplify expressions with many conjugates?

edit retag close merge delete

Sort by ยป oldest newest most voted

Well, it seems that when using conjugate, you have to specify that the involved symbolic variables are complex. Indeed one has

sage: (x - conjugate(x)).simplify()
0
sage: v = var('v')
sage: (v - conjugate(v)).simplify()
0


(I am a little bit puzzled by this, since I thought Sage's symbolic variables are assumed complex by default)

But

sage: v = var('v', domain='complex')
sage: (v - conjugate(v)).simplify()
v - conjugate(v)


and

sage: v = var('v')
sage: assume(v, 'complex')
sage: (v - conjugate(v)).simplify()
v - conjugate(v)


So, regarding your example, you have to use var('a', 'v', domain='complex') in the first line.

more

Great, Thanks a lot!

( 2019-09-08 22:32:52 +0200 )edit