Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 8 years ago

drzee gravatar image

How to simplify `solve` result (ri variables)?

I want to solve a system of linear equations (more variables than equations):

var('a, b, c')
eqn = [a+b+c==4, a+b-c==5]
s = solve(eqn, a, b, c); s

The result is shown like this:

[[a=r39+92,b=r39,c=(12)]]

But I would like to have a simplified representation, i.e., where r39 in the first equation is replaced by b. Alternatively, is there a way to reset the counter of the ri variables? Each time I evaluate the code above, the counter is incremented.