Risch algorithm
Template:Use mdy dates Template:Short description {{#invoke:sidebar|collapsible | class = plainlist | titlestyle = padding-bottom:0.25em; | pretitle = Part of a series of articles about | title = Calculus | image = <math>\int_{a}^{b} f'(t) \, dt = f(b) - f(a)</math> | listtitlestyle = text-align:center; | liststyle = border-top:1px solid #aaa;padding-top:0.15em;border-bottom:1px solid #aaa; | expanded = integral | abovestyle = padding:0.15em 0.25em 0.3em;font-weight:normal; | above =
Template:EndflatlistTemplate:Startflatlist
| list2name = differential | list2titlestyle = display:block;margin-top:0.65em; | list2title = Template:Bigger | list2 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | heading1 = Definitions | content1 =
| heading2 = Concepts | content2 =
- Differentiation notation
- Second derivative
- Implicit differentiation
- Logarithmic differentiation
- Related rates
- Taylor's theorem
| heading3 = Rules and identities | content3 =
- Sum
- Product
- Chain
- Power
- Quotient
- L'Hôpital's rule
- Inverse
- General Leibniz
- Faà di Bruno's formula
- Reynolds
}}
| list3name = integral | list3title = Template:Bigger | list3 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | content1 =
| heading2 = Definitions
| content2 =
- Antiderivative
- Integral (improper)
- Riemann integral
- Lebesgue integration
- Contour integration
- Integral of inverse functions
| heading3 = Integration by | content3 =
- Parts
- Discs
- Cylindrical shells
- Substitution (trigonometric, tangent half-angle, Euler)
- Euler's formula
- Partial fractions (Heaviside's method)
- Changing order
- Reduction formulae
- Differentiating under the integral sign
- Risch algorithm
}}
| list4name = series | list4title = Template:Bigger | list4 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | content1 =
| heading2 = Convergence tests | content2 =
- Summand limit (term test)
- Ratio
- Root
- Integral
- Direct comparison
Limit comparison- Alternating series
- Cauchy condensation
- Dirichlet
- Abel
}}
| list5name = vector | list5title = Template:Bigger | list5 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | content1 =
| heading2 = Theorems | content2 =
}}
| list6name = multivariable | list6title = Template:Bigger | list6 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | heading1 = Formalisms | content1 =
| heading2 = Definitions | content2 =
- Partial derivative
- Multiple integral
- Line integral
- Surface integral
- Volume integral
- Jacobian
- Hessian
}}
| list7name = advanced | list7title = Template:Bigger | list7 ={{#invoke:sidebar|sidebar|child=yes
|contentclass=hlist | content1 =
}}
| list8name = specialized | list8title = Template:Bigger | list8 =
| list9name = miscellanea | list9title = Template:Bigger | list9 =
- Precalculus
- History
- Glossary
- List of topics
- Integration Bee
- Mathematical analysis
- Nonstandard analysis
}} In symbolic computation, the Risch algorithm is a method of indefinite integration used in some computer algebra systems to find antiderivatives. It is named after the American mathematician Robert Henry Risch, a specialist in computer algebra who developed it in 1968.
The algorithm transforms the problem of integration into a problem in algebra. It is based on the form of the function being integrated and on methods for integrating rational functions, radicals, logarithms, and exponential functions. Risch called it a decision procedure, because it is a method for deciding whether a function has an elementary function as an indefinite integral, and if it does, for determining that indefinite integral. However, the algorithm does not always succeed in identifying whether or not the antiderivative of a given function in fact can be expressed in terms of elementary functions.Template:Example needed
The complete description of the Risch algorithm takes over 100 pages.<ref>Template:Harvnb.</ref> The Risch–Norman algorithm is a simpler, faster, but less powerful variant that was developed in 1976 by Arthur Norman.
Some significant progress has been made in computing the logarithmic part of a mixed transcendental-algebraic integral by Brian L. Miller.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
DescriptionEdit
The Risch algorithm is used to integrate elementary functions. These are functions obtained by composing exponentials, logarithms, radicals, trigonometric functions, and the four arithmetic operations (Template:Nowrap). Laplace solved this problem for the case of rational functions, as he showed that the indefinite integral of a rational function is a rational function and a finite number of constant multiples of logarithms of rational functions Template:Citation needed. The algorithm suggested by Laplace is usually described in calculus textbooks; as a computer program, it was finally implemented in the 1960s.Template:Citation needed
Liouville formulated the problem that is solved by the Risch algorithm. Liouville proved by analytical means that if there is an elementary solution Template:Math to the equation Template:Math then there exist constants Template:Math and functions Template:Math and Template:Math in the field generated by Template:Math such that the solution is of the form
- <math> g = v + \sum_{i<n} \alpha_i \ln (u_i) </math>
Risch developed a method that allows one to consider only a finite set of functions of Liouville's form.
The intuition for the Risch algorithm comes from the behavior of the exponential and logarithm functions under differentiation. For the function Template:Math, where Template:Math and Template:Math are differentiable functions, we have
- <math> \left(f \cdot e^g\right)^\prime = \left(f^\prime + f\cdot g^\prime\right) \cdot e^g, \, </math>
so if Template:Math were in the result of an indefinite integration, it should be expected to be inside the integral. Also, as
- <math> \left(f \cdot(\ln g)^n\right)^\prime = f^\prime \left(\ln g\right)^n + n f \frac{g^\prime}{g} \left(\ln g\right)^{n - 1} </math>
then if Template:Math were in the result of an integration, then only a few powers of the logarithm should be expected.
Problem examplesEdit
Finding an elementary antiderivative is very sensitive to details. For instance, the following algebraic function (posted to sci.math.symbolic by Henri Cohen in 1993<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>) has an elementary antiderivative, as Wolfram Mathematica since version 13 shows (however, Mathematica does not use the Risch algorithm to compute this integral):<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>This example was posted by Manuel Bronstein to the Usenet forum comp.soft-sys.math.maple on November 24, 2000.[1]</ref>
- <math> f(x) = \frac{x}{\sqrt{x^4 + 10 x^2 - 96 x - 71}},</math>
namely:
- <math>\begin{align} F(x) = - \frac{1}{8}\ln &\,\Big( (x^6+15 x^4-80 x^3+27 x^2-528 x+781) \sqrt{ x^4+10 x^2-96 x-71} \Big. \\ & {} - \Big .(x^8 + 20 x^6 - 128 x^5 + 54 x^4 - 1408 x^3 + 3124 x^2 + 10001) \Big) + C. \end{align}</math>
But if the constant term 71 is changed to 72, it is not possible to represent the antiderivative in terms of elementary functions,<ref name=":0" /> as FriCAS also shows. Some computer algebra systems may here return an antiderivative in terms of non-elementary functions (i.e. elliptic integrals), which are outside the scope of the Risch algorithm. For example, Mathematica returns a result with the functions EllipticPi and EllipticF. Integrals in the form <math>\int \frac{x+A}{\sqrt{x^4+ax^3+bx^2+cx+d}}\, dx</math> were solved by Chebyshev (and in what cases it is elementary),<ref>Template:Cite book</ref> but the strict proof for it was ultimately done by Zolotarev.<ref name=":0">Template:Cite journal</ref>
The following is a more complex example that involves both algebraic and transcendental functions:<ref>Template:Harvnb.</ref>
- <math>f(x) = \frac{x^2+2x+1+ (3x+1)\sqrt{x+\ln x}}{x\,\sqrt{x+\ln x}\left(x+\sqrt{x+\ln x}\right)}.</math>
In fact, the antiderivative of this function has a fairly short form that can be found using substitution <math>u = x + \sqrt{x + \ln x}</math> (SymPy can solve it while FriCAS fails with "implementation incomplete (constant residues)" error in Risch algorithm):
- <math>F(x) = 2 \left(\sqrt{x+\ln x} + \ln\left(x+\sqrt{x+\ln x}\right)\right) + C.</math>
Some Davenport "theorems"Template:Definition needed are still being clarified. For example in 2020 a counterexample to such a "theorem" was found, where it turns out that an elementary antiderivative exists after all.<ref>Template:Cite journal</ref>
ImplementationEdit
Transforming Risch's theoretical algorithm into an algorithm that can be effectively executed by a computer was a complex task which took a long time.
The case of the purely transcendental functions (which do not involve roots of polynomials) is relatively easy and was implemented early in most computer algebra systems. The first implementation was done by Joel Moses in Macsyma soon after the publication of Risch's paper.<ref>Template:Harvnb.</ref>
The case of purely algebraic functions was partially solved and implemented in Reduce by James H. Davenport – for simplicity it could only deal with square roots and repeated square roots and not general radicals or other non-quadratic algebraic relations between variables.<ref>Template:Harvnb.</ref>
The general case was solved and almost fully implemented in Scratchpad, a precursor of Axiom, by Manuel Bronstein, there is Axiom's fork FriCAS, with active Risch and other algorithm development on github.<ref>Template:Citation</ref><ref>Template:Harvnb.</ref> However, the implementation did not include some of the branches for special cases completely.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Currently in 2025, there is no known full implementation of the Risch algorithm.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
DecidabilityEdit
The Risch algorithm applied to general elementary functions is not an algorithm but a semi-algorithm because it needs to check, as a part of its operation, if certain expressions are equivalent to zero (constant problem), in particular in the constant field. For expressions that involve only functions commonly taken to be elementary it is not known whether an algorithm performing such a check exists (current computer algebra systems use heuristics); moreover, if one adds the absolute value function to the list of elementary functions, then it is known that no such algorithm exists; see Richardson's theorem.
This issue also arises in the polynomial division algorithm; this algorithm will fail if it cannot correctly determine whether coefficients vanish identically.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Virtually every non-trivial algorithm relating to polynomials uses the polynomial division algorithm, the Risch algorithm included. If the constant field is computable, i.e., for elements not dependent on Template:Math, then the problem of zero-equivalence is decidable, so the Risch algorithm is a complete algorithm. Examples of computable constant fields are Template:Math and Template:Math, i.e., rational numbers and rational functions in Template:Mvar with rational-number coefficients, respectively, where Template:Math is an indeterminate that does not depend on Template:Math.
This is also an issue in the Gaussian elimination matrix algorithm (or any algorithm that can compute the nullspace of a matrix), which is also necessary for many parts of the Risch algorithm. Gaussian elimination will produce incorrect results if it cannot correctly determine whether a pivot is identically zeroTemplate:Citation needed.
See alsoEdit
- Axiom (computer algebra system)
- Closed-form expression
- Incomplete gamma function
- Lists of integrals
- Liouville's theorem (differential algebra)
- Nonelementary integral
- Symbolic integration
NotesEdit
ReferencesEdit
External linksEdit
- {{#invoke:Template wrapper|{{#if:|list|wrap}}|_template=cite web
|_exclude=urlname, _debug, id |url = https://mathworld.wolfram.com/{{#if:RischAlgorithm%7CRischAlgorithm.html}} |title = Risch Algorithm |author = Bhatt, Bhuvanesh |website = MathWorld |access-date = |ref = Template:SfnRef }}