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.
The first fundamental theorem of calculus allows definite integrals to be computed in terms of indefinite integrals, since if is the indefinite integral for a continuous function , then
(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 the Wolfram Language 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 EulerMascheroni 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 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 ,
(10)
 
(11)
 
(12)
 
(13)
 
(14)

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
(15)

which is nontrivially equal to 0.
Some definite integrals, the first two of which are due to Bailey and Plouffe (1997) and the third of which is due to Guénard and Lemberg (2001), which were identified by Borwein and Bailey (2003, p. 61) and Bailey et al. (2007, p. 62) to be "technically correct" but "not useful" as computed by Mathematica Version 4.2 are reproduced below. More recent versions of Wolfram Language return them directly in the same simple form given by Borwein and Bailey without even the need for additional simplification:
(16)
 
(17)
 
(18)
 
(19)
 
(20)
 
(21)

(OEIS A091474, A091475, and A091476), where is Catalan's constant. A fourth integral proposed by a challenge is also trivially computable in modern versions of the Wolfram Language,
(22)
 
(23)

(OEIS 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
(24)
 
(25)

(OEIS A127196), where is the EulerMascheroni constant. This integral (in the form considered originally by Oloa) is the case of the class of integrals
(26)

previously studied by Glasser. The closed form given above was independently found by Glasser and Oloa (L. Glasser, pers. comm., Feb. 2, 2010; O. Oloa, pers. comm., Feb. 2, 2010), and proofs of the result were subsequently published by Glasser and Manna (2008) and Oloa (2008). Generalizations of this integral have subsequently been studied by Oloa and others; see also Bailey and Borwein (2008).
An interesting class of integrals is
(27)

which have the special values
(28)
 
(29)
 
(30)

(Bailey et al. 2007, pp. 42 and 60).
An amazing integral determined empirically is
(31)

where
(32)
 
(33)

(Bailey et al. 2007, p. 61).
A complicatedlooking definite integral of a rational function with a simple solution is given by
(34)

(Bailey et al. 2007, p. 258).
Another challenging integral is that for the volume of the Reuleaux tetrahedron,
(35)
 
(36)
 
(37)

(OEIS A102888; Weisstein).
Integrands that look alike could provide very different results, as illustrated by the beautiful pair
(38)
 
(39)
 
(40)

due to V. Adamchik (OEIS A115287; Moll 2006; typo corrected), where is the omega constant and is the Lambert Wfunction. 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. 143144).
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 NewtonCotes 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 3point formulas are called the trapezoidal rule and Simpson's rule, respectively. The 5point 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 bruteforce 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 is not clear what the integrand physically represents (it resembles computation of a moment of inertia, but that would give a factor rather than the given ).