[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-14 Thread tvn
Thanks, it seems to be what I need. Though I try to generate the PolynomialRing slightly different and and this seems to cause problem in using elimination_ideal() sage: vs = var('x,y,z,A,B,k,i,j,m') sage: R = PolynomialRing(QQ,vs) sage: invs = [i*A+j*B-x,k*A+m*B-y,(i-k)*A+(j-m)*B-z] sa

[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-13 Thread Nils Bruin
On Feb 12, 2:22 pm, Volker Braun wrote: > You can also use the symbolic ring: > > sage: var('x,y,z,A,B,k,i,j,m') > (x, y, z, A, B, k, i, j, m) > sage: solve([x == A*i + B*j, y == A*k + B*m, z == B*(j-m) + A*(i-k)], > [z,i,m]) > [[z == x - y, i == -(B*j - x)/A, m == -(A*k - y)/B]] Yes, that works b

[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-12 Thread Volker Braun
You can also use the symbolic ring: sage: var('x,y,z,A,B,k,i,j,m') (x, y, z, A, B, k, i, j, m) sage: solve([x == A*i + B*j, y == A*k + B*m, z == B*(j-m) + A*(i-k)], [z,i,m]) [[z == x - y, i == -(B*j - x)/A, m == -(A*k - y)/B]] -- To post to this group, send email to sage-support@googlegroups.c

[sage-support] Re: Given a set of equations (which contains variables v1,...,vn), solve for a variable v_i in terms of variables v_k,v_j, ...

2011-02-12 Thread Nils Bruin
On Feb 11, 4:54 pm, tvn wrote: > I am trying to do something like this -- it seems simple but I don't know > how to do so in Sage > > given a set of equations > > x == A*i + B*j > y == A*k + B*m > z == B*(j-m) + A*(i-k) > > Now I want to solve for z in terms of x and y ,  simple algebra yields  z