You are on page 1of 10

SHES 2303 MATHEMATICS IN BIOLOGY

1 The Integral as an Antiderivative


We have learned that the first two corollaries of the Mean Value Theorem guarantee that
if we can find some function g(x) such that if f ′ (x) = g ′(x), then f (x) = g(x) + C. This
gives a rule for reversing the derivative operation so that we can recover the function
that leads to the derivative.

DEFINTION 1 (TC). We call a function F (x) an antiderivative of a function f (x) if

F ′ (x) = f (x),

for all x in the domain of f (x). The set of all antiderivatives of f (x) is given by the
indefinite integral of f (x) with respect to x,
Z
f (x)dx,
R
where is called the integral sign. The function f (x) is called the integrand, and x is
the variable of integration.

x2 dx.
R
EXAMPLE 1. Evaluate

SOLUTION.
x3
Z
x2 dx = + C.
3
You can easily check that the derivative of the antiderivative F (x) = x3 /3 + C is given
by the integrand. ♣

EXAMPLE 2. Check the correctness of the following indefinite integral.


Z
x cos xdx = x sin x + C.

SOLUTION. Differentiating the antiderivative x sin x + C with respect of x, we obtain


x cos x + sin x, which does not equal the integrand. The solution is incorrect. ♣

Two rules of manipulating indefinite integration similar to standard algebra are given
as follows.
Z Z
Constant Multiple Rule: kf (x)dx = f (x)dx
Z Z Z
Sum and Difference Rule: [f (x) ± g(x)]dx = f (x)dx ± g(x)dx.
1
EXAMPLE 3. Evaluate Z
(1 − x)(1 + x)dx.

SOLUTION. If we expand the integrand, we get 1 −x2 . The required integral is therefore
x − x3 /3 + C. Note that
Z Z Z
(1 − x)(1 + x)dx 6= (1 − x)dx · (1 + x)dx,

so you should not make this kind of mistake! ♣

EXAMPLE 4. Evaluate Z
sin2 xdx.

SOLUTION. Use trigonometric identities to help you if the solution is not obvious (it is
not −(cos3 x)/3). From the double-angle identity

cos 2x = 1 − 2 sin2 x,

we can replace the integrand with (1 − cos 2x)/2. The resultant integral is therefore
 
1 − cos 2x 1 sin 2x
Z Z
2
sin xdx = dx = x− + C.
2 2 2

Another useful integration rule concerns power functions. Recall that the implicit differ-
entiation of un+1 with respect to x is given by

d(un+1 ) du
= (n + 1)un ,
dx dx
therefore
un+1
 
d du
= un .
dx n+1 dx
The antiderivative of the function on the left-hand side with respect to x is given by

un+1
 n+1 
d u n du
Z Z Z
+C = dx = u dx = un du,
n+1 dx n + 1 dx

where we have cancelled dx in the last step by treating it as a differential.

2
EXAMPLE 5. Evaluate Z √
1 + x2 · 2xdx.

SOLUTION. We first try the substitution method, with y = 1+x2 . Therefore dy = 2xdx,
and we have
Z √ Z
2
1 + x · 2xdx = y 1/2 dy
2 3/2
= y +C
3
2
= (1 + x2 )3/2 + C.
3
A faster alternative using differentials directly is shown as follows:
Z √ Z √
2
1 + x · 2xdx = 1 + x2 d(1 + x2 )
2
= (1 + x2 )3/2 + C.
3

EXAMPLE 6. Evaluate
2t
Z
dt.
(1 + t2 )1/3

SOLUTION. You can try the substitution method using u = (1 + t2 )1/3 , or u = 1 + t2 .


The fast way of doing things is to note that
2t 1
Z Z
2 1/3
dt = 2 1/3
d(1 + t2 )
(1 + t ) (1 + t )
3
= (1 + t2 )2/3 + C.
2

2 The Integral as the Limit of Riemann Sums

In the preceding section, we have learned the notion of the indefinite integral as the
antiderivative. Here, we shall learn about the concept of a definite integral, which allows
us to calculate important quantities like area and volume. To begin, let us consider the
problem of finding the area under y = x2 from x = 0 to x = 2. As a crude approximation,
we may choose to divide the interval (0,2) at x = 1 to create two rectangular bars, as
shown in Figure 1.
3
4
3
x^2

2
1
0

0.0 0.5 1.0 1.5 2.0

Figure 1. A simple approximation of the area under y = x2 from x = 0 to x = 4 using two rectangular
bars. Note the excessive overestimation.

The area is 1(1)2 + 1(2)2 = 5, which is an overestimate. Now, let us divide the interval
at x = 1/2, 1, 3/2. This gives rise to four rectangular bars (Figure 2), and our estimate
of the area is now (1/2)(1/2)2 + (1/2)(1)2 + (1/2)(3/2)2 + (1/2)(22) = 3.75, which is an
improvement, but still an overestimate.
4
3
x^2

2
1
0

0.0 0.5 1.0 1.5 2.0

Figure 2. Another approximation of the area under y = x2 from x = 0 to x = 4 using four rectangular
bars. Note the overestimation has been somewhat reduced.

4
These two examples give us an idea on how to obtain more and more accurate es-
timates of the area under x2 . If we could divide the interval such that finer and finer
rectangular bars are used to approximate the area, perhaps in the limit of of an infinites-
imally small base length, our estimation will be exact? Let us find out if our intuition
is correct. Suppose we divide the interval at N − 1 equally spaced points. The base
length of the resultant rectangular bars is then 2/N. This means the rectangular bars
have height equal to the square of x at the following values of x,
2 4 6 2N − 2 2N
, , ,..., , .
N N N N N
The sum of the N rectangular bars is given by
N
X 2
S = x2i ×
i=1
N
N  2
X 2i 2
= ×
i=1
N N
N
X i2
= 8
i=1
N3
8 N(N + 1)(2N + 1)
= 3
×
N  6 
4 1 1
= 1+ 2+
3 N N

In the event that the base length becomes infinitesimally small, N → ∞. The required
area is therefore given by the limit of the sum,
8
lim S = .
N →∞ 3
In general, for any function f (x) partitioned at points xk (k = 1, 2, . . . , N), with base
length between consecutive xk values given by δxk , the area of under f (x) over an interval
[a, b] is given by limit of the sum
N
X
lim f (xk )δxk .
N →∞
k=1

This limit sum is called the Riemann sum, and it is written as


Z b
f (x)dx,
a

where a is the
R lower limit of integration, and bPis the upper limit of integration. The
integral sign is an elongation of the finite sum , indicating summation over infinitely
many infinitesimally thin rectangular bars.
5
DEFINITION 2 (TC). If f (x) is nonnegative and integrable over a closed interval [a, b],
then the area under the curve f (x) from a to b is given by the definite integral of f (x)
from a to b, Z b
A= f (x)dx.
a
This definition provides a basis for us to use integrals to calculate areas, and to use areas
to calculate integrals.

EXAMPLE 7. Evaluate Z 2
xdx.
1

SOLUTION. The definite integral corresponds to the area under y = x from x = 1 to


x = 2, which is a trapezium. Its value is therefore (1/2)(1)(1 + 2) = 3/2. ♣

3 The Fundamental Theorems of Calculus

Although we have successfully defined definite integrals, we still lack a general theory for
manipulating such integrals. Except for some cases where the geometry is simple (e.g.
Example 7), it is tedious indeed if we need to evaluate the Riemann sum every time
we wish to find the value of a definite integral. Leibniz and Newton were instrumental
in developing the following theorems which made calculus simple and powerful to use,
thus completely changed the course of history by opening up possibilities of scientific
advancement at an unprecendented pace.

THEOREM 1 (TC). The Mean Value Theorem (MVT) for definite integrals states that
if f (x) is continuous on [a, b]. then at some point c in [a, b],
b
1
Z
f (c) = f (x)dx.
b−a a

We omit the proof here. The graphical representation of Theorem 1 is given in Figure 3.
We now state the two fundametal theorems that form the bedrock of calculus. They
come in two parts.

6
f(x)

a c b

Figure 3. The MVT says that we can always find a c so that the area under the curve can fit into a
rectangle with area given by f (c) · (b − a). Geometrically, this corresponds to cutting the shaded region
above the rectangle and then repositioning it into the unshaded region of the rectangle.

THEOREM 2 (TC). The Fundamental Theorem of Calculus (Part 1): If f (x) is contin-
uous on [a, b], then the function
Z x
F (x) = f (t)dt,
a

has a derivative at every point x in [a, b], and


Z x
dF (x) d
= f (t)dt = f (x).
dx dx a

EXAMPLE 8. Find the derivative of the following functions with respect to x:


Z x Z x2
cos tdt, cos tdt.
0 0

SOLUTION. Using the FTC(1), the solution for the first integral is cos x. For the second
integral, we need to use the Chain Rule. If we treat the integral as y, and then make the
variable change u = x2 , then
Z x2 ! Z u 
d d du
cos tdt = cos tdt ·
dx 0 du 0 dx
= 2x cos x2 .


7
THEOREM 3 (TC). The Fundamental Theorem of Calculus (Part 2): If f (x) is contin-
uous on [a, b], and F (x) is any antiderivative of f (x) on [a, b], then
Z b
f (x)dx = F (b) − F (a).
a

This result is also sometimes called the Integral Evaluation Theorem.

Theorem 3 guarantees that if we can find the antiderivative of f (x), then the value
of a definite integral can be found by just evaluating the antiderivative at the upper and
lower integration limits, and then taking their difference. This significantly simplifies the
process of evaluating a definite integral without the need to find the limit of Riemann
sums.

EXAMPLE 9. Evaluate Z 2
x2 dx.
0

SOLUTION. Using the FTC(2),


2 2
x3 8
Z
2
x dx = = .
0 3 0 3

Note that the answer is exactly what we found using the definition of the Riemann sum
in our introductory example. ♣

The following is a list of rules for manipulating definite integrals.


Z a Z b
Changing order of integration : f (x)dx = − f (x)dx
b a
Z a
Zero integral : f (x)dx = 0
a
Z b Z b
Constant multiple : kf (x)dx = k f (x)dx
a a
Z b Z b Z b
Sum and difference : [f (x) ± g(x)] = f (x)dx ± g(x)dx
a a a
Z b Z c Z c
Additivity : f (x)dx + f (x)dx = f (x)dx
a b a

8
4 Numerical Integration

The evaluation of the definite integral using the Fundamental Theorem of Calculus de-
pends on our ability to find an antiderivative. When the latter is hard to find, or cannot
be expressed in a convenient closed form, we need to resort to numerical methods. This
generally involves the use of a computer, so a little programming skill helps a lot. We
will learn two commonly used rules here.
Rb
THE TRAPEZOIDAL RULE (TC). To approximate a
f (x)dx, use the sum of trape-
zoids,
1 1 1 1
T = h(y0 + y1 ) + h(y1 + y2 ) + · · · + h(yn−2 + yn−1 ) + h(yn−1 + yn )
2 2 2 2
h
= (y0 + 2y1 + 2y2 + · · · + 2yn−1 + yn ) ,
2
where yi are the values of f at the partition points xi = a + ih, where h = (b − a)/n.

Figure 4 shows an example of approximating the area under f (x) = x2 from x = 0


to x = 2 using the Trapezoidal Rule, with n = 4 trapezoids. The approximate area is
2.75, so the relative error is about 3% . It can be shown (try to write a program) that if
n = 100, the approximation is 2.6668, with a relative error of 0.005%. In principle, we
can achieve any desired level of accuracy by making n very large. Of course, in pratice
we are constrained by computing and time resources.
4

1.5625
3
x^2

0.8125
2

0.3125
1

0.0625
0

0.0 0.5 1.0 1.5 2.0

Figure 4. An application of the Trapezoidal Rule with n = 4 partitions to approximate the area under
x2 from x = 0 to x = 2. The area of each trapezoid is indicated.

9
We managed to calculate the relative error in the preceding example because we
already know the answer. In general, we do not, so it is useful to know that the upper
bound of error for the Trapezoidal Rule is given by
b−a 2
h M,
12
where M is any upper bound for the values of |f ′′ (x)| on [a, b]. Using the same example
with n = 4, we have |f ′′ (x)| = |2| = 2, so we can choose M = 2 as the upper bound.
Since h = (2 − 0)/4 = 1/2, our upper bound of error is 1/12. In this case, the bound is
sharp, because 2.75 − 1/12 = 8/3. Subsequently, we can find the upper bound of relative
error.
Here’s another useful numerical integration method.
Rb
THE SIMPSON RULE (TC). To approximate a
f (x)dx, use the sum of parabolic seg-
ments,
h
S = (y0 + 4y1 + 2y2 + 4y3 + · · · + 2yn−2 + 4yn−1 + yn ),
3
where yi are the values of f at the partition points xi = a + ih, where h = (b − a)/n, and
n is an even number.

For a proof of this rule see Appendix 5 in TC. Let’s see how well this rule works.
Using the same example with n = 4 and h = 1/2, we obtain
1
S = (0 + 4(1/2)2 + 2(1)2 + 4(3/2)2 + 22 ) = 8/3,
6
which is exact in this particular case. The upper bound for error using Simpson’s Rule
is given by
b−a 4
h M,
180
where M is an upper bound for the values of |f (4) | on [a, b]. In this example, |f (4) | = 0,
so we can choose M = 0; this implies that no error is incurred using this rule in this
particular example (not surprising because x2 is a parabolic curve!).

KTF 2009/2010(2)
10

You might also like