On 12/01/2011 10:46 AM, Santanu Sarkar wrote:
> Hello,
> Let S be a symbolic expression of a certain number of variables taken
> from a particular set of variables. How do I find out the list of the
> distinct variables that S depends on?
> Suppose {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9} is a set of unknowns and S =
> x1 + x3*x4 + x5*x7*x9. I need to find the subset {x1,x3,x4,x5,x7,x9}
> on which S depends. How to do this in sage?
> 

sage: x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 = var('x0,x1,x2,x3,x4,x5,x6,x7,x8,x9')
sage: S = 1*x1 + 2*x3 + 3*x4 + 4*x5 + 5*x7 + 6*x9
sage: S.variables()
(x1, x3, x4, x5, x7, x9)

-- 
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