Вы находитесь на странице: 1из 9

SHES 2303 MATHEMATICS IN BIOLOGY

1 Finding Volumes using Integration

The idea of finding the area under some curve using infinitely many infintesimally thin
rectangular bars can be extended to the case of finding volumes. Consider a pyramid of
with unit square base. If we cut a thin, square slice of the pyramid (Figure 1), its volume
is given by  2
1 1
v = Base × Thickness = 1 − × .
N N
If we continue to cut such slices all the way up to the tip of the pyramid, then the volume
of the pyramid can be approximated using
N −1  2
X i 1
V =
i=1
N N
1 (N − 1)(N)(2N − 1)
=
N3
 6 
1 1 1
= 1− 2− .
6 N N

Clearly, the actual volume of the pyramid can be found by taking limN →∞ V , which yields
1/3.
0.4

x/2
0.2
f(x)

0.0
−0.2
−0.4

−x/2

0.0 0.2 0.4 0.6 0.8 1.0

Figure 1. Lateral view of a pyramid with unit base. Its volume can be approximated using infinitely
many solids with square base and extremely small thickness. In this particular example, there are only
three such solids, with thickness 0.25.

1
Thus, for solids with known integrable cross-section area A(x) from x = a to x = b,
their volume is given by Z b
A(x)dx.
a

EXAMPLE 1. What is the volume of a cone with height h and base radius r?

SOLUTION. The cross-section area is circular. The general expression for the radius at
any cross-section is given by
r
x,
h
where x is the height variable (which ranges from 0 to h). Therefore, we have

r 2 x2
A(x) = π ,
h2
and
h
πr 2 πr 2 h
Z
V = 2 x2 dx = .
h 0 3

We can represent solids that have volumes with circular cross-section areas on a two-
dimensional graph by “flattening” the solid laterally, and then rotating the regions of
interest around a suitable axis. For example, if we rotate the region between y = x and
the x-axis about the x-axis from x = 0 to x = 1, we generate a cone which has unit
height and unit radius for the circular base.

EXAMPLE 2. What is the volume of the solid that is generated by revolving the region
between y = x2 and the x-axis about the x-axis, from x = 0 to x = 1? What if we change
the axis of revolution to the y-axis, and revolve from y = 0 to y = 1?

SOLUTION. For the first case, we get a Vietnamese conical hat with volume
Z 1
π
V = π(x2 )2 dx = .
0 5
For the second case, the variable of interest is y, so we must reexpress x in terms of y.
We get a bullet head with volume
Z 1
√ π
V = π( y)2 dy = .
0 2

2
2 Integration Techniques

Algebraic manipulation and substitution are two general integration techniques that are
very useful for helping us to evaluate an integral. Here, we shall learn two additional
techniques. When combined with the first two methods, they increase the number of
integrals that can be successfully expressed in closed form.

THEOREM 1 (TC). The integration by parts formula states that, for two variables u
and v, the indefinite integral
Z Z
udv = uv − vdu;

PROOF. Use the Product Rule and the fact that integration is an antiderivative process.

This result
R is easy to use. The idea is that we need to choose our u and dv carefully,
so that vdu is easy to evaluate. Otherwise, integration by parts does not lead to
simplification and is of little use.

EXAMPLE 3. Find the indefinite integral


Z
x sin xdx,

and subsequently evalute the integral from x = 0 to x = π/2.

SOLUTION. Let u = x, and dv = sin xdx. It follows that v = − cos x (it is not necessary
to add a constant because it will be cancelled anyway), and du = dx. This gives
Z Z
x sin xdx = −x cos x − (− cos x)dx = −x cos x + sin x + C.

To find definite integral, we just need to apply part 2 of the Fundamental Theorem of
Calculus. This means
Z π/2
x sin xdx = −x cos x + sin x]π/2
0 = 1.
0

3
EXAMPLE 4. In some cases, we may need to repeatedly apply integration by parts to
solve the problem. Consider the integral
Z
I = x2 ex dx.

Let u = x2 , dv = ex dx. We then have du = 2xdx, and v = ex . This leads to


Z
I = x e − 2 xex dx.
2 x

We then evaluate the integral in the right-hand side using integration by parts again,
with u = x. The resultant integral is given by
 Z 
I = x e − 2 xe − e dx = x2 ex − 2(xex − ex ) + C.
2 x x x

A useful integration technique for dealing with algebraic fractions like


1
,
x(x + 1)

involves splitting such fractions into a sum of several fractions called partial fractions,
and then evaluating these separately. Thus, we may write
1 1 1
= − ,
x(x + 1) x x+1

and accordingly, its indefinite integral is given by


1 1 1
Z Z Z
dx = dx − dx = log |x| − log |x + 1| + C.
x(x + 1) x x+1

A method for decomposing an algebraic fraction f (x)/g(x) into partial fractions is given
as follows.

THE METHOD OF PARTIAL FRACTIONS

Step 1. For g(x), let x − r be a linear factor, and that (x − r)m is the highest power of
x − r that divides g(x). The partial fractions for this factor is given by,

A1 A2 Am
+ +···+ .
x − r (x − r) 2 (x − r)m

Repeat the same procedure for other linear factors of g(x).

4
Step 2. Let x2 + px + q be a quadratic factor of g(x), and suppose (x2 + px + q)n is
the highest power of this factor that divides g(x). The partial fractions for this factor is
given by,
B1 x + C1 B2 x + C2 Bn x + Cn
+ 2 +···+ 2 .
x + px + q (x + px + q)
2 2 (x + px + q)n
Again, repeat the same procedure for other distinct factor of g(x) that cannot be factored
into linear factors with real coefficients.
Step 3. Equate f (x)/g(x) to the sum of all these partial fractions. Multiply both sides
by g(x) to remove the fractional part on the left-hand side, and arrange the terms in
decreasing powers of x.
Step 4. Match coefficients of powers of x on both sides and solve the resultant equations
for the unknown coefficients.

EXAMPLE 5 (TC). Evaluate

−2x + 4
Z
dx.
(x2 + 1)(x − 1)2

SOLUTION. We write
−2x + 4 Ax + B C D
= 2 + + .
(x2 + 1)(x − 1) 2 x +1 x − 1 (x − 1)2

Multiply both sides with (x − 1)2 :

−2x + 4 = (Ax + B)(x − 1)2 + C(x − 1)(x2 + 1) + D(x2 + 1).

Work out the algebra carefully to obtain the solutions

A = 2; B = 1; C = −2; D = 1.

The proper decomposition into partial fractions is therefore


−2x + 4 2x + 1 2 1
= 2 − + .
(x2 + 1)(x − 1) 2 x + 1 x − 1 (x − 1)2

The required integral is given by


Z  
2x + 1 2 1
I = − + dx
x2 + 1 x − 1 (x − 1)2
1
= log(x2 + 1) + tan−1 x − 2 log |x − 1| − +C
x−1

5
3 Improper Integrals
When the upper or lower limits of integration tend to (±) infinity respectively, such an
integral is called an improper integral. Thus, if f (x) is continuous on [a, ∞), we write
Z ∞ Z b
f (x)dx = lim f (x)dx;
a b→∞ a

and if f (x) is continuous on (−∞, b],


Z b Z b
f (x)dx = lim f (x)dx;
−∞ a→−∞ a

and if f (x) is continuous on (−∞, ∞),


Z ∞ Z c Z ∞
f (x)dx = f (x)dx + f (x)dx.
−∞ −∞ c

If the limit is finite, we say that the improper integral is convergent, and its value is
given by the limit. On the other hand, if the limit is infinite, then the improper integral
is divergent, and we assign no particular value to it.

EXAMPLE 6. Evaluate ∞
dx
Z
.
1 xp

SOLUTIONS. If p 6= 1,
b b
dx x−p+1 1
Z
I= = = (b1−p − 1).
1 xp −p + 1 1 1−p

Therefore,
1
lim I = ,
b→∞ p−1
if p > 1, and limb→∞ I = ∞ if p < 1. For the case of p = 1,
Z ∞
dx
= lim log b = ∞.
1 x b→∞

6
EXAMPLE 7. Evaluate ∞
1
Z
dx.
−∞ 1 + x2

SOLUTION. We can split the integral into two parts:


Z ∞ Z 0 Z ∞
1 1 1
dx = dx + dx.
−∞ 1 + x −∞ 1 + x 1 + x2
2 2
0

By symmetry (f (x) = f (−x)), we need only evaluate one of the integrals on the right-
hand side, and then multiple it by 2 to obtain the answer. Now,
Z ∞
1 π
dx = lim tan−1 x]b0 = .
0 1+x 2 b→∞ 2
The solution is therefore π. ♣

4 Monte Carlo Integration

Numerical integration can be used to evaluate integrals that have no closed forms. Even
then, this method may be too complicated to program some times, particularly for multi-
dimensional integrals. A method known as Monte Carlo integration provides a statistical
solution to difficult integration problems. The scientists who first worked on the atomic
bomb project in USA used this approach to calculate complicated integrals in their math-
ematical models.
The idea of Monte Carlo integration is simple. Suppose we are interested in the area
under the curve y = x2 from x = 0 to x = 1. This area is of course 1/3. Let us randomly
throw darts at the region (0, 1) × (0, 1) (Figure 2). If the dart is under the curve y = x2 ,
we score a hit. Otherwise, we score a 0. If we throw N times, we can estimate the area
under curve as
#Hits
Area ≈ .
N
As N becomes larger, intuitively our estimate of A becomes more accurate. However,
because of the random nature of scoring points, we shall not obtain the exact solution
- this is not a serious problem if we can provide a measure of the degree of precision of
our estimate (the standard error).

7
1.0
0.8
0.6
x^2

0.4
0.2
0.0

0.0 0.2 0.4 0.6 0.8 1.0

Figure 2. Monte Carlo integration of y = x2 . In this example, 30 points out of 100 fall under y = x2 ,
giving the estimate of the area as 0.3.

Specifically, Monte Carlo integration of the preceding problem is done as follows. We


can view the integral as Z 1
I= x2 × 1dx,
0

where f (x) = 1 is the probability density function of the uniform distribution in the unit
interval. By definition, this integral can be written as the expectation

E(X 2 ),

where X is a uniform random variable on the unit interval. Suppose we generate N


random variables from this distribution, and evaluate x21 , . . . , x2N using them. We can
approximate E(X 2 ) using
N
1 X 2
E(X 2 ) ≈ x = µ̂.
N i=1 i
The variance of this estimator is given by
N
!
1 1 X 2
Variance = (x − µ̂)2 .
N N − 1 i=1 i

The standard error (SE) is obtained by taking the square root of the variance. In princi-
ple, we can obtain an arbitrarily accurate solution by making N as large as we have the
resources (and patience) to compute.

8
EXAMPLE 8. Evaluate Z ∞
xe−x dx.
0

SOLUTION. The exact solution using integration by parts is 1 (Verify). We note that
f (x) = e−x is the probability density function of an exponential random variable (Verify
that its integral over the positive real line is 1). Suppose we draw N values from this
exponential distribution. The integral can then by approximated by
N
1 X
µ̂ = xi .
N i=1

For my particular simulation with N = 10000, I obtained µ̂ = 0.99836 (to 5 decimal


places), with SE given by 0.01016. Within 2 SE from µ̂, we have the interval [0.97804 ,
1.01868] (the approximate 95% confidence interval). ♣

KTF 2009/2010(2)
9

Вам также может понравиться