Function Repository Resource:

# IntegrateAlgebraic

Compute the indefinite integral of an algebraic function in terms of elementary functions

Contributed by: Sam Blake
 ResourceFunction["IntegrateAlgebraic"][f,x] gives the indefinite integral , using heuristics for computing elementary solutions to pseudo-elliptic and pseudo-hyperelliptic integrals.

## Details and Options

ResourceFunction["IntegrateAlgebraic"] uses a collection of heuristic methods for algebraic integrals.
ResourceFunction["IntegrateAlgebraic"] can integrate all integrands in with the substitution un=ax+b, where n=LCM[n1,n2,].
ResourceFunction["IntegrateAlgebraic"] can integrate all integrands in with the substitution , where n=LCM[n1,n2,].
ResourceFunction["IntegrateAlgebraic"] can integrate all integrands in with the substitution
ResourceFunction["IntegrateAlgebraic"] uses Goursat's reductions whenever applicable.
ResourceFunction["IntegrateAlgebraic"] attempts to simplify integrals using a Laurent polynomial substitution of the form .
For integrands in , ResourceFunction["IntegrateAlgebraic"] attempts to rationalize integrals using substitution of the form , , and .
ResourceFunction["IntegrateAlgebraic"] calls Integrate for rational functions.
ResourceFunction["IntegrateAlgebraic"] does not compute definite integrals. However, ResourceFunction["IntegrateAlgebraic"] tries to return continuous antiderivatives whenever possible.
ResourceFunction["IntegrateAlgebraic"] takes the following options:
 "DegreeBound" 8 degree bound for solving polynomial systems of equations for some Abelian integrals "Elementary" True whether the solution should be only composed of elementary functions "Expansion" False whether to expand the integrand and integrate term-by-term "SingleStepTimeConstraint" 0.25 time constraint in seconds used by some computationally-intensive routines "SubstitutionSize" "Small" the number of terms in the Laurent polynomial substitution VerifySolutions True whether numeric and symbolic checks are performed on the solution

## Examples

### Basic Examples (4)

This is a well-known pseudo-elliptic integral:

 In[1]:=
 Out[1]=

Some integrals are expressed as a rational function of x and the radicals in the integrand:

 In[2]:=
 Out[2]=

Other integrals can be expressed in terms of Log, ArcTan and

 In[3]:=
 Out[3]=

The following is an Abelian integral:

 In[4]:=
 Out[4]=

### Scope (15)

IntegrateAlgebraic can integrate all integrands in regardless of their size or complexity:

 In[5]:=
 Out[5]=

IntegrateAlgebraic can integrate all integrands in :

 In[6]:=
 Out[6]=

IntegrateAlgebraic can integrate all integrands in :

 In[7]:=
 Out[7]=

IntegrateAlgebraic can integrate all integrands in , as these are converted to rational functions via Euler’s substitution:

 In[8]:=
 Out[8]=

For the following integral, IntegrateAlgebraic uses the substitution to reduce the integral to :

 In[9]:=
 Out[9]=

For the following integral, IntegrateAlgebraic uses the substitution to reduce the integral to :

 In[10]:=
 Out[10]=

For the following integral, IntegrateAlgebraic uses the substitution to reduce the integral to :

 In[11]:=
 Out[11]=

Some integrals will introduce algebraic numbers that are not present in the integrand:

 In[12]:=
 Out[12]=

IntegrateAlgebraic works with radicals other than square roots:

 In[13]:=
 Out[13]=

Some integrals will be expressed in terms of RootSum expressions:

 In[14]:=
 Out[14]=

IntegrateAlgebraic can often work with parameters in the integrand:

 In[15]:=
 Out[15]=

IntegrateAlgebraic has a limited ability to integrate nested radicals:

 In[16]:=
 Out[16]=

IntegrateAlgebraic can succeed on some integrals where the Risch-Bronstein-Trager algorithm struggles:

 In[17]:=
 Out[17]=

IntegrateAlgebraic can handle many otherwise difficult integrals involving parameters:

 In[18]:=
 Out[18]=

IntegrateAlgebraic can handle many integrals when the radicand is a rational function:

 In[19]:=
 Out[20]=
 In[21]:=
 Out[21]=

### Options (9)

#### Expansion (2)

The option "Expansion" True specifies if the integrals is expanded and integrated term-by-term after exhausting all other possible methods. By default "Expansion" is False, as this method may require many time consuming recursive calls to IntegrateAlgebraic:

 In[22]:=
 Out[22]=
 In[23]:=
 Out[23]=

With "Expansion" True, IntegrateAlgebraic may return partial results:

 In[24]:=
 Out[24]=

#### DegreeBound (2)

The default for "DegreeBound" is 8:

 In[25]:=
 Out[25]=

Increasing the degree bound can solve some large Abelian integrals:

 In[26]:=
 Out[26]=
 In[27]:=
 Out[27]=

#### Elementary (1)

"Elementary" specifies if the solution should be composed of elementary functions only. By default "Elementary" is True:

 In[28]:=
 Out[28]=

#### SingleStepTimeConstraint (1)

The option "SingleStepTimeConstraint" specifies the time in seconds that IntegrateAlgebraic spends in various computationally-intensive routines. The default for "SingleStepTimeConstraint" is 0.25. Increasing this time constraint may solve some integrals that otherwise return unevaluated:

 In[29]:=
 Out[29]=
 In[30]:=
 Out[30]=

#### SubstitutionSize (2)

The option "SubstitutionSize" determines the number of rational substitutions tried within IntegrateAlgebraic. By default "SubstitutionSize" is "Small". Other settings are "Medium" and "Large". By default, the Laurent polynomial substitution code considers a polynomial with 3 terms only:

 In[31]:=
 Out[31]=

With "SubstitutionSize""Medium", we use a Laurent polynomial substitution with 4 terms:

 In[32]:=
 Out[32]=

#### VerifySolutions (1)

VerifySolutions numerically verifies the solution obtained by IntegrateAlgebraic. By default this is False. Verifying the solution will increase the runtime of IntegrateAlgebraic:

 In[33]:=
 Out[33]=
 Out[33]=

### Applications (1)

If the integral is continuous, then the definite integral can be computed using Newton–Leibniz:

 In[34]:=
 Out[34]=
 In[35]:=
 Out[35]=
 In[36]:=
 Out[36]=

### Properties and Relations (3)

IntegrateAlgebraic uses SolveAlways to determine if a rational substitution can simplify a radical. Consider the integral and a candidate substitution of the form . The following computation shows that we can reduce to , where :

 In[37]:=
 Out[37]=
 In[38]:=
 Out[38]=
 In[39]:=
 Out[39]=
 In[40]:=
 Out[40]=
 In[41]:=
 Out[41]=

Once the candidate substitution is known, GroebnerBasis and Solve may be used to simplify the integral. For example, use the substitution to evaluate the integral :

 In[42]:=
 Out[42]=
 In[43]:=
 Out[43]=
 In[44]:=
 Out[44]=

This is essentially how IntegrateAlgebraic has computed the integral, except additional post-processing is done to express the integral in terms of the radicals in the integrand (which makes the solution valid for all x):

 In[45]:=
 Out[45]=

IntegrateAlgebraic will often return an answer in terms of elementary functions when Integrate will return an answer in terms of special functions:

 In[46]:=
 Out[46]=
 In[47]:=
 Out[47]=

### Possible Issues (3)

Some integrals will take longer than others:

 In[48]:=
 Out[48]=
 In[49]:=
 Out[49]=

Trager’s Hermite reduction will always find the rational (algebraic) part of the integral, whereas the methods used by IntegrateAlgebraic will sometimes fail:

 In[50]:=
 Out[50]=
 In[51]:=
 Out[51]=

IntegrateAlgebraic will fail to compute some algebraic integrals which possess elementary solutions:

 In[52]:=
 Out[52]=
 In[53]:=
 Out[53]=
 In[54]:=
 Out[54]=
 In[55]:=
 Out[55]=

### Neat Examples (2)

Some integrals require many logarithms (including ArcTan and ArcTanh):

 In[56]:=
 Out[56]=

Some integrals introduce complicated algebraic numbers:

 In[57]:=
 Out[57]=

Sam Blake

## Version History

• 2.0.0 – 10 August 2021
• 1.0.0 – 17 March 2021