Question: how to simplify sqrt(u)=1/sqrt(u)?

sometimes I get equations where there is clearly more simplification on it. For an example

restart;
ode:=y(x)=diff(y(x),x)^3*y(x)^2+2*x*diff(y(x),x);
new_ode:=PDEtools:-dchange({y(x)=sqrt(u(x))},ode,{u});

Doing this by hand, I would now write the above as

by multiplying both sides by sqrt(u(x))

new_ode :=sqrt(u(x))*lhs(new_ode)=simplify(sqrt(u(x))*rhs(new_ode))

Since I am doing this in a program, without knowing what the expression is, I need to have this simplification done automatically, since I do not know before hand, if the resulting expression has this form or not. So I automatically call simplify on it.

I tried on a simpler example

expr:=sqrt(u)=1/sqrt(u)

And want to simplify this to u=1

I can't do  

new_expr :=sqrt(u)*lhs(expr)=sqrt(u)*rhs(expr)

Since this is done in a program, without the benefit of looking first and then deciding what to do. Everything needs to be automated since the expression can be anything.

So I need a generic operation to apply and have Maple simplify it, if this pattern exist.  I tried many things, but do far nothing is working:

restart;
expr:=sqrt(u)=1/sqrt(u);
expand(expr);
expand(expr) assuming real;
combine(expr);
combine(expr,sqrt);
combine(expr,radical);
combine(expr,power);
expand(expr);
collect(expr,sqrt(u));
collect(lhs(expr)-rhs(expr)=0,sqrt(u));
simplify(lhs(expr)-rhs(expr)=0) assuming u<>0; # I expected this to work
simplify(expr) assuming real;
simplify(expr,size=false);
simplify(expr,sqrt) assuming real;
simplify(expr,sqrt) assuming positive;
simplify(expr,sqrt,symbolic) assuming positive;
simplify(expr,sqrt,symbolic,size=false) assuming positive;
simplify(expr,symbolic,size=false);
simplify(expr) assuming u<>0;
rationalize(expr);

no change.

Please do not give me an answer that requires one to use specific solution assuming one can see the expression. The solution needs to be something generic and work on any such expression that I can apply to any expression and have Maple simplify the sqrts on both sides, if they are there, since this is done in a program.

From the above, this should have worked

expr:=sqrt(u)=1/sqrt(u);
simplify(lhs(expr)-rhs(expr)=0) assuming u<>0;
simplify(lhs(expr)-rhs(expr)=0,symbolic);

Using Mathematica

ClearAll[u];
expr = Sqrt[u] == 1/Sqrt[u]
Simplify[expr[[1]] - expr[[2]] == 0, Assumptions -> u != 0]

Any suggestions? I am sure there is a simple way to do this in Maple, I just have not found it yet.

Maple 2020.2

 

Please Wait...