Question: maple hangs when using inert multiplication in RHS of applyrule

I wanted to change  eq:= 1/2 * sqrt(-2*lambda)  to 1/2 %* sqrt(-2*lambda)  using a rule.

It works outside of rule ofcourse. But when I put %* in the RHS of the rule, maple hangs. It seems it is going into infinite loop.

I tried the trick of using '%*' but this gives syntax error.

Same problem happens when using %. and not just %*

Is there a workaround?

Attached worksheet. Make sure to save all work before trying it.
 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1804. The version installed in this computer is 1802 created 2024, September 3, 11:35 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

eq:= 1/2 * sqrt(-2*lambda)

(1/2)*(-2*lambda)^(1/2)

eq:= 1/2 %. sqrt(-2*lambda); #no problem

`%.`(1/2, (-2*lambda)^(1/2))

eq:= 1/2 %* sqrt(-2*lambda); #no problem

`%*`(1/2, (-2*lambda)^(1/2))

restart;

eq:= 1/2 * sqrt(-2*lambda)

(1/2)*(-2*lambda)^(1/2)

applyrule(sqrt(x::anything)/y::anything = 1/y %. sqrt(x),eq); #why this hangs?

 

restart;

eq:= 1/2 * sqrt(-2*lambda)

(1/2)*(-2*lambda)^(1/2)

applyrule(sqrt(x::anything)/y::anything = 1/y %* sqrt(x),eq); #why this hangs?

 


 

Download maples_hangs_applyrule_sept_10_2024.mw

Please Wait...