Suppose that I have the expression (x+y+z)/y. I want to substitute the rules Phix -> x/y, Phiz ->z/y.

Is there a way to do this?

  • $\begingroup$ ((x + y + z)/y // Expand) /. {x/y -> φ, z/y -> θ} Change the rules accordingly. $\endgroup$
    – Sektor
    Sep 15 '15 at 13:57

As a general "rule" keep the LHS of a replacement rule as simple as possible.

(x + y + z)/y /. {x -> y*Phix, z -> y*Phiz} // Simplify

(*  1 + Phix + Phiz  *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.