Question: coulditbe generates Error, (in type/complex) too many levels of recursion

I've modified my call to coulditbe() to always use assuming real to prevent false positives.

Now I find it gives internal error Error, (in type/complex) too many levels of recursion which can not even be trapped when the thing I am checking happened to have complex I in it. (This is done in code).

So I modied the code to only do this check if there is no complex in the expression being checked.

But I think Maple should not generate such error in first place. This indicates some internal problem in Maple, correct?

Here is worksheet. (ps. updated, wrong worksheet for somereason was uploaded).

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

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

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    coulditbe(the_residual=0) assuming real;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

Error, (in type/complex) too many levels of recursion

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    if not has(the_residual,I) then
       coulditbe(the_residual=0) assuming real;
    else
       print("by passing, since residual is complex");
    fi;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

"by passing, since residual is complex"

 


 

Download internal_error_too_many_Levels_from_coulditbe_august_23_2024.mw

Please Wait...