1

At the beginning of my script, I define a constant E by writing E:=2u+2uv, but then at the end of the script after running the final command, the result comes out with the form K/(2u+2uv). My question is simple: how do I make Mathematica recognise that the result should be in the form K/E?

  • 3
    Without knowing any details, E is a built-in symbol. – b.gates.you.know.what Feb 06 '17 at 18:10
  • 2
    I don't understand the question. If you do not want 2u+2uv to be substituted for E, why are you defining E:=2u+2uv – bill s Feb 06 '17 at 18:25
  • 2
  • Do you mean 2*u + 2*u*v or 2*u + 2*uv? 2) Also, E := 2u+2uv means E gets replaced with 2u + 2uv, not the other way around. SinceE` is a protected, built-in symbol, didn't you get an error message?
  • – m_goldberg Feb 06 '17 at 18:28
  • I mean 2u(1+v), which is 2u+2uv. And I've tried changing the symbol to a lower case e to avoid the confusion with the built-in E, but I get some strange error:
    Tag Plus in 2u+2uv is protected
    
    – Damien Clarke Feb 06 '17 at 18:44
  • What you are trying to do is achieved through Simplify and similar commands, and not through defining a value for e. For instance, see the following: Simplify[k/(2 u + 2 u v), e == 2 u (1 + v)] returns k/e, which I think is what you want. Note also the important fact that uv is DIFFERENT from u v (notice the space, which is interpreted as multiplication). The first is a single variable named $uv$, the second is the product of $u$ by $v$. If you want to be extra explicit, you can also use * to indicate multiplication. – MarcoB Feb 06 '17 at 19:57