6 Numerical quadrature
6.1 Introduction
Engineering and scientific calculations often require the evaluation of integrals. To
calculate the total amount of a quantity (e.g. mass, number of cells, or brightness of
an image obtained from a microscope/camera) that continuously varies with respect
to an independent variable such as location or time, one must perform integration.
The concentration or rate of the quantity (e.g. concentration of substrate or drug,
intensity of light passing through a microscope, position-dependent density of a
material) is integrated with respect to the independent variable, which is called the
integration variable. Integration is the inverse of differentiation. A derivative mea-
sures the rate of change of a quan tity, e.g. the speed of travel vðtÞ is obtained by
measuring the change in distance s with respect to time elapsed, or vtðÞ¼ds=dt.
A definite integral I, on the other hand, is a multiplicative operation and calculates
the product of a function with an infinitesimal increment of the independent varia-
ble, summed continuously over an interval, e.g. the distance traveled is obtained by
integrating speed over an interval of time, or s ¼
Ð
t
f
0
vtðÞdt. The integration process
seeks to find the function gðxÞ when its derivative g
0
ðxÞ is provided. Therefore, an
integral is also called an anti-derivative, and is defined below.
I ¼ gxðÞ¼
ð
b
a
g
0
xðÞdx ¼
ð
b
a
fxðÞdx;
where fðxÞis called the integrand, x is the variable of integration such that a x b,
and a and b are the limits of integration. If the integrand is a well-behaved, conti-
nuous function, i.e. it does not become infinite or exhibit discontinuities within the
bounds of integration, an analytical solution to the integral may exist. An analytical
solution is the preferred method of solution because it is exact, and the analytical
expression can lend insight into the process or system being investigated. The effects
of modifying any of the process parameters are straightforward and intuitive.
However, not all integrals are amenable to an analytical solution. Analytical
solutions to integrals do not exist for certain integrand functions or groups of
functions, i.e. the anti-derivative of some functions are not defined. Or, it may be
impossible to evaluate an integral analytically because the function becomes singular
(blows up) at some point within the interval of integration, or the function is not
continuous. Even if an analytical solution does exist, it may happen that the solution
is too time-consuming to find or difficult to compute. Sometimes, the functional
form of the integrand is unknown and the only available information is a discrete
data set consisting of the value of the function at certain values of x, the integration
variable. When any of the above situations are encountered, we use numerical
methods of integration to obtain the value of the definite integral. The use of
numerical methods to solve a definite integral is called numerical quadrature.