A definite integral is an
integral  | (1) |
with upper and lower limits. If

is restricted to lie on the
real line, the definite integral is known as a
Riemann integral (which is the usual definition encountered in elementary textbooks). However, a general definite integral is taken in the complex plane, resulting in the
contour integral  | (2) |
with

,

, and

in general being complex numbers and the path of integration from

to

known as a
contour.
 | (3) |
This result, while taught early in elementary
calculus courses, is actually a very deep result connecting the purely algebraic
indefinite integral and the purely analytic (or geometric) definite integral. Definite integrals may be evaluated in
Mathematica using
Integrate[
f,
x,
a,
b
].
The question of which definite integrals can be expressed in terms of
elementary functions is not susceptible to any established theory. In fact, the problem belongs to transcendence theory, which appears to be "infinitely hard." For example, there are definite integrals that are equal to the
Euler-Mascheroni constant 
. However, the problem of deciding whether

can be expressed in terms of the values at rational values of
elementary functions involves the decision as to whether

is rational or algebraic, which is not known.
Integration rules of definite integration include
 | (4) |
and
 | (5) |
For

,
 | (6) |
If

is continuous on
![[a,b]](http://mathworld.wolfram.com/images/equations/DefiniteIntegral/Inline16.gif)
and

is continuous and has an antiderivative on an
interval containing the values of

for

, then
 | (7) |
Watson's triple integrals are examples of (very) challenging
multiple integrals. Other challenging integrals include
Ahmed's integral and
Abel's integral.
Definite integration for general input is a tricky problem for computer mathematics packages, and some care is needed in their application to definite integrals. Consider the definite integral of the form
 | (8) |
which can be done trivially by taking advantage of the trigonometric identity
 | (9) |
Letting

,
Many computer mathematics packages, however, are able to compute this integral only for specific values of

, or not at all. Another example that is difficult for computer software packages is
![int_(-pi)^piln[2cos(1/2x)]dx=0,](http://mathworld.wolfram.com/images/equations/DefiniteIntegral/NumberedEquation10.gif) | (15) |
which is nontrivially equal to 0.
Some definite integrals, the first two of which are due to Bailey and Plouffe and the third of which is due to Guénard and Lemberg (2001), were identified by Borwein and Bailey (2003, p. 61) and Bailey
et al. (2006, p. 62) to be "technically correct" but "not useful" as computed by
Mathematica are reproduced below. Happily,
Mathematica Version 5 returns them in the same simple form given by Borwein and Bailey without even the need for additional simplification,
(Sloane's
A091474,
A091475, and
A091476), where

is
Catalan's constant. A fourth integral proposed by a challenge is also trivially computable in
Mathematica,
(Sloane's
A091477), where

is
Apéry's constant.
A pretty definite integral due to L. Glasser and O. Oloa (L. Glasser, pers. comm., Jan. 6, 2007) is given by
An interesting class of integrals is
 | (27) |
which have the special values
(Bailey et al. 2006, pp. 42 and 60).
An amazing integral determined empirically is
![2/(sqrt(3))int_0^1(ln^6xtan^(-1)((xsqrt(2))/(x-2)))/(x+1)dx=1/(81648)[-229635L_3(8)+29852550L_3(7)ln3-1632960L_3(6)pi^2+27760320L_3(5)zeta(3)-275184L_3(4)pi^4+36288000L_3(3)zeta(5)-30008L_3(2)pi^6-57030120L_3(1)zeta(7)],](http://mathworld.wolfram.com/images/equations/DefiniteIntegral/NumberedEquation12.gif) | (31) |
where
(Bailey et al. 2006, p. 61).
A complicated-looking definite integral of a
rational function with a simple solution is given by
 | (34) |
(Bailey et al. 2006, p. 258).
Another challenging integral is that for the volume of the
Reuleaux tetrahedron,
(Sloane's
A102888; Weisstein).
Integrands that look alike could provide very different results, as illustrated by the beautiful pair
due to V. Adamchik (Sloane's
A115287; Moll 2006; typo corrected), where

is the
omega constant and

is the
Lambert W-function. These can be computed using contour integration.
Computer mathematics packages also often return results much more complicated than necessary. An example of this type is provided by the integral
 | (41) |
for

and

which follows from a simple application of the
Leibniz integral rule (Woods 1926, pp. 143-144).
There are a wide range of methods available for
numerical integration. Good sources for such techniques include Press
et al. (1992) and Hildebrand (1956). The most straightforward numerical integration technique uses the
Newton-Cotes formulas (also called
quadrature formulas), which approximate a function tabulated at a sequence of regularly spaced
intervals by various degree
polynomials. If the endpoints are tabulated, then the 2- and 3-point formulas are called the
trapezoidal rule and
Simpson's rule, respectively. The 5-point formula is called
Boole's rule. A generalization of the
trapezoidal rule is
romberg integration, which can yield accurate results for many fewer function evaluations.
If the analytic form of a function is known (instead of its values merely being tabulated at a fixed number of points), the best numerical method of integration is called
Gaussian quadrature. By picking the optimal
abscissas at which to compute the function, Gaussian quadrature produces the most accurate approximations possible. However, given the speed of modern computers, the additional complication of the
Gaussian quadrature formalism often makes it less desirable than the brute-force method of simply repeatedly calculating twice as many points on a regular grid until convergence is obtained. An excellent reference for
Gaussian quadrature is Hildebrand (1956).
The June 2, 1996 comic strip FoxTrot by Bill Amend (Amend 1998, p. 19; Mitchell 2006/2007) featured the following definite integral as a "hard" exam problem intended for a remedial math class but accidentally handed out to the normal class:
 | (42) |
The integral corresponds to integration over a
spherical cone with opening angle

and radius 4. However, it's not clear what the integrand physically represents (it resembles slightly computation of a moment of inertia, but that would give a factor

rather than the given

).