The y integral is done first. Its limits can depend on the value of x. This ordering is the same as is used in functions like Sum and Table.
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.
This definite integral, however, can be done in terms of a Bessel function.
Here is an integral where the indefinite form can be found, but it is much more efficient to work out the definite form directly.
Just because an integrand may contain special functions, it does not mean that the definite integral will necessarily be complicated.
Special functions nevertheless occur in this result.
The integrand here is simple, but the definite integral is not.
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 .
This subtracts the limits at each end point.
The true definite integral is divergent because of the double pole at .
Here is a more subtle example, involving branch cuts rather than poles.
Taking limits in the indefinite integral gives 0.
The definite integral, however, gives the correct result which depends on . The assumption assures convergence.
Substituting in the limits and yields a strange result involving .
The ordinary Riemann definite integral is divergent.
The Cauchy principal value, however, is finite.
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 .
For the definite integral, however, must satisfy a condition in order for the integral to be convergent.
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.
Here is the result assuming that is real.
The result is discontinuous as a function of . The discontinuity can be traced to the essential singularity of at .
There is no convenient way to represent this answer in terms of Sign, so the Wolfram Language generates an explicit If.