Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Finding complex roots

So, what is the best way to find complex roots of polynomials?

I only found that one:

sage: from sage.rings.polynomial.complex_roots import complex_roots
sage: x=polygen(ZZ)
sage: complex_roots(1.3*x^3-x^2-5*x-1)
[(-1.479272103982880?, 1), (-0.2113935621844148?, 1),
(2.459896435398064?, 1)]

Should I use that? Isn't there an inbuilt function? Even PARI/GP has one, namely polroots...

And why is the x casted as an element of $\mathbb{Z}$, why not $\mathbb{C}$? Can somebody explain that to me?

Thank you!

Finding complex roots

So, what is the best way to find complex roots of polynomials?

I only found that one:

sage: from sage.rings.polynomial.complex_roots import complex_roots
sage: x=polygen(ZZ)
sage: complex_roots(1.3*x^3-x^2-5*x-1)
[(-1.479272103982880?, 1), (-0.2113935621844148?, 1),
(2.459896435398064?, 1)]

Should I use that? Isn't there an inbuilt function? Even PARI/GP has one, namely polroots...

And why is the x casted as an element of $\mathbb{Z}$, $\mathbb{Z}[X]$, why not $\mathbb{C}$? $\mathbb{C}[X]$? Can somebody explain that to me?

Thank you!

Finding complex roots

So, what is the best way to find complex roots of polynomials?

I only found that one:

sage: from sage.rings.polynomial.complex_roots import complex_roots
sage: x=polygen(ZZ)
sage: complex_roots(1.3*x^3-x^2-5*x-1)
[(-1.479272103982880?, 1), (-0.2113935621844148?, 1),
(2.459896435398064?, 1)]

Should I use that? Isn't there an inbuilt function? Even PARI/GP has one, namely polroots...

And why is the x casted as an element of $\mathbb{Z}[X]$, why not $\mathbb{C}[X]$? Can somebody explain that to me?

Thank you!