Question: how to trap this internal Maple error? too many levels of recursion

I am not able to even trap this Maple exception.

Any suggestions what to do? It is not a problem if it can't solve it, but I need to at least be able to  trap the exception in order to go to the next one, else the whole program now stops when it hits this.

I used try..catch but this exception just ignores this and escapes to top level. This is not the first time I've seen Maple exception escape the try/catch. I do not understand why some do that and some not. I

Is this another bug?

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

restart;

eq:=1 = -X*(-1/4*(-40*(X + x0)^(5/3) - 20/3*(X + x0)^(2/3)*Y - 20/3*(X + x0)^(2/3)*y0 - 32*A*(X + x0)^(1/3))/((X + x0)^(5/3)*(Y + y0)) + 5/12*(-15*(X + x0)^(8/3) - 4*(X + x0)^(5/3)*Y - 4*(X + x0)^(5/3)*y0 - 24*A*(X + x0)^(4/3) + 12*A^2)/((X + x0)^(8/3)*(Y + y0)))/(Y*(1/(Y + y0) + 1/4*(-15*(X + x0)^(8/3) - 4*(X + x0)^(5/3)*Y - 4*(X + x0)^(5/3)*y0 - 24*A*(X + x0)^(4/3) + 12*A^2)/((X + x0)^(5/3)*(Y + y0)^2)));

1 = -X*(-(1/4)*(-40*(X+x0)^(5/3)-(20/3)*(X+x0)^(2/3)*Y-(20/3)*(X+x0)^(2/3)*y0-32*A*(X+x0)^(1/3))/((X+x0)^(5/3)*(Y+y0))+(5/12)*(-15*(X+x0)^(8/3)-4*(X+x0)^(5/3)*Y-4*(X+x0)^(5/3)*y0-24*A*(X+x0)^(4/3)+12*A^2)/((X+x0)^(8/3)*(Y+y0)))/(Y*(1/(Y+y0)+(1/4)*(-15*(X+x0)^(8/3)-4*(X+x0)^(5/3)*Y-4*(X+x0)^(5/3)*y0-24*A*(X+x0)^(4/3)+12*A^2)/((X+x0)^(5/3)*(Y+y0)^2)))

try
   sol:=solve(identity(eq,X),[x0,y0]);
catch:
   print("trapped the error");
end try;

Error, (in anonymous procedure called from type/realcons) too many levels of recursion

 

 

Download how_to_trap.mw

Update 3 years later. FYI. This error still shows in Maple 2025. It will be nice if Maple returns no solution than an internal error that can not be trapped which means the whole program crashes.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" package is not available for the version of Maple under development`

restart;

eq:=1 = X*(2*cos(X)*cos(x0)-X*sin(X)*cos(x0)-2*sin(X)*sin(x0)-X*cos(X)*sin(x0)-x0*sin(X)*cos(x0)-x0*cos(X)*sin(x0))*(2*Y*ln(Y+y0)+Y+2*y0*ln(Y+y0)+y0)/Y/(X*cos(X)*cos(x0)-X*sin(X)*sin(x0)+x0*cos(X)*cos(x0)-x0*sin(X)*sin(x0)+sin(X)*cos(x0)+cos(X)*sin(x0))/(2*ln(Y+y0)+2*Y/(Y+y0)+1+2*y0/(Y+y0));

1 = X*(2*cos(X)*cos(x0)-X*sin(X)*cos(x0)-2*sin(X)*sin(x0)-X*cos(X)*sin(x0)-x0*sin(X)*cos(x0)-x0*cos(X)*sin(x0))*(2*Y*ln(Y+y0)+Y+2*y0*ln(Y+y0)+y0)/(Y*(X*cos(X)*cos(x0)-X*sin(X)*sin(x0)+x0*cos(X)*cos(x0)-x0*sin(X)*sin(x0)+sin(X)*cos(x0)+cos(X)*sin(x0))*(2*ln(Y+y0)+2*Y/(Y+y0)+1+2*y0/(Y+y0)))

solve(identity(eq,X),[x0, y0])

Error, (in signature) too many levels of recursion

normal(eq);

1 = (Y+y0)*(2*ln(Y+y0)+1)*(2*cos(X)*cos(x0)-X*sin(X)*cos(x0)-2*sin(X)*sin(x0)-X*cos(X)*sin(x0)-x0*sin(X)*cos(x0)-x0*cos(X)*sin(x0))*X/((2*ln(Y+y0)+3)*(X*cos(X)*cos(x0)-X*sin(X)*sin(x0)+x0*cos(X)*cos(x0)-x0*sin(X)*sin(x0)+sin(X)*cos(x0)+cos(X)*sin(x0))*Y)

solve(identity(%,X),[x0, y0])

Error, (in signature) too many levels of recursion

expand(eq);

`[Length of output exceeds limit of 10000]`

solve(identity(%,X),[x0, y0])

Error, (in signature) too many levels of recursion

 

 

Download internal_error_march_27_2025.mw

Please Wait...