Ask Your Question

Revision history [back]

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.