Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Extracting numerical value from a symbolic expression

Hi,

First of sorry for the title as I am not sure what should be the title of this question.

I used solve() command to solve a system of equations and got a result like this.

[[x1 == (4/3), x2 == (-1/6), x3 == (-1/6)]]

We can say that it is some vertex and I want to have a result as (4/3, -1/6, -1/6) or [4/3, -1/6, -1/6]. At the moment I am doing it manually. Is there any sage command that can automatically extract (4/3, -1/6, -1/6) from the solution [[x1 == (4/3), x2 == (-1/6), x3 == (-1/6)]].

Thanks in advance!