Hi,

> Q1. How can I extract elements from a solution set?
>
> For example, consider:
>
> sage: x, y = var('x, y')
> sage: solve([x+y==6, x-y==4], x, y)
> [[x == 5, y == 1]]
Like this:

sage: sol = solve([x+y==6, x-y==4], x, y)
sage: sol[0]
[x == 5, y == 1]
sage: sol[0][0]
x == 5
sage: sol[0][0].rhs()
5
sage: sol[0][1]
y == 1
sage: sol[0][1].rhs()
1

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to