Ask Your Question

# 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

## 1 Answer

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

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2019-09-08 18:55:07 +0200

Seen: 124 times

Last updated: Sep 08 '19