Ask Your Question
2

Problem with factor and imag.

asked 4 years ago

lfc gravatar image

updated 4 years ago

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?

Preview: (hide)

Comments

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

rburing gravatar imagerburing ( 4 years ago )

Also

sage: Q.simplify_full()                                                         
0
FrédéricC gravatar imageFrédéricC ( 4 years ago )

Possible serious bug. Advice requested on sage-devel.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 4 years ago

Emmanuel Charpentier gravatar image

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

Preview: (hide)
link

Comments

Great news!

lfc gravatar imagelfc ( 4 years ago )

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: 4 years ago

Seen: 286 times

Last updated: Oct 19 '20