I am trying to understand how assumptions and simplification works with this simple example:
x+y=5, assume x = 2y
So I write:
Assuming[x == 2y, Simplify[x+y==5]]
And the result makes sense to me:
3y == 5
But then if want to do
x+y=5, assume y = 2x
and I write:
Assuming[y == 2x, Simplify[x+y==5]]
I get:
x+y==5
when I should be getting:
3x==5
Why?
Update: I know this works: Simplify[x + y == 5] /. y -> 2 x what I want to understand is why Assuming does what it does: Am I using it wrong somehow?
I now tried: Assuming[q == 2 p, Simplify[p + q == 5]] vs Assuming[p == 2 q, Simplify[p + q == 5]] same issue, I am starting to wonder if it has something to do with alphabetical order of the name of the variables.
Simplifymeasures "simplicity" via the measureSimplify`SimplifyCount[expr]. None of the three expressions is simpler than the other by this measure. So any of the three answers would be acceptable toSimplify. (It is odd that in one case the original is chosen and in the other, the equivalent is.) – Michael E2 Apr 15 '18 at 22:31