If I have the two equations y=a*x and x=u-y where y is the output and u is the input, how can I get Mathematica to combine these two equations to get the single equation, y = (a/(1+a))*u?
Thanks.
Solve[Eliminate[{y==a x,x==u-y},x],y]
{{y -> (a*u)/(1 + a)}}
Thank you.
Wait. That didn’t work for me. I got,
In[31]:= Solve[Eliminate[{y == a x, x == u - y}, x], y]
During evaluation of In[31]:= $RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of u-y.
Out[31]= Hold[Solve[Eliminate[{y == a x, x == u - y}, x], y]]
There is a hidden cache of previous assignments that some users don’t know about.
Had you previously assigned any values or functions to any of those names?
Try restarting Mathematica fresh, make certain you don’t have any prior assignments
and then do only
Solve[Eliminate[{y==a x,x==u-y},x],y]
and see what you get
Ok. That worked. Thanks.