Imagine I have defined a variable
l=p/(a*b)
Let's say I perform some operations, and I get the final answer to be p/a.
But all I really care about is how this expression looks in terms of l and b. Is there a way to use the relation l=p/(a*b) to convert p/a to l/b?
Of course this is a very trivial example, it gets trickier when you have other, more complicated relations. I have tried the replace command /.{p/(a*b) -> l} but it does not work.
I would appreciate any advice you have!
p/a /. First@ Solve[l == p/(a*b), p]? – Michael E2 Nov 19 '20 at 04:09Setthe value oflwith the expressionl = p/(a*b)thenlcannot appear in an output cell since it will evaluate top/(a*b)– Bob Hanlon Nov 19 '20 at 04:31Clear[l]; p/a /. p->l*a*b– Bill Watts Nov 19 '20 at 07:32