Question: SolveTools:-CancelInverses) assertion failed, simplify should not leak _Z variables out from RootOfs

I do not know if this is new error in 2023. But solve gives this strange error first time it is called. Second time the error goes away.

Any workaround possible and why does it happen? It happens when kernelopts('assertlevel'=2): is set. But I need to have this set all the time.     Same problem when using PDEtools:-Solve. I can't even trap this error since it is internal. So program crash and no way to continue.

restart;
interface(warnlevel=4):
kernelopts('assertlevel'=2):
eq:=exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+1/3/y(x)^(2/3)) = 0;
solve(eq,y(x));

Error, (in SolveTools:-CancelInverses) assertion failed, simplify should not leak _Z variables out from RootOfs

1331348

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

1331348

interface(warnlevel=4):
kernelopts('assertlevel'=2):
eq:=exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+1/3/y(x)^(2/3)) = 0;
solve(eq,y(x));

exp(x)*sin(y(x))-3*x^2+exp(x)*cos(y(x))+(1/3)/y(x)^(2/3) = 0

Error, (in SolveTools:-CancelInverses) assertion failed, simplify should not leak _Z variables out from RootOfs

solve(eq,y(x)); #second time no error. Very strange.

RootOf(3*exp(x)*sin(_Z)*_Z^(2/3)+3*exp(x)*cos(_Z)*_Z^(2/3)-9*x^2*_Z^(2/3)+1)

 


Download problem_in_solve_may_29_2023.mw

Finding too many problems in Version 2023 :(

Update

This seems new problem in V 2023? I just tried it on V 2022 on same PC and no error there. First time used no error.  Here is V 2022 worksheet. So this seems like regression.

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

restart;

interface(warnlevel=4):
kernelopts('assertlevel'=2):
eq:=exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+1/3/y(x)^(2/3)) = 0;
solve(eq,y(x));

exp(x)*sin(y(x))-3*x^2+exp(x)*cos(y(x))+(1/3)/y(x)^(2/3) = 0

RootOf(-3*exp(x)*sin(_Z)*_Z^(2/3)-3*exp(x)*cos(_Z)*_Z^(2/3)+9*x^2*_Z^(2/3)-1)

 

 

Download solve_may_29_2023_V2022.mw

Update: 

This bug is still not fixed in Maple 2024.1. I do not understand why bugs do not get fixed for years in Maple. I will report it again.

restart;

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 1788 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

restart;

restart;

kernelopts('assertlevel'=2):
ode:=exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+1/3/y(x)^(2/3))*diff(y(x),x) = 0;
DEtools:-odeadvisor(ode)

exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+(1/3)/y(x)^(2/3))*(diff(y(x), x)) = 0

Error, (in SolveTools:-CancelInverses) assertion failed, simplify should not leak _Z variables out from RootOfs

 

 

Download leaked_Z_still_not_fixed_in_maple_2024_1.mw

Update Nov 6, 2024

fyi, The above bug is still not fixed in Maple 2024.2

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

kernelopts('assertlevel'=2):

ode:=(exp(x)*sin(y(x))-3*x^2)+(exp(x)*cos(y(x))+y(x)^(-2/3)/3)*diff(y(x),x)=0;
DEtools[odeadvisor](ode,y(x))

exp(x)*sin(y(x))-3*x^2+(exp(x)*cos(y(x))+(1/3)/y(x)^(2/3))*(diff(y(x), x)) = 0

Error, (in SolveTools:-CancelInverses) assertion failed, simplify should not leak _Z variables out from RootOfs

 

 

Download leak_Z_bug_in_maple_2024_2.mw

Please Wait...