Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Integrate a rational function using partial fraction decomposition
ResourceFunction["IntegratePFD"][rat,x] gives the indefinite integral using a partial fraction decomposition of the rational function rat prior to calling Integrate. |
Perform a partial fraction decomposition:
In[1]:= |
Out[1]= |
In this example we compute the partial fraction expansion prior to computing the integral with Integrate:
In[2]:= |
Out[2]= |
IntegratePFD gives different results than Integrate:
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
Another example:
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
By default this integral produced an ArcTan, as expected:
In[7]:= |
Out[7]= |
With the following extension we factor x2+1 into (x-I)(x+I) prior to computing the partial fraction decomposition:
In[8]:= |
Out[8]= |
Compute the integral over different algebraic number fields until you find a solution which matched your homework problem:
In[9]:= |
Out[9]= |
In[10]:= |
Out[10]= |
In[11]:= |
Out[11]= |
In[12]:= |
Out[12]= |
Integrate and IntegratePFD will both return valid antiderivatives, however the results will often look vastly different:
In[13]:= |
Out[13]= |
In[14]:= |
Out[14]= |
The two results are equivalent:
In[15]:= |
Out[15]= |
Sometimes Integrate will give a more concise answer than IntegratePFD:
In[16]:= |
Out[16]= |
In[17]:= |
Out[17]= |
IntegratePFD may be used to generate many alternative forms of an integral by factoring the denominator over different algebraic number fields:
In[18]:= |
Out[18]= |
In[19]:= |
Out[19]= |
In[20]:= |
Out[20]= |
In[21]:= |
Out[21]= |
In[22]:= |
Out[22]= |
In[23]:= |
Out[23]= |
In[24]:= |
Out[24]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License