Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

can sage return a list of numbers from solve() instead of expressions?

is there any builtin methods to have solve() return a list of numbers instead of the sequence of expressions that it does? which is to say solve(eqn, x) would return:

$[x_1, x_2, ...,x_n]$

instead of:

$[x == x_1, x == x_2, ... , x == x_n]$

or if there are not any built in functions recommended approaches? this is in a sage script im rating that at this point in the program is taking polynomials, computing their first and second derivatives, and adding the roots of those derivatives to a list, which needs to be iterable. if there does not exist some sage method or options for this, i believe i would need to revert to regex, which feels like im doing something wrong if thats what im having to do here