| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168822Image: ubuntu2004
Sage takes an interesting approach to solving for the roots of polynomials using the roots() function. It returns a 2-tuple for each root. The first number is the root and the second is its multiplicity. So if roots() returns
[(2, 2), (-I, 1)]
that means that the polynomial has three roots, 2, 2, and -√1.
[(-3, 1), (-2, 1)]
[(-I, 1), (I, 1)]
[(-2/3*I*sqrt(2) - 1/3, 1), (2/3*I*sqrt(2) - 1/3, 1)]