Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does Sage fail to recognize 1 + ( 1/2 + i*sqrt(3)/2 )^3 = 0 ?!

The following code:

print( 1 + ( 1/2 + i*sqrt(3)/2 )^3 )
print( simplify( 1 + ( 1/2 + i*sqrt(3)/2 )^3) )
print( N(1 + ( 1/2 + i*sqrt(3)/2 )^3) )

Results in the output:

(1/2*I*sqrt(3) + 1/2)^3 + 1
(1/2*I*sqrt(3) + 1/2)^3 + 1
2.22044604925031e-16 + 1.11022302462516e-16*I

but I'd expect the middle one, and perhaps even the first one, to be just "0." I think this means that there is something which I don't understand about how these expressions are handled.

Why does Sage fail to recognize 1 + ( 1/2 + i*sqrt(3)/2 )^3 = 0 ?!

The following code:

print( 1 + ( 1/2 + i*sqrt(3)/2 )^3 )
print( simplify( 1 + ( 1/2 + i*sqrt(3)/2 )^3) )
print( N(1 + ( 1/2 + i*sqrt(3)/2 )^3) )

Results in the output:

(1/2*I*sqrt(3) + 1/2)^3 + 1
(1/2*I*sqrt(3) + 1/2)^3 + 1
2.22044604925031e-16 + 1.11022302462516e-16*I

but I'd expect the middle one, and perhaps even the first one, to be just "0." I think this means that there is something which I don't understand about how these expressions are handled.

Why does Sage fail to recognize 1 + ( 1/2 + i*sqrt(3)/2 )^3 = 0 ?!

The following code:

print( 1 + ( 1/2 + i*sqrt(3)/2 )^3 )
print( simplify( 1 + ( 1/2 + i*sqrt(3)/2 )^3) )
print( N(1 + ( 1/2 + i*sqrt(3)/2 )^3) )

Results in the output:

(1/2*I*sqrt(3) + 1/2)^3 + 1
(1/2*I*sqrt(3) + 1/2)^3 + 1
2.22044604925031e-16 + 1.11022302462516e-16*I

but I'd expect the middle one, and perhaps even the first one, to be just "0." I think this means that there is something which I don't understand about how these expressions are handled.