Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Understanding 'solve'

I do not quite understand how 'solve' works. Consider for example:

x = var('x')
for m in (3,5,7,9,11,13):
    c = cyclotomic_polynomial(m)
    print solve(SR(c), x)

The output is:

[ x == -1/2*I*sqrt(3) - 1/2, x == 1/2*I*sqrt(3) - 1/2]
[
x == -1/4*sqrt(5) - 1/2*sqrt(1/2*sqrt(5) - 5/2) - 1/4,
x == -1/4*sqrt(5) + 1/2*sqrt(1/2*sqrt(5) - 5/2) - 1/4,
x == 1/4*sqrt(5) - 1/2*sqrt(-1/2*sqrt(5) - 5/2) - 1/4,
x == 1/4*sqrt(5) + 1/2*sqrt(-1/2*sqrt(5) - 5/2) - 1/4
]
[ 0 == x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 ]
[
x == 1/2*I*sqrt(3)*(1/2*I*sqrt(3) - 1/2)^(1/3) - 1/2*(1/2*I*sqrt(3) - 1/2)^(1/3),
x == -1/2*I*sqrt(3)*(1/2*I*sqrt(3) - 1/2)^(1/3) - 1/2*(1/2*I*sqrt(3) - 1/2)^(1/3),
x == (1/2*I*sqrt(3) - 1/2)^(1/3),
x == 1/2*I*sqrt(3)*(-1/2*I*sqrt(3) - 1/2)^(1/3) - 1/2*(-1/2*I*sqrt(3) - 1/2)^(1/3),
x == -1/2*I*sqrt(3)*(-1/2*I*sqrt(3) - 1/2)^(1/3) - 1/2*(-1/2*I*sqrt(3) - 1/2)^(1/3),
x == (-1/2*I*sqrt(3) - 1/2)^(1/3)
]
[ 0 == x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 ]
[ 0 == x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 ]

Question: When can I expect a solution of the form "x == ..." and when not?