On Feb 11, 4:54 pm, tvn <nguyenthanh...@gmail.com> 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 =
> x-y    .   How would I do so in Sage ?  is there a special name for this
> process ?    

It's called elimination and the proper algebraic theory for it is
formulated in terms of polynomial rings and ideals:

sage: R.<x,y,z,A,B,k,i,j,m>=QQ[]
sage: I=ideal(x-(A*i + B*j),y-(A*k + B*m),z-(B*(j-m) + A*(i-k)))
sage: J=I.elimination_ideal([k,i,j,m,A,B])
sage: J.gens()
(x - y - z,)

>From the fact that z only occurs linearly in the generator of J, you
can see that z can be expressed in terms of x,y. So there still is
some hand-work to be done.

Routines like solve use these methods behind the scenes (although in
this case not the same implementation, but that is irrelevant). They
hide some details to make them easier to use, but it also reduces the
control you have over what actually happens.

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

Reply via email to