| 1 | initial version |
Here is a possible solution:
sage: var('beta o u y R')
(beta, o, u, y, R)
sage: S = (u+y)*(u+o)/(beta*o)
sage: S.subs(solve(R == beta*o/((u+y)*(u+o)), beta)).simplify_full()
1/R
Explanations: you have first to introduce R as a symbolic variable; this is what is done in the first line above. Then you express one of the other symbolic variables in terms of R; here we choose beta:
sage: solve(R == beta*o/((u+y)*(u+o)), beta)
[beta == (R*o*u + R*u^2 + (R*o + R*u)*y)/o]
This outcome is then used to perform the substitution in S via the function S.subs(...).
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.