Not sure if this is what you are after, but the following would give you the solution: sage: solve([e1,e2],c,a) [[c == (d - b*e)/e, a == d/e]]
You can give n equations to solve and solve for n variables. Solve will insert one into another automatically. An equation has a different syntax to a substitution rule, so if you want to substitute what is in an equation, you could write sage: e2(a=eq1.rhs()) Not sure if there is a better way of transforming equations into substitution rules. Perhaps the dict() function could help? You can substitute a dictionary of variables, e.g. sage: vars = dict(a = b + c) sage: e2.subs(vars) However, again the dict() arguments have a single equal sign, not a double one as an equation. I'm sure someone can explain this much more elegantly. Regards, Stan Paul Sargent wrote: > Hi, > > I keep running into a road block which I think means either I'm > missing something simple, or I'm thinking about things the wrong way. > I'm fairly new to sage, and CAS in general, so either is possible. > > Here's a simple example of what I'm doing. > > Lets give ourselves two symbolic equations: > > sage: var("a b c d e") > sage: e1 = a == b + c > sage: e2 = d == e * a > > Now, lets say I want to know what c is in terms of b, d & e. By hand > I'd substitute e1 in e2, and then solve for c. > > sage: e3=e2.subs(a=b+c) > sage: solve(e3, c) > [c == (d - b*e)/e] > > All fine, but note that I had to enter e1 into the substitution > explicitly. I've yet to find a way of substituting one symbolic > equation into another. > > Is there a way? > Where am I going wrong? > > Thanks > > Paul > > > > --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---