Solve inconsequent

3 views
Skip to first unread message

Rolandb

unread,
Oct 3, 2010, 1:26:38 PM10/3/10
to sage-support
Hi,

Two examples:

var('x1,x2')
y=[x1,x2]
opl=solve([x1^2==4,x2^2==9],y,solution_dict=True)
print opl
[{x2: -3, x1: -2}, {x2: -3, x1: 2}, {x2: 3, x1: -2}, {x2: 3, x1: 2}]

var('x1')
y=[x1]
opl=solve([x1^2==4],y,solution_dict=True)
print opl
Traceback (click to the left of this block for traceback)
...
TypeError: [x1] is not a valid variable.

In both cases y is a list.

Roland
Reply all
Reply to author
Forward
0 new messages