Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem with factor and imag.

Hi everyone!

I'm new to Sagemath, and I'm not sure what's going wrong. When I give the following commands

a,b,z = var('a,b,z') P = ax - bx Q = aimag(z)-bimag(z) show(P.factor()); show(Q.factor());

I get

(a−b)x 0

Why is Q factoring to 0?

Thanks for your help.

Problem with factor and imag.

Hi everyone!

I'm new to Sagemath, SageMath, and I'm not sure what's going wrong. When I give the following commands wrong.

a,b,z = var('a,b,z') P = ax - bx Q = aimag(z)-bimag(z) show(P.factor()); show(Q.factor());Here are the commands I enter and results I get:

I get

(a−b)x 0

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 Q factoring to 0?

Thanks for your help.0?