You are on page 1of 3

SHES 2303 MATHEMATICS IN BIOLOGY

1 Double Integrals

The space bounded between a two-variable function f (x, y) and a particular region on
the x-y plane is a three-dimensional object with a certain volume. How do we calculate
the latter? To do this, we first approximate the space using rectangular columns. By
taking infinitely many such infinitesimally thin columns, we finally obtain the required
volume.
1.0
0.8
0.6
y

0.4
0.2
0.0

0.0 0.2 0.4 0.6 0.8 1.0

Figure 1. The base area of rectangular columns used for approximating the required volume (see text).

To see this, let us consider the volume bounded between f (x, y) = 10 and the tri-
angular region below y = x and bounded between 0 and 1 (Figure 1). We know the
exact answer is 1/2 × 1 × 1 × 10 = 5. Without worrying about the exact value, let
us try to approximate the volume by cutting rectangular columns that have 0.1 base
thickness equal and base lengths 0.1, 0.2, . . . , 0.9. Since these rectangular columns all
have the same height, their volume of of each of these rectangular columns is given by
V = Thickness × Vertical Surface Area. This leads to

V1 = 0.1 × (0.9 × 10) = 0.9


V2 = 0.1 × (0.8 × 10) = 0.8
···
V9 = 0.1 × (0.1 × 10) = 0.1

The sum is 4.5, which is not too far away. If we imagine cutting columns with finer and
finer thickness, then in the limit,

1
n−1  
X 1 i 10 (n − 1)n
lim × × 10 = lim 2 = 5,
n→∞
i=1
n n n→∞ n 2
which is the exact value. Note that if we had cut the columns vertically, we would have
obtained the same answer too.
We can generalise the above example for any general, well-behaved f (x, y) as follows.
Suppose the domain of f (x, y) is defined according to some relation x ≥ g(y), with
a < x < b. The vertical area of a slab with thickness y is given by
Z b
f (x, y)dx.
x=g(y)

Summing infinitely many infinitesimally thin slabs gives the volume


Z g −1 (b) Z b 
V = f (x, y)dx dy,
g −1 (a) x=g(y)

which is a double integral. For the example in Figure 1, we have


Z 1Z 1 Z 1 1
y2

V = 10dxdy = 10 (1 − y)dy = 10 y − = 5.
0 y 0 2 0

We can also reverse the order of integration by integrating with respect to y first,
Z 1Z x Z 1
V = 10dydx = 10 ydy = 5.
0 0 0

The reversal of order of integration is a useful trick that can help us complete the inte-
gration process. If you find a particular order of integration tough, try this approach.

EXAMPLE 1. Find Z 1 Z 1
2 +y)
I= √
xe−(x dxdy.
0 y

SOLUTION. Since the e−y part is not a function of x, we can write


!
Z Z 1 1
−y 2
I= e √
xe−x dx dy,
0 y

which leads to
" 2
#1
1 1
−e−x 1 1
Z Z
−y
I= e dy = e−y (e−y − e−1 )dy = (1 + e−2 − 2e−1 ).
0 2 √ 2 0 4
y


2
For probability distributions of two continuous random variables f (x, y) over a suit-
able domain, the double integral must be equal to 1, since the volume in this case is
equivalent to the probability measure. For example, consider the case of two indepen-
dent variables X and Y , both having the uniform pdf for 0 < x < 1 and 0 < y < 1. The
joint pdf is given by
f (x, y) = f (x)f (y) = 1,
where the domain is the unit square with the bottom left corner as the origin. We can
easily check that Z 1Z 1
1dydx = 1,
0 0
since geometrically, this is just the volume of a column with unit square base and unit
height. If we want to find the probability that Y < 0.5 − X, then we just need to find
the set of all points (x, y) that satisfy this relation. This is given by the triangular area
below the line y = 0.5 − x, so the probability is just 1/2 × 1/2 × 1/2 × 1 = 1/8. Using
double integrals, we can check that
1/2 1
1/2 1/2
x x2
−x   
1 1
Z Z Z
2
1dydx = − x dx = − = .
0 0 0 2 2 2 0 8

EXAMPLE 2. Suppose X is the lifespan of males of a particular species, and Y is the


lifespan of females of the same species. Assume that X and Y are independent, and that
1 −x/10 1 −y/20
f (x) = 10 e and f (y) = 20 e . For a randomly chosen pair of male and female,
what is the probability that the male will outlive the female?

SOLUTION. Under the independence assumption, the joint pdf is given by


1 n x y o
f (x, y) = exp − + .
10 · 20 10 20
The domain is the first quadrant. The event of a male outliving a female is defined by
X > Y , which consists of the set of all points (x, y) such that x > y. This means the
required probability is
Z ∞Z x
1 n x y o
P (X > Y ) = exp − + dydx.
0 0 10 · 20 10 20
1
Z ∞  x Z x 1  y
= exp − dx exp − dy
10 0 10 0 20 20
Z ∞
1  x h x i
= exp − 1 − exp(− ) dx
10 0 10 20
1
= .
3
The algebra leading to the final answer has been omitted and is left as an exercise. ♣