nm

11353 Reputation

20 Badges

13 years, 13 days

MaplePrimes Activity


These are questions asked by nm

Why this error with PDEtools:-Solve  but not with solve on same exact input?

235572

interface(version);

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

restart;

235572

expr:=1/9*b^2*(cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2*m^2-6*sin(x)^2*cos(x)^2*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)*m+4*cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2*m+9*sin(x)^4*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)^2-12*sin(x)^2*cos(x)^2*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)+4*cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2-9*sin(x)^(8+2*m))*csc(x)^8:

PDEtools:-Solve(expr =0,x):

Error, (in collect/recursive) invalid subscript selector

PDEtools:-Solve(expr =0,x):

Error, (in collect/recursive) invalid subscript selector

solve(expr =0,x):

Warning, solutions may have been lost

solve(expr =0,x,AllSolutions):

Warning, solutions may have been lost

 

Download problem_Solve_may_30_2023.mw

This looks like regression? as it works ok on Maple 2022

interface(version);

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

restart;

expr:=1/9*b^2*(cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2*m^2-6*sin(x)^2*cos(x)^2*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)*m+4*cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2*m+9*sin(x)^4*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)^2-12*sin(x)^2*cos(x)^2*hypergeom([1/2, 1/2*m+1],[3/2],-cot(x)^2)*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)+4*cos(x)^4*hypergeom([3/2, 1/2*m+2],[5/2],-cot(x)^2)^2-9*sin(x)^(8+2*m))*csc(x)^8:

PDEtools:-Solve(expr =0,x):

solve(expr =0,x):

Warning, solutions may have been lost

 

Download problem_Solve_may_30_2023_maple_2022.mw

Is this something known or should be fixed? I check it is exists also in V 2022 for same input.

restart;

expr:=40/9*(43/32*2^(1/3)*(2*exp(16*c[2])*y^15-46/43*exp(11*c[2])*y^10+1/86*exp(6*c[2
])*y^5)*y*16^(2/3)*(exp(c[2])^7*y^7)^(2/3)-5/4*2^(2/3)*(2*exp(20*c[2])*y^20-169
/40*exp(15*c[2])*y^15+1/5*exp(10*c[2])*y^10)*16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+(
2*exp(24*c[2])*y^20-53/2*exp(19*c[2])*y^15+17/4*exp(14*c[2])*y^10)*y^4)*exp(3*c
[2])/y^3/exp(5*c[2])/(1/9*(-1/4-exp(10*c[2])*y^10+8*exp(5*c[2])*y^5)*16^(2/3)*(
exp(c[2])^7*y^7)^(2/3)+(-2/3*(11/4*exp(9*c[2])*y^5-1/2*exp(4*c[2]))*2^(1/3)*y*
16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+2^(2/3)*(2*exp(13*c[2])*y^10-2*exp(8*c[2])*y^5
))*y^3)/(-3/8*2^(2/3)*16^(2/3)*(exp(c[2])^7*y^7)^(2/3)*exp(c[2])*y+(exp(5*c[2])
*y^5-1/4)*16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+3/2*2^(1/3)*exp(4*c[2])*y^4):


int(expr,y);

Error, (in convert/parfrac) cannot convert to partial fraction form

But for some reason I do not now understand, I am able to actually trap this error, which makes it much less serious for me, as the program can continue.

In all other cases where Maple generated such internal exceptions, it was not cought by try/catch.

So I am able to bypass this problem, but thought to check if someone can shed more light on this and why it happens.

interface(version)

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

restart;

138508

interface(warnlevel=4);
kernelopts('assertlevel'=2):

3

expr:=40/9*(43/32*2^(1/3)*(2*exp(16*c[2])*y^15-46/43*exp(11*c[2])*y^10+1/86*exp(6*c[2
])*y^5)*y*16^(2/3)*(exp(c[2])^7*y^7)^(2/3)-5/4*2^(2/3)*(2*exp(20*c[2])*y^20-169
/40*exp(15*c[2])*y^15+1/5*exp(10*c[2])*y^10)*16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+(
2*exp(24*c[2])*y^20-53/2*exp(19*c[2])*y^15+17/4*exp(14*c[2])*y^10)*y^4)*exp(3*c
[2])/y^3/exp(5*c[2])/(1/9*(-1/4-exp(10*c[2])*y^10+8*exp(5*c[2])*y^5)*16^(2/3)*(
exp(c[2])^7*y^7)^(2/3)+(-2/3*(11/4*exp(9*c[2])*y^5-1/2*exp(4*c[2]))*2^(1/3)*y*
16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+2^(2/3)*(2*exp(13*c[2])*y^10-2*exp(8*c[2])*y^5
))*y^3)/(-3/8*2^(2/3)*16^(2/3)*(exp(c[2])^7*y^7)^(2/3)*exp(c[2])*y+(exp(5*c[2])
*y^5-1/4)*16^(1/3)*(exp(c[2])^7*y^7)^(1/3)+3/2*2^(1/3)*exp(4*c[2])*y^4);

(40/9)*((43/32)*2^(1/3)*(2*exp(16*c[2])*y^15-(46/43)*exp(11*c[2])*y^10+(1/86)*exp(6*c[2])*y^5)*y*16^(2/3)*((exp(c[2]))^7*y^7)^(2/3)-(5/4)*2^(2/3)*(2*exp(20*c[2])*y^20-(169/40)*exp(15*c[2])*y^15+(1/5)*exp(10*c[2])*y^10)*16^(1/3)*((exp(c[2]))^7*y^7)^(1/3)+(2*exp(24*c[2])*y^20-(53/2)*exp(19*c[2])*y^15+(17/4)*exp(14*c[2])*y^10)*y^4)*exp(3*c[2])/(y^3*exp(5*c[2])*((1/9)*(-1/4-exp(10*c[2])*y^10+8*exp(5*c[2])*y^5)*16^(2/3)*((exp(c[2]))^7*y^7)^(2/3)+(-(2/3)*((11/4)*exp(9*c[2])*y^5-(1/2)*exp(4*c[2]))*2^(1/3)*y*16^(1/3)*((exp(c[2]))^7*y^7)^(1/3)+2^(2/3)*(2*exp(13*c[2])*y^10-2*exp(8*c[2])*y^5))*y^3)*(-(3/8)*2^(2/3)*16^(2/3)*((exp(c[2]))^7*y^7)^(2/3)*exp(c[2])*y+(exp(5*c[2])*y^5-1/4)*16^(1/3)*((exp(c[2]))^7*y^7)^(1/3)+(3/2)*2^(1/3)*exp(4*c[2])*y^4))

try
   int(expr,y);
catch:
   print("error");
end try;

"error"

int(expr,y);

Error, (in convert/parfrac) cannot convert to partial fraction form

int(simplify(expr),y);

Error, (in convert/parfrac) cannot convert to partial fraction form

 

Download int_error_may_29_2023.mw

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

my program which reads random problems, read one large one. This cause plot to fail with internal error. 

I this known issue?

The expression is too large to post here, so I will only attach worksheet without displaying the actual ff function.

V 2023 on windows 10.

bug_plot_may_29_2023.mw

is this known limitation?

restart;
s:="regular";
MmaTranslator:-FromMma(s);
MmaTranslator:-Mma:-LeafCount(s);

Error, (in MmaTranslator:-Mma:-LeafCount) too many levels of recursion

V 2023 on windows.

1021448

restart;

1021448

s:="regular";
MmaTranslator:-FromMma(s);

"regular"

regular

MmaTranslator:-Mma:-LeafCount(s);

Error, (in MmaTranslator:-Mma:-LeafCount) too many levels of recursion

 

Download crash_leafcount_may_29_2023.mw

For reference, it should have leafcount of 1

Update

Here is another way to cause this error 

124672

expr:=Sum((n+r)*a[n]*x^(n+r-1),n = 0 .. infinity)+(-1-1/x)*Sum(a[n]*x^(n+r),n = 0 .. infinity) = 0;
MmaTranslator:-Mma:-LeafCount(expr);
length(expr);

Sum((n+r)*a[n]*x^(n+r-1), n = 0 .. infinity)+(-1-1/x)*(Sum(a[n]*x^(n+r), n = 0 .. infinity)) = 0

41

148

expr:=Typesetting:-mrow(Typesetting:-mo("&uminus0;"),Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mn("1"),Typesetting:-mo("⋅"),Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mstyle(Typesetting:-mo("∑",Typesetting:-msemantics = "inert")),Typesetting:-mrow(Typesetting:-mi("n"),Typesetting:-mo("="),Typesetting:-mn("0")),Typesetting:-mi("∞")),Typesetting:-mo("⁡"),Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi("a"),Typesetting:-mi("n")),Typesetting:-mo("⁢"),Typesetting:-msup(Typesetting:-mi("x"),Typesetting:-mrow(Typesetting:-mi("n"),Typesetting:-mo("+"),Typesetting:-mi("r"))))))),Typesetting:-_Hold([1 %* Sum(a[n]*x^(n+r),n = 0 .. infinity)])),Typesetting:-mo("−"),Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mn("1"),Typesetting:-mi("x")),Typesetting:-mo("⋅"),Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mstyle(Typesetting:-mo("∑",Typesetting:-msemantics = "inert")),Typesetting:-mrow(Typesetting:-mi("n"),Typesetting:-mo("="),Typesetting:-mn("0")),Typesetting:-mi("∞")),Typesetting:-mo("⁡"),Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi("a"),Typesetting:-mi("n")),Typesetting:-mo("⁢"),Typesetting:-msup(Typesetting:-mi("x"),Typesetting:-mrow(Typesetting:-mi("n"),Typesetting:-mo("+"),Typesetting:-mi("r"))))))),Typesetting:-_Hold([(1/x) %* Sum(a[n]*x^(n+r),n = 0 .. infinity)])));

Typesetting:-mrow(Typesetting:-mo("&uminus0;"), Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mn("1"), Typesetting:-mo("⋅"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mstyle(Typesetting:-mo("∑", Typesetting:-msemantics = "inert")), Typesetting:-mrow(Typesetting:-mi("n"), Typesetting:-mo("="), Typesetting:-mn("0")), Typesetting:-mi("∞")), Typesetting:-mo("⁡"), Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi("a"), Typesetting:-mi("n")), Typesetting:-mo("⁢"), Typesetting:-msup(Typesetting:-mi("x"), Typesetting:-mrow(Typesetting:-mi("n"), Typesetting:-mo("+"), Typesetting:-mi("r"))))))), Typesetting:-_Hold([`%*`(1, Sum(a[n]*x^(n+r), n = 0 .. infinity))])), Typesetting:-mo("−"), Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mn("1"), Typesetting:-mi("x")), Typesetting:-mo("⋅"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-munderover(Typesetting:-mstyle(Typesetting:-mo("∑", Typesetting:-msemantics = "inert")), Typesetting:-mrow(Typesetting:-mi("n"), Typesetting:-mo("="), Typesetting:-mn("0")), Typesetting:-mi("∞")), Typesetting:-mo("⁡"), Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi("a"), Typesetting:-mi("n")), Typesetting:-mo("⁢"), Typesetting:-msup(Typesetting:-mi("x"), Typesetting:-mrow(Typesetting:-mi("n"), Typesetting:-mo("+"), Typesetting:-mi("r"))))))), Typesetting:-_Hold([`%*`(1/x, Sum(a[n]*x^(n+r), n = 0 .. infinity))])))

MmaTranslator:-Mma:-LeafCount(expr);

Error, (in MmaTranslator:-Mma:-LeafCount) too many levels of recursion

length(expr)

863

 

Download crash_leafcount_V2_may_29_2023.mw

First 48 49 50 51 52 53 54 Last Page 50 of 199