Question: how to obtain this simplification in Maple. Automatic cancelation of common term of both sides of equation

Given equation 

We see this can be simplified to 

In Mathematica, I just need to tell it the denominator of the left side is not zero for it to do the simplification

The same thing in Maple did not work:

eq:= (y-2*x)^3/( (y-x)^2 * x ) = a/x;
the_denom:= denom(lhs(eq));
simplify(eq) assuming the_denom <>0

No change. 

I am doing this in code not by looking at the screen and simply wanted to eliminate common terms on both sides of equation. I can in code obtain the denominator of the LHS and RHS and add assumption. But since I do not know what if any common terms are on both sides, it is not easy to use elminate.

I see code at https://www.mapleprimes.com/questions/227043-How-To-Automatically-Cancel-Any-Common which actually worked on this and it did automatically elminate x from both sides.

But my question is: why Maple does not do it using simplify with the assumption given?  Tried simplify with size and no change.

I am looking for the simplist method to elminate common terms on both sides of equation. Is the link above the only way to do this in Maple? May be there is something simpler in recent Maple versions?


#code from https://www.mapleprimes.com/questions/227043-How-To-Automatically-Cancel-Any-Common

restart;

eq:= (y-2*x)^3/( (y-x)^2*x) = a/x;
TT := simplify(expand((eq)),size):
if lhs(TT)::`*` and rhs(TT)::`*` then
  TTT := map[2](map,freeze,TT);
  comm := `*`(op({op(lhs(TTT))} intersect {op(rhs(TTT))}));
  new := simplify(thaw(lhs(TTT)/comm=rhs(TTT)/comm));
end if:
new

May be this should be part of Maple build in functions and used by simplify? 

Update 

I just hit on a way to do this automatically with no assumption of anything. The idea is to simply rewrite the equation, like this

restart;

eq:= (y-2*x)^3/( (y-x)^2 * x ) = a/x;
numer(lhs(eq))*denom(rhs(eq)) /  (denom(lhs(eq)) *numer(rhs(eq)))=1;

You see, the common term on both sides is automatically gone!   I need to test this more. 

To moderator: if you think this question is duplicate, feel free to delete it.

Please Wait...