Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$\begingroup$1+b/a is ok, I just wanted to avoid long Replace answers. I was looking for some kind of short switch (from x,y to a,b), because I have many variables to deal with. I was looking sore something like Eliminate, but that works only for equations.$\endgroup$
$\begingroup$I found that the following works eq1 = a == x + y; eq2 = b == x - y; eq3 = u == a + b; eq4 = v == a; eq5 = c == u/v; sol = Eliminate[{eq1, eq2, eq3, eq4, eq5}, {x, y, u, v}]; Solve[sol, c] Which looks very clumsy. Any better ideas?$\endgroup$
a
andb
are long expressions if you just want1+b/a
? $\endgroup$1 + (x-y)/(x+y)
? $\endgroup$eq1 = a == x + y; eq2 = b == x - y; eq3 = u == a + b; eq4 = v == a; eq5 = c == u/v; sol = Eliminate[{eq1, eq2, eq3, eq4, eq5}, {x, y, u, v}]; Solve[sol, c]
Which looks very clumsy. Any better ideas? $\endgroup$