Ask Your Question
2

Problem with factor and imag.

asked 2020-10-17 20:56:49 +0100

lfc gravatar image

updated 2020-10-18 09:01:58 +0100

slelievre gravatar image

I'm new to SageMath, and I'm not sure what's going wrong.

Here are the commands I enter and results I get:

sage: a, b, z = var('a, b, z')
sage: P = a*x - b*x
sage: Q = a*imag(z) - b*imag(z)
sage: P.factor()
(a - b)*x
sage: Q.factor()
0

Why is Q factoring to 0?

edit retag flag offensive close merge delete

Comments

Weird. assume(z, 'complex') seems to help.

rburing gravatar imagerburing ( 2020-10-18 02:16:40 +0100 )edit

Also

sage: Q.simplify_full()                                                         
0
FrédéricC gravatar imageFrédéricC ( 2020-10-18 09:33:42 +0100 )edit

Possible serious bug. Advice requested on sage-devel.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-10-18 14:54:13 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-10-19 08:47:34 +0100

Emmanuel Charpentier gravatar image

This is now Trac#30793, discussed in sage-devel.

edit flag offensive delete link more

Comments

Great news!

lfc gravatar imagelfc ( 2020-10-23 21:51:59 +0100 )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

1 follower

Stats

Asked: 2020-10-17 20:56:49 +0100

Seen: 280 times

Last updated: Oct 19 '20