User:CRGreathouse/Risch

Testing a claim at Risch algorithm

Claim
For example, of all known programs, only Axiom can find an elementary antiderivative for the following:


 * $$ f(x) = \frac{x}{\sqrt{x^4 + 10 x^2 - 96 x - 71}}$$

The following is a more complex example, which no software is known to find an antiderivative for:


 * $$f(x) = \frac{x^2+2x+1+ (3x+1)\sqrt{x+\ln x}}{x\,\sqrt{x+\ln x}(x+\sqrt{x+\ln x})}.$$

I have also added the results of third integral, taken from [Davenport and Trager 1985]:
 * $$\int\exp(x+10\log x)\,dx=(x^{10}-10x^9+90x^8-720x^7+5040x^6-30240x^5+151200x^4-604800x^3+1814400x^2-3628800+3628800)e^x\cdot\frac{e^{10\log x}}{x^{10}}+C.$$

Summary of Results
* Eliminates the singularity at $$x\le0.$$

Axiom (version: March 2009)
integrate(x/sqrt(x**4+10*x**2-96*x-71), x) Succeeds in finding an elementary antiderivative integrate((x**2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x) Fails with an error

Eigenmath (version: unnamed 2023)
x/sqrt(x^4+10*x^2-96*x-71) integral Fails with "Stop: integral: no solution found" (x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))) integral Fails with "Stop: integral: no solution found"

FriCAS (version: 2022)
integrate(x/sqrt(x^4+10*x^2-96*x-71), x) Succeeds in finding an elementary antiderivative integrate((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x) Fails with error "implementation incomplete (constant residues)" integrate(exp(x+10*log(x)), x) Succeeds (but removes singularity)

Maple (version: 13)
int(x/sqrt(x^4+10*x^2-96*x-71),x);

Output: contains EllipticF and EllipticPi (these functions are non-elementary)

int((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))),x);

Output: Same integral.

int(exp(x+10*log(x)),x);

Output: correct answer found

Mathematica (version: 7)
Integrate[x/Sqrt[x^4 + 10 x^2 - 96 x - 71], x] Finds (long) nonelementary antiderivative Integrate[(x^2 + 2 x + 1 + (3 x + 1) Sqrt[x + Log[x]])/(x Sqrt[x + Log[x]] (x + Sqrt[x + Log[x]])), x] Returns integral in symbolic form

Maxima (version: 5.45.1, 2021)
Note from the help file for the command risch:
 * Integrates expr with respect to x using the transcendental case of the Risch algorithm. (The algebraic case of the Risch algorithm has not been implemented.) This currently handles the cases of nested exponentials and logarithms which the main part of  can't do.   will automatically apply   if given these cases.

integrate(x/sqrt(x^4+10*x^2-96*x-71), x); Returns integral in symbolic form risch(x/sqrt(x^4+10*x^2-96*x-71), x); Returns integral in symbolic form integrate((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x); Returns a result in terms of two integrals risch((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x); Returns a result in terms of an integral

Reduce (revision 6550, 2023)
int(x/sqrt(x^4+10*x^2-96*x-71), x); Returns a result in terms of two integrals int((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x); Returns a result in terms of three integrals

Sage (version: 9.8, 2023)
integral(x/sqrt(x^4+10*x^2-96*x-71), x) Returns integral in symbolic form integral((x^2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x) Segmentation fault

SpaceTime (version: 3.0)
∫(x/√(x^4+10*x^2-96*x-71), x) Returns integral in symbolic form ∫((x^2+2*x+1+(3*x+1)*√(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x) Returns a result in terms of three integrals

SymPy (version: 1.11.1, 2022)
x = Symbol('x') integrate(x/sqrt(x**4+10*x**2-96*x-71), x) Returns integral in symbolic form integrate((x**2+2*x+1+(3*x+1)*sqrt(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))), x) Succeeds in finding an elementary antiderivative

WIRIS CAS
(x^2+2*x+1+(3*x+1)*√(x+log(x)))/(x*sqrt(x+log(x))*(x+sqrt(x+log(x)))) Fails with "Error 0, general error: The operator is binary."

Yacas
Integrate(x)x/(x^4+10*x^2-96*x-71)^(1/2); Returns integral in symbolic form Integrate(x)(x^2+2*x+1+(3*x+1)*(x+Ln(x))^(1/2))/(x*(x+Ln(x))^(1/2)*(x+(x+Ln(x))^(1/2))) Returns integral in symbolic form

Other CAS

 * CASSIOPEIA uses Maple to antidifferentiate
 * Derive was replaced by TI-Nspire
 * Euler uses Maxima to antidifferentiate
 * FriCAS is an Axiom fork
 * GUYacas uses Ycas to antidifferentiate
 * Macsyma was replaced by Maxima
 * MuPAD is included in MATLAB
 * OpenAxiom is an Axiom fork
 * Symbolic Math Toolbox uses MAPLE to antidifferentiate
 * SympyCore is a research version of SymPy
 * Xcas uses Ycas to antidifferentiate
 * Entries from Comparison of computer algebra systems that could not be located: MAS, SymbolicC++
 * CAS that have not been listed (but can probably integrate): ClassPad Manager, MathXpert, TI-Nspire CAS
 * CAS that have not been listed (and probably can't integrate usefully): Magma (polynomials only), Mathomatic (polynomials only), meditor (integrates rational functions only), PARI/GP (integrates rational functions only)
 * CAS that have not been listed (and probably can't integrate): Algebrator, bergman, Cadabra, DoCon, DCAS, Fermat, Franklin Math, GAP, GiNaC, JACAL, JAS, LiveMath, Macaulay, MathEclipse, MuMATH, SINGULAR, TRIP