MATHEMATICA TUTORIAL

# 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 .
 Out[1]=
This gives the multiple integral .
 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.
 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.
 Out[4]=
This definite integral, however, can be done in terms of a Bessel function.
 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.
 Out[6]=
Just because an integrand may contain special functions, it does not mean that the definite integral will necessarily be complicated.
 Out[7]=
Special functions nevertheless occur in this result.
 Out[8]=
The integrand here is simple, but the definite integral is not.
 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 .
 Out[10]=
This subtracts the limits at each end point.
 Out[11]=
The true definite integral is divergent because of the double pole at .
 Out[12]=
Here is a more subtle example, involving branch cuts rather than poles.
 Out[13]=
Taking limits in the indefinite integral gives 0.
 Out[14]=
The definite integral, however, gives the correct result which depends on . The assumption assures convergence.
 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 .
 Out[16]=
Substituting in the limits and yields a strange result involving .
 Out[17]=
The ordinary Riemann definite integral is divergent.
 Out[18]=
The Cauchy principal value, however, is finite.
 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 .
 Out[20]=
For the definite integral, however, must satisfy a condition in order for the integral to be convergent.
 Out[21]=
If is replaced by 2, the condition is satisfied.
 Out[22]=
 option name default value GenerateConditions Automatic whether to generate explicit conditions Assumptions \$Assumptions what relations about parameters to assume

Options for Integrate.

With the assumption , the result is always .
 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.
 Out[24]=
Here is the result assuming that is real.
 Out[25]=
The result is discontinuous as a function of . The discontinuity can be traced to the essential singularity of at .
 Out[26]=
There is no convenient way to represent this answer in terms of Sign, so Mathematica generates an explicit If.
 Out[27]=
Here is a plot of the resulting function of .
 Out[28]=

## Tutorial CollectionTutorial Collection

New to Mathematica? Find your learning path »
Have a question? Ask support »