Ask Your Question

Rewrite equilibrium variables in terms of another variable

asked 2017-09-17 17:05:33 -0500

anonymous user


I'm wondering how to replace the equilibrium variables in terms of another one. I want the equilibrium to be in terms of a new varible called R = beta*o/(u+y)(u+o) and I can't seem to find the right function that would allow me to do this.

Equilibrium point: S= (u+y)(u+o)/beta*o Want: S = 1/R

edit retag flag offensive close merge delete


Please define variables and make clear, what is given. Then relation to be checked. Also, please give a clear formula for $R$, if $R$ is given. Is it, as you write it: $$ R =\beta\cdot \frac o{u+y}\cdot (u+o)\ ?$$

dan_fulea gravatar imagedan_fulea ( 2017-09-17 21:32:20 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-18 04:25:08 -0500

eric_g gravatar image

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()

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(...).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-09-17 17:05:33 -0500

Seen: 53 times

Last updated: Sep 18 '17