This report gives the result of running the computer algebra independent integration problems. The listing of the problems are maintained by and can be downloaded from https://rulebasedintegration.org
The number of integrals in this report is [ 51 ]. This is test number [ 107 ].
The following systems were tested at this time.
Mathematica 12.3 (64 bit) on windows 10.
Rubi 4.16.1 in Mathematica 12.1 on windows 10.
Maple 2021.1 (64 bit) on windows 10.
Maxima 5.44 on Linux. (via sagemath 9.3)
Fricas 1.3.7 on Linux (via sagemath 9.3)
Giac/Xcas 1.7 on Linux. (via sagemath 9.3)
Sympy 1.8 under Python 3.8.8 using Anaconda distribution on Ubuntu.
Mupad using Matlab 2021a with Symbolic Math Toolbox Version 8.7 under windows 10 (64 bit)
Maxima, Fricas and Giac/Xcas were called from inside SageMath. This was done using SageMath integrate command by changing the name of the algorithm to use the diﬀerent CAS systems.
Sympy was called directly using Python.
Important note: A number of problems in this test suite have no antiderivative in closed form. This means the antiderivative of these integrals can not be expressed in terms of elementary, special functions or Hypergeometric2F1 functions. RootSum and RootOf are not allowed.
If a CAS returns the above integral unevaluated within the time limit, then the result is counted as passed and assigned an A grade.
However, if CAS times out, then it is assigned an F grade even if the integral is not integrable, as this implies CAS could not determine that the integral is not integrable in the time limit.
If a CAS returns an antiderivative to such an integral, it is assigned an A grade automatically and this special result is listed in the introduction section of each individual test report to make it easy to identify as this can be important result to investigate.
The results given in in the table below reﬂects the above.
System  solved  Failed 
Rubi  % 100.00 ( 51 )  % 0.00 ( 0 ) 
Mathematica  % 100.00 ( 51 )  % 0.00 ( 0 ) 
Maple  % 78.43 ( 40 )  % 21.57 ( 11 ) 
Maxima  % 0.00 ( 0 )  % 100.00 ( 51 ) 
Fricas  % 31.37 ( 16 )  % 68.63 ( 35 ) 
Sympy  % 0.00 ( 0 )  % 100.00 ( 51 ) 
Giac  % 0.00 ( 0 )  % 100.00 ( 51 ) 
Mupad  % 0.00 ( 0 )  % 100.00 ( 51 ) 
The table below gives additional break down of the grading of quality of the antiderivatives generated by each CAS. The grading is given using the letters A,B,C and F with A being the best quality. The grading is accomplished by comparing the antiderivative generated with the optimal antiderivatives included in the test suite. The following table describes the meaning of these grades.
grade 
description 
A 
Integral was solved and antiderivative is optimal in quality and leaf size. 
B 
Integral was solved and antiderivative is optimal in quality but leaf size is larger than twice the optimal antiderivatives leaf size. 
C 
Integral was solved and antiderivative is nonoptimal in quality. This can be due to one or more of the following reasons

F 
Integral was not solved. Either the integral was returned unevaluated within the time limit, or it timed out, or CAS hanged or crashed or an exception was raised. 
Grading is implemented for all CAS systems. Based on the above, the following table summarizes the grading for this test suite.
System  % A grade  % B grade  % C grade  % F grade 
Rubi  100.00  0.00  0.00  0.00 
Mathematica  27.45  0.00  72.55  0.00 
Maple  17.65  56.86  3.92  21.57 
Maxima  0.00  0.00  0.00  100.00 
Fricas  19.61  11.76  0.00  68.63 
Sympy  0.00  0.00  0.00  100.00 
Giac  0.00  0.00  0.00  100.00 
Mupad  0.00  0.00  0.00  100.00 
The following is a Bar chart illustration of the data in the above table.
The ﬁgure below compares the CAS systems for each grade level.
The following table shows the distribution of the diﬀerent types of failure for each CAS. There are 3 types of reasons why it can fail. The ﬁrst is when CAS returns back the input within the time limit, which means it could not solve it. This the typical normal failure F .
The second is due to time out. CAS could not solve the integral within the 3 minutes time limit which is assigned F(1).
The third is due to an exception generated. Assigned F(2). This most likely indicates an interface problem between sagemath and the CAS (applicable only to FriCAS, Maxima and Giac) or it could be an indication of an internal error in CAS. This type of error requires more investigations to determine the cause.
System 
Number failed 
Percentage normal failure 
Percentage timeout failure 
Percentage exception failure 
Rubi 
0 
0.00 % 
0.00 % 
0.00 % 
Mathematica 
0 
0.00 % 
0.00 % 
0.00 % 
Maple  11  81.82 %  18.18 %  0.00 % 
Maxima  51  58.82 %  23.53 %  17.65 % 
Fricas 
35 
2.86 % 
97.14 % 
0.00 % 
Sympy 
51 
100.00 % 
0.00 % 
0.00 % 
Giac 
51 
29.41 % 
33.33 % 
37.25 % 
Mupad 
51 
90.20 % 
9.80 % 
0.00 % 
The table below summarizes the performance of each CAS system in terms of CPU time and leaf size of results.
System 
Mean time (sec) 
Mean size 
Normalized mean 
Median size 
Normalized median 
Rubi 
5.32 
533.49 
1.00 
500.00 
1.00 
Mathematica 
8.25 
5096.31 
23.08 
289.00 
0.71 
Maple 
11.48  6063977.65  9975.55  1605283.00  2997.29 
Maxima  0.00  0.00  0.00  0.00  0.00 
Fricas 
3.95 
1750.69 
7.63 
1192.50 
6.94 
Sympy 
0.00 
0.00 
0.00 
0.00 
0.00 
Giac 
0.00 
0.00 
0.00 
0.00 
0.00 
Mupad 
0.00 
0.00 
0.00 
0.00 
0.00 
The following are bar charts for the normalized leafsize and time used columns from the above table.


{}
Rubi
{}
Mathematica
{}
Maple
{}
Maxima
{}
Fricas
{}
Sympy
{}
Giac
{}
Mupad
{}
The following are integrals solved by CAS but the veriﬁcation phase failed to verify the antiderivative produced is correct. This does not mean necessarily that the antiderivative is wrong, as additional methods of veriﬁcation might be needed, or more time is needed (3 minutes time limit was used). These integrals are listed here to make it easier to do further investigation to determine why it was not possible to verify the result produced.
Rubi
{}
Mathematica
{1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 20, 21, 22, 23, 24, 25, 26, 32, 34, 35, 44, 45, 46, 51}
Maple
Veriﬁcation phase not implemented yet.
Maxima
Veriﬁcation phase not implemented yet.
Fricas
Veriﬁcation phase not implemented yet.
Sympy
Veriﬁcation phase not implemented yet.
Giac
Veriﬁcation phase not implemented yet.
Mupad
Veriﬁcation phase not implemented yet.
The command AboluteTiming[] was used in Mathematica to obtain the elapsed time for each integrate call. In Maple, the command Usage was used as in the following example
cpu_time := Usage(assign ('result_of _int',int(expr,x)),output='realtime'
For all other CAS systems, the elapsed time to complete each integral was found by taking the diﬀerence between the time after the call has completed from the time before the call was made. This was done using Python’s time.time() call.
All elapsed times shown are in seconds. A time limit of 3 minutes was used for each integral. If the integrate command did not complete within this time limit, the integral was aborted and considered to have failed and assigned an F grade. The time used by failed integrals due to time out is not counted in the ﬁnal statistics.
A veriﬁcation phase was applied on the result of integration for Rubi and Mathematica. Future version of this report will implement veriﬁcation for the other CAS systems. For the integrals whose result was not run through a veriﬁcation phase, it is assumed that the antiderivative produced was correct.
Veriﬁcation phase has 3 minutes time out. An integral whose result was not veriﬁed could still be correct. Further investigation is needed on those integrals which failed veriﬁcations. Such integrals are marked in the summary table below and also in each integral separate section so they are easy to identify and locate.
Since these integrals are run in a batch mode, using an automated script, and by using sagemath (SageMath uses Maxima), then any integral where Maxima needs an interactive response from the user to answer a question during evaluation of the integral in order to complete the integration, will fail and is counted as failed.
The exception raised is ValueError. Therefore Maxima result below is lower than what could result if Maxima was run directly and each question Maxima asks was answered correctly.
The percentage of such failures were not counted for each test ﬁle, but for an example, for the Timofeev test ﬁle, there were about 14 such integrals out of total 705, or about 2 percent. This pecrentage can be higher or lower depending on the speciﬁc input test ﬁle.
Such integrals can be indentiﬁed by looking at the output of the integration in each section for Maxima. The exception message will indicate of the error is due to the interactive question being asked or not.
Maxima integrate was run using SageMath with the following settings set by default
'besselexpand : true' 'display2d : false' 'domain : complex' 'keepfloat : true' 'load(to_poly_solve)' 'load(simplify_sum)' 'load(abs_integrate)' 'load(diag)'
SageMath loading of Maxima abs_integrate was found to cause some problem. So the following code was added to disable this eﬀect.
from sage.interfaces.maxima_lib import maxima_lib maxima_lib.set('extra_definite_integration_methods', '[]') maxima_lib.set('extra_integration_methods', '[]')
See https://ask.sagemath.org/question/43088/integrateresultsthataredifferentfromusingmaxima/ for reference.
There are Few integrals which failed due to SageMath not able to translate the result back to SageMath syntax and not because these CAS system were not able to do the integrations.
These will fail With error Exception raised: NotImplementedError
The number of such cases seems to be very small. About 1 or 2 percent of all integrals.
Hopefully the next version of SageMath will have complete translation of FriCAS and XCAS syntax and I will rerun all the tests again when this happens.
For Mathematica, Rubi and Maple, the buildin system function LeafSize is used to ﬁnd the leaf size of each antiderivative.
The other CAS systems (SageMath and Sympy) do not have special buildin function for this purpose at this time. Therefore the leaf size for Fricas and Sympy and Giac antiderivatives is determined using the following function, thanks to user slelievre at https://ask.sagemath.org/question/57123/couldwehavealeaf_countfunctioninbasesagemath/
For Sympy, which is called directly from Python, the following code is used to obtain the leafsize of its result
Matlab’s symbolic toolbox does not have a leaf count function to measure the size of the antiderivative, Maple was used to determine the leaf size of Mupad output by post processing.
Currently no grading of the antiderivative for Mupad is implemented. If it can integrate the problem, it was assigned a B grade automatically as a placeholder. In the future, when grading function is implemented for Mupad, the tests will be rerun again.
The following is an example of using Matlab’s symbolic toolbox (Mupad) to solve an integral
Which gives sin(x)^2/2
The following diagram gives a high level view of the current test build system.