Ask Your Question

simplify not working correctly with conjugate?

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

Rutger gravatar image

In my notebook environment when I do this :


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


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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-08 21:52:19 +0200

eric_g gravatar image

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()
sage: v = var('v')
sage: (v - conjugate(v)).simplify()

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


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


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.

edit flag offensive delete link more


Great, Thanks a lot!

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

Your Answer

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

Add Answer

Question Tools


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

Seen: 330 times

Last updated: Sep 08 '19