Ask Your Question

lfc's profile - activity

2020-10-23 21:51:59 +0200 commented answer Problem with factor and imag.

Great news!

2020-10-18 19:18:06 +0200 received badge  Nice Question (source)
2020-10-18 02:15:56 +0200 received badge  Student (source)
2020-10-17 22:45:08 +0200 asked a question Problem with factor and imag.

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?