Ask Your Question

Revision history [back]

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar((-1)^(1/3))
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number, the other cubic roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar((-1)^(1/3))^2
sage: complex_cubic_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cubic_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar((-1)^(1/3))
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a a is a cubic root of some complex number, number (in your case -1), the other cubic roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar((-1)^(1/3))^2
sage: complex_cubic_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cubic_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar((-1)^(1/3))
QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cubic roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar((-1)^(1/3))^2
sage: complex_cubic_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cubic_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cubic roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar((-1)^(1/3))^2
QQbar(-1)^(2/3)
sage: complex_cubic_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cubic_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cubic cube roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar(-1)^(2/3)
sage: complex_cubic_roots complex_cube_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cubic_roots:
complex_cube_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cube roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar(-1)^(2/3)
sage: j == QQbar(e^(2*I*pi/3))
True
sage: complex_cube_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cube_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cube roots are a*j and a*j^2, where j=exp(2*I*pi/3). Hence you can define

sage: j = QQbar(-1)^(2/3)
sage: j == QQbar(e^(2*I*pi/3))
True
sage: 1+j+j^2 == 0
True
sage: complex_cube_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cube_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1

Fist, when you write

sage: a = (-1)^(1/3)

you define an element of the Symbolic Ring, which is not a safe place:

sage: a.parent()
Symbolic Ring
sage: a^2
1

So it is better to work on QQbar, the set of algebraic complex numbers.

sage: a = QQbar(-1)^(1/3)
sage: a.parent()
Algebraic Field
sage: a^2
-0.500000000000000? + 0.866025403784439?*I

Now, if a is a cubic root of some complex number (in your case -1), the other cube roots are a*j and a*j^2, where j=exp(2*I*pi/3)j=exp(2*I*pi/3)=(-1+I*sqrt(3))/2. Hence you can define

sage: j = QQbar(-1)^(2/3)
sage: j == QQbar(e^(2*I*pi/3))
True
sage: j == QQbar(-1+I*sqrt(3))/2 
True
sage: 1+j+j^2 == 0
True
sage: complex_cube_roots = [a, a*j, a*j^2]

and check

sage: for i in complex_cube_roots:
....:     print i, 'whose cube is', i^3
0.500000000000000? + 0.866025403784439?*I whose cube is -1
-1 whose cube is -1
0.500000000000000? - 0.866025403784439?*I whose cube is -1