# Rule-based Mathematics

## Symbolic Integration Rules

### Crafted by Albert D. Rich, Applied Logician

If systematically applied, the integration rules provided on this website can determine the antiderivative of a wide variety of mathematical expressions. As proof, a Rule-based integrator nicknamed Rubi was implemented using these rules. Organized as a decision tree based on the form of the integrand, the 6600+ rules Rubi uses can be viewed in human-readable form or downloaded in machine-readable form. To read about the feasibility and desirability of organizing mathematical knowledge as a rule-based decision tree, click on the About>Vision menu option above.

## Version 4.15 of Rubi Now Available

To download Rubi 4.15, click on the Download Rubi menu option above. This version expands the class of algebraic and other expressions Rubi can integrate, and often finds simpler, more concise antiderivatives in fewer steps than earlier versions. Rubi 4.15 also enhances the functionality of its integrate command as follows:

• Int[expn, var] returns the antiderivative (indefinite integral) of expn with respect to var.
• Int[expn, var, Step] displays the first step used to integrate expn with respect to var, and returns the intermediate result.
• Int[expn, var, Steps] displays all the steps used to integrate expn with respect to var, and returns the antiderivative.
• Int[expn, var, Stats], before returning the antiderivative of expn with respect to var, displays a list of statistics of the form {a, b, c, d, e} where
• a is the number of steps used to integrate expn,
• b is the number of distinct rules used to integrate expn,
• c is the leaf count size of expn,
• d is the leaf count size of the antiderivative of expn, and
• e is the rule-to-size ratio of the integration (i.e. the quotient of elements b and c).
• Int[{expn1, expn2, ...}, var] returns a list of the antiderivatives of expn1, expn2, ... each with respect to var.
• Int[expn, {var, a, b}] returns the limit of the antiderivative of expn as var approaches b minus the limit as var approaches a. Note that this difference will not always equal the definite integral of expn from a to b.

## What's the Hardest Problem Rubi Can Integrate?

The last element of the list of statistics displayed by Rubi's Int[expn, var, Stats] command is the number of distinct rules required to integrate expn divided by the size of expn. This rule-to-size ratio provides a normalized measure of the amount of mathematical knowledge Rubi uses to integrate expressions. In other words, this ratio can be used as a metric showing the difficulty of solving indefinite integration problems. For example, the hardest problem in Rubi's 70,000+ test suite is integrating (a+b arctanh(c/x^2))^2 which has a rule-to-size ratio of 2.5.

I would like to challenge the community of Rubi users to find the hardest problem the system can integrate. To that end I will award \$1000 (U.S.) to the person who sends me before August 1, 2018 the expression having the largest rule-to-size ratio as displayed by the Int[expn, var, Stats] command with Rubi 4.15 running on Mathematica 11.3. If the largest rule-to-size ratio is a tie, the prize will be awarded to the first entry I had received. Candidate expressions must be formatted in Mathematica syntax and sent to me via email by clicking on the About>Contact menu option above.

The hardest integral received thus far is Int[ArcCoth[x^16]^2,x] which has a rule-to-size ratio of 7.5. Please only send entries having ratios greater than 7.5.

## How Rubi Compares with Other Symbolic Integrators

Rubi dramatically out-performs Maple and Mathematica (the two major commercial computer algebra systems) on a grueling integration test suite. Consisting of over 70 thousand integrands and optimal antiderivatives, the entire test suite can be downloaded by clicking on the Test Problems menu option above. This chart shows the percentage of test suite problems for which these systems were able to find optimal antiderivatives. What constitutes an optimal antiderivative is defined following the table below.

The following chart shows the percentage of optimal antiderivatives found by the three integrators for various types of integrands:

For example, it shows Mathematica has the most difficulty with integrands involving trig functions; whereas Maple has the most difficulty with logarithms. Both the above bar charts are based on the following test suite results:

 Integration Test Suite Results Maple 18 Mathematica 10 Rubi 4.11 Integrand Types Problems Optimal Nonoptimal Fail Optimal Nonoptimal Fail Optimal Nonoptimal Fail Algebraic linear functions 4258 3533 392 333 3940 304 14 4253 5 0 Algebraic quadratic functions 5935 4591 1130 214 5626 283 26 5935 0 0 Algebraic binomial functions 6481 4985 874 622 5976 483 22 6475 6 0 Algebraic trinomial functions 2022 1447 451 124 1779 213 30 2021 1 0 Miscellaneous algebraic functions 1722 1185 344 193 1401 192 129 1708 7 7 Exponential functions 856 650 69 137 746 76 34 852 0 4 Trig functions 18050 8776 6826 2448 11878 5395 777 18026 14 10 Hyperbolic functions 3905 2098 1274 533 3240 626 39 3905 0 0 Logarithm functions 1058 410 153 495 909 117 32 1057 0 1 Inverse trig functions 3603 2567 407 629 3236 224 143 3599 2 2 Inverse hyperbolic functions 4877 2401 597 1879 4439 253 185 4872 1 4 Special functions 1239 644 59 536 991 29 219 1239 0 0 Independent test problems 1424 1146 173 105 1247 158 19 1373 28 23 Totals 55430 34433 12749 8248 45408 8353 1669 55315 64 51 Percentages 62.1% 23.0% 14.9% 81.9% 15.1% 3.0% 99.8% 0.1% 0.1%

The following summarizes the meaning of the numbers under the column headings in the above table:

• Problems: the number of integration problems for each type of integrand.
• Optimal: for Rubi, the number of results identical to the optimal antiderivative; for the other systems, the number of results no more than twice the size of the optimal antiderivative, based on leaf counts.
• Nonoptimal: for Rubi, the number of results that are correct but not identical to the optimal antiderivative; for the other systems, the number of results that are more than twice the size of the optimal antideriative.
• Fail: the number of problems the system returns unintegrated but that are actually integrable in terms of functions known by the system, plus the number of problems the system fails to integrate within a 120 second time limit.

The results of extensive, independently conducted, comparative testing of Rubi and the built-in symbolic integrators of several computer algebra systems is available at Computer Algebra Independent Integration Tests.

The mathematical knowledge on this website is freely available for any educational, academic or commercial use. Please include the website address and appropriately acknowledge its author in any document or product incorporating its contents.

Maple is a registered trademark of Maplesoft.
Mathematica is a registered trademark of Wolfram Research, Inc. who generously provided a copy of Mathematica to support this research.