Hello,

On Fri, May 15, 2009 at 5:06 AM, Paul Sargent <psa...@gmail.com> wrote:
> 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?

In Sage 4.0 which will be released within the week, you'll be able to
do the following:

sage: var("a b c d e")
(a, b, c, d, e)
sage: e1 = a == b + c
sage: e2 = d == e * a
sage: e3 = e2.subs(e1); e3
d == (b + c)*e

--Mike

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to