Definite Integrals

Integrate[f,x]the indefinite integral
Integrate[f,{x,xmin,xmax}]the definite integral
Integrate[f,{x,xmin,xmax},{y,ymin,ymax}]
the multiple integral

Integration functions.

Here is the integral .
In[1]:=
Click for copyable input
Out[1]=
This gives the multiple integral .
In[2]:=
Click for copyable input
Out[2]=
The integral is done first. Its limits can depend on the value of . This ordering is the same as is used in functions like Sum and Table.
In[3]:=
Click for copyable input
Out[3]=

In simple cases, definite integrals can be done by finding indefinite forms and then computing appropriate limits. But there is a vast range of integrals for which the indefinite form cannot be expressed in terms of standard mathematical functions, but the definite form still can be.

This indefinite integral cannot be done in terms of standard mathematical functions.
In[4]:=
Click for copyable input
Out[4]=
This definite integral, however, can be done in terms of a Bessel function.
In[5]:=
Click for copyable input
Out[5]=
Here is an integral where the indefinite form can be found, but it is much more efficient to work out the definite form directly.
In[6]:=
Click for copyable input
Out[6]=
Just because an integrand may contain special functions, it does not mean that the definite integral will necessarily be complicated.
In[7]:=
Click for copyable input
Out[7]=
Special functions nevertheless occur in this result.
In[8]:=
Click for copyable input
Out[8]=
The integrand here is simple, but the definite integral is not.
In[9]:=
Click for copyable input
Out[9]=

Even when you can find the indefinite form of an integral, you will often not get the correct answer for the definite integral if you just subtract the values of the limits at each end point. The problem is that within the domain of integration there may be singularities whose effects are ignored if you follow this procedure.

Here is the indefinite integral of .
In[10]:=
Click for copyable input
Out[10]=
This subtracts the limits at each end point.
In[11]:=
Click for copyable input
Out[11]=
The true definite integral is divergent because of the double pole at .
In[12]:=
Click for copyable input
Out[12]=
Here is a more subtle example, involving branch cuts rather than poles.
In[13]:=
Click for copyable input
Out[13]=
Taking limits in the indefinite integral gives 0.
In[14]:=
Click for copyable input
Out[14]=
The definite integral, however, gives the correct result which depends on . The assumption assures convergence.
In[15]:=
Click for copyable input
Out[15]=
Integrate[f,{x,xmin,xmax},PrincipalValue->True]
the Cauchy principal value of a definite integral

Principal value integrals.

Here is the indefinite integral of .
In[16]:=
Click for copyable input
Out[16]=
Substituting in the limits and yields a strange result involving .
In[17]:=
Click for copyable input
Out[17]=
The ordinary Riemann definite integral is divergent.
In[18]:=
Click for copyable input
Out[18]=
The Cauchy principal value, however, is finite.
In[19]:=
Click for copyable input
Out[19]=

When parameters appear in an indefinite integral, it is essentially always possible to get results that are correct for almost all values of these parameters. But for definite integrals this is no longer the case. The most common problem is that a definite integral may converge only when the parameters that appear in it satisfy certain specific conditions.

This indefinite integral is correct for all .
In[20]:=
Click for copyable input
Out[20]=
For the definite integral, however, must satisfy a condition in order for the integral to be convergent.
In[21]:=
Click for copyable input
Out[21]=
If is replaced by 2, the condition is satisfied.
In[22]:=
Click for copyable input
Out[22]=
option name
default value
GenerateConditionsAutomaticwhether to generate explicit conditions
Assumptions$Assumptionswhat relations about parameters to assume

Options for Integrate.

With the assumption , the result is always .
In[23]:=
Click for copyable input
Out[23]=

Even when a definite integral is convergent, the presence of singularities on the integration path can lead to discontinuous changes when the parameters vary. Sometimes a single formula containing functions like Sign can be used to summarize the result. In other cases, however, an explicit If is more convenient.

The If here gives the condition for the integral to be convergent.
In[24]:=
Click for copyable input
Out[24]=
Here is the result assuming that is real.
In[25]:=
Click for copyable input
Out[25]=
The result is discontinuous as a function of . The discontinuity can be traced to the essential singularity of at .
In[26]:=
Click for copyable input
Out[26]=
There is no convenient way to represent this answer in terms of Sign, so the Wolfram Language generates an explicit If.
In[27]:=
Click for copyable input
Out[27]=
Here is a plot of the resulting function of .
In[28]:=
Click for copyable input
Out[28]=