I started to look into one of the problems (https://github.com/sagemath/sage/issues/37813):
res := integrate((x^2+1)^(1/2)/(x^2+(x+(x^2+1)^(1/2))^(1/2)), x); works nicely, but converting to InputForm (which I use to do the translation to sage) fails. Is there a good reason for that - i.e., is this a bug, or just a problem with memory? Best wishes, Martin (2) -> inform := res :: INFORM Heap exhausted during garbage collection: 0 bytes available, 16 requested. Gen Boxed Code Raw LgBox LgCode LgRaw Pin Alloc Waste Trig WP GCs Mem-age 1 16426 0 0 0 0 0 12 269054560 69024 172047802 0 1 1.3993 2 46668 0 145 0 0 0 68 766811856 172336 2000000 30615 0 0.9840 3 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000 4 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000 5 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000 6 1430 6 631 172 0 58 0 36868464 765584 2000000 2156 0 0.0000 Total bytes allocated = 1072734880 Dynamic-space-size bytes = 1073741824 GC control variables: *GC-INHIBIT* = true *GC-PENDING* = true *STOP-FOR-GC-PENDING* = false fatal error encountered in SBCL pid 829857 tid 829857: Heap exhausted, game over. Welcome to LDB, a low-level debugger for the Lisp runtime environment. On Tuesday 16 April 2024 at 23:05:09 UTC+2 Nasser M. Abbasi wrote: > FYI; > > I entered few issues at sagemath related to these exception. Here is > summary and links to sagemath tracking > > sqlite3 cas_integration_tests.db > SQLite version 3.45.0 2024-01-15 17:01:13 > > sqlite> select count(*) from main where fricas_anti LIKE '%maximum > recursion depth exceeded%'; > 3 > > sqlite> select command_in_fricas from main where fricas_anti LIKE > '%maximum recursion depth exceeded%'; > integrate((1-x)^2014*x,x, algorithm="fricas") > integrate((1-x)^2014*x,x, algorithm="fricas") > integrate((1-x)^2020*x,x, algorithm="fricas") > > Bug entered at sagemath > > https://github.com/sagemath/sage/issues/37812 > ---------------------------------------------------------- > sqlite> select count(*) from main where fricas_anti LIKE '%NoneType object > has no attribute replace%'; > 6 > > > sqlite> select command_in_fricas from main where fricas_anti LIKE > '%NoneType object has no attribute replace%'; > > integrate((x^2+1)^(1/2)/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2+1)^(1/2)/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2-(x^2+1)^(1/2))/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2-(x^2+1)^(1/2))/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((1-(x-(x^2+1)^(1/2))^(1/2))/(x^4-2*x^2*(x^2+1)^(1/2)),x, > algorithm="fricas") > integrate(x^4/(1-x*(x^2+1)^(1/2)*(x-(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > > Bug entered at sagemath > > https://github.com/sagemath/sage/issues/37813 > > ------------------------------------------------------------------- > > sqlite> select count(*) from main where fricas_anti LIKE '%no explicit > roots found%'; > 16 > > sqlite> select command_in_fricas from main where fricas_anti LIKE '%no > explicit roots found%'; > integrate(1/(b*x^7+a),x, algorithm="fricas") > integrate(1/(-b*x^7+a),x, algorithm="fricas") > integrate(x^4/(b^3*x^6+9*a*b^2*x^4+27*a^2*c*x^3+27*a^2*b*x^2+27*a^3),x, > algorithm="fricas") > integrate(x^3/(b^3*x^6+9*a*b^2*x^4+27*a^2*c*x^3+27*a^2*b*x^2+27*a^3),x, > algorithm="fricas") > integrate(x/(b^3*x^6+9*a*b^2*x^4+27*a^2*c*x^3+27*a^2*b*x^2+27*a^3),x, > algorithm="fricas") > integrate(1/(b^3*x^6+9*a*b^2*x^4+27*a^2*c*x^3+27*a^2*b*x^2+27*a^3),x, > algorithm="fricas") > integrate(1/(a-b*sin(x)^5),x, algorithm="fricas") > integrate(1/(a+b*sin(x)^5),x, algorithm="fricas") > integrate(1/(a-b*cos(x)^5),x, algorithm="fricas") > integrate(1/(a+b*cos(x)^5),x, algorithm="fricas") > integrate((e*x+d)^2*(a+b*arctan(c*x^3)),x, algorithm="fricas") > integrate((e*x+d)*(a+b*arctan(c*x^3)),x, algorithm="fricas") > integrate(1/(a+b*sinh(x)^5),x, algorithm="fricas") > integrate(1/(a+b*cosh(x)^5),x, algorithm="fricas") > integrate(1/(a-b*cosh(x)^5),x, algorithm="fricas") > integrate((-a*x^5+b)/(b*x+a)^(1/2)/(x^5+a*b),x, algorithm="fricas") > > > https://github.com/sagemath/sage/issues/37814 > > > -------------------------------------------------------------------------------------- > > sqlite> select count(*) from main where fricas_anti LIKE '%Exception > raised: AttributeError%'; > 12 > > sqlite> select command_in_fricas from main where fricas_anti LIKE > '%Exception raised: AttributeError%'; > > integrate((x^2+1)^(1/2)/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2+1)^(1/2)/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate(1/(x-(a*x+b)^(1/2)*(c+(a*x+b)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate(1/(x-(a*x+b)^(1/2)*(c+(a*x+b)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2-(x^2+1)^(1/2))/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate((x^2-(x^2+1)^(1/2))/(x^2+(x+(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate(x/(x+(c+(a*x+b)^(1/2))^(1/2)),x, algorithm="fricas") > integrate(x/(x+(c+(a*x+b)^(1/2))^(1/2)),x, algorithm="fricas") > integrate((1-(x-(x^2+1)^(1/2))^(1/2))/(x^4-2*x^2*(x^2+1)^(1/2)),x, > algorithm="fricas") > integrate(x^4/(1-x*(x^2+1)^(1/2)*(x-(x^2+1)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate(x/(x-(a*x+b)^(1/2)*(c+(a*x+b)^(1/2))^(1/2)),x, > algorithm="fricas") > integrate(x/(x-(a*x+b)^(1/2)*(c+(a*x+b)^(1/2))^(1/2)),x, > algorithm="fricas") > > > > https://github.com/sagemath/sage/issues/37816 > > > -------------------------------------------------- > > sqlite> select count(*) from main where fricas_anti LIKE > '%SparseUnivariatePolynomial(Expression(Complex(Integer)))%'; > 2 > > sqlite> select command_in_fricas from main where fricas_anti LIKE > '%SparseUnivariatePolynomial(Expression(Complex(Integer)))%'; > integrate(cot(x)/(a+b*sin(x)^3)^(1/2),x, algorithm="fricas") > integrate(tan(x)/(a+b*cos(x)^3)^(1/2),x, algorithm="fricas") > > These come from Fricas itself > > 5) -> integrate(cot(x)/(a+b*sin(x)^3)^(1/2),x) > > > >> Error detected within library code: > "failed" of mode > Union(SparseUnivariatePolynomial(Expression(Complex(Integer))),"failed") > cannot be coerced to mode > SparseUnivariatePolynomial(Expression(Complex(Integer))) > > > (5) -> integrate(tan(x)/(a+b*cos(x)^3)^(1/2),x) > > > >> Error detected within library code: > "failed" of mode > Union(SparseUnivariatePolynomial(Expression(Complex(Integer))),"failed") > cannot be coerced to mode > SparseUnivariatePolynomial(Expression(Complex(Integer))) > > ------------------------------------------------ > sqlite> select count(*) from main where fricas_anti LIKE > '%exp_integral_e%'; > 18 > sqlite> select command_in_fricas from main where fricas_anti LIKE > '%exp_integral_e%'; > > > integrate(x^100*exp_integral_e(1,a*x),x, algorithm="fricas") > integrate(x^2*exp_integral_e(1,a*x),x, algorithm="fricas") > integrate(x*exp_integral_e(1,a*x),x, algorithm="fricas") > integrate(exp_integral_e(1,a*x),x, algorithm="fricas") > integrate(exp_integral_e(1,a*x)/x,x, algorithm="fricas") > integrate(exp_integral_e(1,a*x)/x^2,x, algorithm="fricas") > integrate(exp_integral_e(1,a*x)/x^3,x, algorithm="fricas") > integrate(exp_integral_e(1,a*x)/x^4,x, algorithm="fricas") > integrate((d*x)^m*exp_integral_e(1,b*x),x, algorithm="fricas") > integrate((d*x+c)^3*exp_integral_e(1,b*x+a),x, algorithm="fricas") > integrate((d*x+c)^2*exp_integral_e(1,b*x+a),x, algorithm="fricas") > integrate((d*x+c)*exp_integral_e(1,b*x+a),x, algorithm="fricas") > integrate(exp_integral_e(1,b*x+a),x, algorithm="fricas") > integrate(exp_integral_e(1,b*x+a)/(d*x+c),x, algorithm="fricas") > integrate(exp_integral_e(1,b*x+a)/(d*x+c)^2,x, algorithm="fricas") > integrate(exp_integral_e(1,b*x+a)/(d*x+c)^3,x, algorithm="fricas") > integrate(exp_integral_e(1,b*x+a)/(d*x+c)^4,x, algorithm="fricas") > integrate((d*x+c)^m*exp_integral_e(1,b*x+a),x, algorithm="fricas") > > This error happens since Fricas has no exp_integral_e. This needs to be > translated correctly to Fricas. See discussion at > > https://groups.google.com/g/fricas-devel/c/A9f4li7gq84 > > > Added bug report > > https://github.com/sagemath/sage/issues/37817 > > --Nasser > > > > > On Tuesday, April 16, 2024 at 8:21:03 AM UTC-5 Nasser M. Abbasi wrote: > >> >> " riCAS does not allows floating point numbers in integrands. This >> causes errors like: >> >> Exception raised: TypeError >> An error occurred when FriCAS evaluated >> (x)*(exp((x)*(((-0.10000000000000001)::EXPR INT)))): Cannot convert the >> value from type Float to Expression(Integer) ." >> >> I found there is only one such input >> >> sqlite> select count(*) from main where fricas_anti LIKE '%Cannot convert >> the value from type Float%'; >> 1 >> >> It turns out this is how it was in the original Mathematica Rubi input >> file: >> >> {x/E^(0.1*x), x, 3, -100/E^(x/10) - (10*x)/E^(x/10), 1} >> >> May be Albert Rich had typo when he wrote this one. I will fix it in a >> future update. I did not >> see this myself before. >> >> For the other ones you say they look like interface errors, will look at >> these as well and see what I can find. >> If they are sagemath interface issues, will report then to sagemath, >> >> --Nasser >> >> >> >> On Tuesday, April 16, 2024 at 7:56:51 AM UTC-5 Waldek Hebisch wrote: >> >>> On Tue, Apr 16, 2024 at 03:17:18AM -0700, 'Nasser M. Abbasi' via FriCAS >>> - computer algebra system wrote: >>> > FYI, >>> > >>> > This page >>> > < >>> https://12000.org/my_notes/CAS_integration_tests/reports/summer_2024/indexchapter2.htm> >>> >>> >>> > >>> > >>> > Has now updated list of all exceptions generated by FriCAS 1.3.10 >>> built >>> > with sbcl 2.3.11 on Linux via sagemath 10.3. >>> > >>> > Percentage of integrals which generated an exception is 2.19% >>> > >>> > Total number of integrals tested is now 106,812 >>> > >>> > The page above shows the commands and the exceptions generated. >>> > >>> > Individual tests Reports are not yet completed, they are building now >>> from >>> > Latex and it will take may be 3-4 weeks to finish. But the main top >>> level >>> > report >>> > < >>> https://12000.org/my_notes/CAS_integration_tests/reports/summer_2024/index.htm> >>> >>> >>> > is completed now. >>> > >>> > Fricas did well. 4th place out of 9 CAS systems with 77.117% solved. >>> > >>> > The SQL database is also fully build and contains all the result of >>> all >>> > tests. Link to the database page to download is here >>> > < >>> https://12000.org/my_notes/CAS_integration_tests/reports/summer_2024/DATA_BASE/index.htm> >>> >>> the >>> > database can be used to obtain more information about each test made. >>> Some >>> > examples >>> > >>> > Find number of integrals failed by Fricas with exception >>> > >>> > sqlite> select count(*) from main where fricas_grade="F(-2)"; >>> > 2339 >>> > >>> > Get list of all exceptions by Fricas. The sagemath-Fricas interface is >>> much >>> > better now than before (I am using sagemath 10.3). >>> > >>> > I see very few exceptions due to sagemath interface issues now. (such >>> > as exp_integral_e) >>> >>> Thanks for information. The exceptions below look like Sage >>> errors: >>> >>> Exception raised: RecursionError >> maximum recursion depth exceeded >>> >>> Exception raised: RuntimeError >> no explicit roots found >>> >>> Exception raised: AttributeError >> NoneType object has no attribute >>> replace >>> >>> Exception raised: AttributeError >>> >>> and (as you mentioned) a bunch of errors like: >>> >>> Exception raised: TypeError >> An error occurred when FriCAS evaluated >>> ((x)^(((100)::EXPR INT)))*(exp_integral_e(((1)::EXPR INT),(a)*(x))): >>> There are no library operations named exp_integral_e Use HyperDoc >>> Browse or issue >>> >>> FriCAS does not allows floating point numbers in integrands. This >>> causes errors like: >>> >>> Exception raised: TypeError >> An error occurred when FriCAS evaluated >>> (x)*(exp((x)*(((-0.10000000000000001)::EXPR INT)))): Cannot convert the >>> value from type Float to Expression(Integer) . >>> >>> The one below look as borderline case: here "failed" comes from FriCAS, >>> but fishy type, that is: >>> >>> SparseUnivariatePolynomial(Expression(Complex(Integer))) >>> >>> suggests that there is something wrong with "user input", that is >>> with Sage interface. >>> >>> -- >>> Waldek Hebisch >>> >> -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ddb4615c-18d6-4691-95a1-3f48273cf8cen%40googlegroups.com.