Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Let's see...

sage: f=x^2*((x+1/x)^2-1)

The roots are :

sage: f.roots(multiplicities=False)
[-sqrt(1/2*I*sqrt(3) - 1/2),
 sqrt(1/2*I*sqrt(3) - 1/2),
 -sqrt(-1/2*I*sqrt(3) - 1/2),
 sqrt(-1/2*I*sqrt(3) - 1/2)]

Therefore, the factorized polynom is :

sage: prod([x-u for u in f.roots(multiplicities=False)])
(x + sqrt(1/2*I*sqrt(3) - 1/2))*(x - sqrt(1/2*I*sqrt(3) - 1/2))*(x + sqrt(-1/2*I*sqrt(3) - 1/2))*(x - sqrt(-1/2*I*sqrt(3) - 1/2))

And the roots' products is:

sage: prod(f.roots(multiplicities=False)).expand()
1

Whereas moving to a polynomial ring, more specialized, is often useful, it is not necessary here...