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

SHES 2303 MATHEMATICS IN BIOLOGY

1 Derivatives of Trigonometric, Exponential, and Log-


arithmic Functions

In this section, we will learn how to find derivatives of three types of transcendental
functions.

THEOREM 1 (TC). The derivative of y = sin x is given by

dy
= sin x.
dx

PROOF. By definition,

δy sin(x + h) − sin x
=
δx h
sin x cos h + cos x sin h − sin x
=
h
sin x(cos h − 1) + cos x sin h
=
h
Taking limit, we have
δy cos h − 1 sin h
lim = (sin x) lim + (cos x) lim .
h→0 δx h→0 h h→0 h

Since the two limits are of the form 0/0, in principle we can apply L’Hôpital’s Rule.
However, this is a bit like cheating, since we are not supposed to know what the derivative
of sine and cosine functions are at this point. The trick is to use the Sandwich Theorem.
We know that (sketch a graph)

sin h
cos h ≤ ≤ 1,
h
within a small neighbourhood from h = 0 (say [−π, π]). Both cos h and 1 have 1 as
the limit as h tends to 0. It follows that limh→0 sin h/h = 1. Subsequently, we use the
half-angle formula
cos 2y = 1 − 2 sin2 y,
to help us find the other limit involving cos h. Let y = h/2, we have

cos h = 1 − 2 sin2 (h/2),

1
therefore,
cos h − 1 − sin(h/2)
lim = 2 lim · sin(h/2) = (−1)0 = 0.
h→0 h h→0 h/2
These two results imply that
δy
lim = cos x.
h→0 δx

THEOREM 2 (TC). The derivative of y = cos x is given by

dy
= − sin x.
dx

PROOF. I leave it as an exercise. ♣

THEOREM 3 (TC). The derivative of y = tan x is given by

dy
= sec2 x,
dx
where sec x = 1/ cos x.

PROOF. Use the Quotient Rule. ♣

THEOREM 4. The derivative of y = tan−1 x is given by


dy 1
= .
dx 1 + x2

PROOF. Since y = tan−1 x, we have tan √y = x (which implies that the hypotenuse of the
corresponding right-angled triangle is 1 + x2 ). Differentiating both sides with respect
to x,
1 dy
= 1
cos2 y dx
dy 1
= cos2 y = .
dx 1 + x2

The derivative of other inverse trigonometric functions are given as exercises.

2
THEOREM 5. The derivative of y = log x is given by
dy 1
= .
dx x

PROOF. By definition,
dy log(x + h) − log x
= lim
dx h→0
 h 
1 h
= lim log 1 + ,
h→0 h x
1 log(1 + t)
= lim .
x t→0 t
We note that log(1 + t) ≤ t (make a sketch to show this), and in particular, that log(1 +
t) ≈ t for small values of t. This means that when t is small, (log(1 + t))/t ≈ 1. Hence,
log(1 + t)
lim = 1.
t→0 t

THEOREM 6 (TC). The derivative of y = ex is given by


dy
= ex .
dx

PROOF. The simple exponential function is the only function where the derivative is
equal to the function itself. To see this, we let y = ex , which leads to log y = x.
Differentiating both sides with respect to x, we have
1 dy
= 1
y dx
dy
= y = ex .
dx
Note that we have used implicit differentiation for d(log y)/dx. ♣

THEOREM 7 (TC). The derivative of y = log g(x) is given by


dy g ′(x)
= ;
dx g(x)
and that of z = eh(x) , by
dz
= h′ (x)eh(x) .
dx

PROOF. Use the Chain Rule. ♣

Together with the various rules for performing differentiation, what you have learned
so far about derivatives should allow you to solve many problems.
3
EXAMPLE 1. Find the derivative of f (x) = (1 + log(x)/x)etan
−1 x
for x ≥ 1.

SOLUTION. The function f (x) is of the type [g(x)]h(x) , so it may not be clear how to
proceed at first. We will therefore use the common trick of writing

[g(x)]h(x) = exp{h(x) log g(x)}.

From here, it is clear that

d([g(x)]h(x) ) d(h(x) log g(x))


= [g(x)]h(x)
dx  dx 
g ′ (x)
= h(x) + (log g(x))h (x) [g(x)]h(x) .

g(x)

Therefore, you only need to find out about g ′(x) and h′ (x), and then replace them into the
preceding formula. In our case, g(x) = 1 + log(x)/x and h(x) = etan x . The derivatives
−1

of these two functions are given by

x(1/x) − log x(1) 1 − log x


g ′ (x) = 2
=
x x2
1
etan x .
−1
h′ (x) = 2
1+x
You should find that f ′ (x) = 0 occurs at about x = 3.97.
3.0
2.5
(1 + log(x)/x)^(exp(atan(x)))

2.0
1.5
1.0

2 4 6 8 10

−1
Figure 1. Graph of f (x) = (1 + log(x)/x)etan x
.

4
EXAMPLE 2. The normal probability density function is given by
(x − µ)2
 
1
f (x) = √ exp − .
2πσ 2σ 2
Find f ′ (x); subsequently, show that f ′ (x) = 0 at x = µ.

SOLUTION. Implicit differentiation of f (x) yields


(x − µ)2 (x − µ)2
   
′ 1 d
f (x) = √ − exp −
2πσ dx 2σ 2 2σ 2
(x − µ)2
 
−1 (x − µ)
= √ exp − .
2πσ σ 2 2σ 2
Clearly, f ′ (x) = 0 when x = µ. Note that if x > µ, then f (x) < 0; and if x < µ, then
f (x) > 0. ♣

EXAMPLE 3. The logistic growth curve in Fig. 1 (Week 1 notes) is drawn from the
function
13
f (t) = .
1 + e3.3−0.22t
Find f ′ (t), and show that limt→∞ f ′ (x) = 0. Furthermore, show that limt→∞ f (t) = 13.

SOLUTION. Using the Negative Power Rule and the “Inside-Outside” Rule,
 
d 3.3−0.22t

f (t) = 13 × (−1) (1 + e ) (1 + e3.3−0.22t )−2
dt
= 13(0.22)e3.3−0.22t (1 + e3.3−0.22t )−2 .
Let u = e3.3−0.22t . Therefore, t = (3.3 − log u)/0.22. This means that t → ∞ is equivalent
to u → 0. It follows that
u
lim f ′ (t) = 13(0.22) lim = 0.
t→∞ u→0 (1 + u)2

This result means that the growth of bacteria practically stops when t becomes sufficiently
large. To show the final part, we just need to show that
lim (1 + e3.3−0.22t ) = 1,
t→∞
which is left as an exercise. ♣

We conclude this section with some results for hyperbolic functions. The hyperbolic
cosine and hyperbolic sine of x are given by
ex + e−x ex − e−x
cosh x = ; sinh x = ,
2 2
respectively. The rest of the hyperbolic functions are analogously defined as those of the
trigonometric functions. We just show two more examples. The derivative of hyperbolic
functions are given as exercises.
sinh x 1 2
tanh x = ; sech x = = x .
cosh x cosh x e + e−x
5
2 Finding Maximum and Minimum Values

The largest and smallest values that a function could take deserve special interest, and
calculus is a powerful method for finding these values.

DEFINITION 1 (TC). Let f be a function with domain D. Then we say that f (c) is the
absolute maximum value on D, if and only if f (x) ≤ f (c), for all x in D; we say that
f (c) is the absolute minimum value on D, if and only if f (x) ≥ f (c).

Maximum and minimum values can either be global or local in nature. Figure 1 shows
the graph of sin x/x over the interval [−9π/2, 9π/2]. The global maximum is located at
x = 0, and the global minima are located at approximately x = ±5. There are four other
local maxima, as well as two local minima within a small neighbourhood of x = ±10.
1.0
0.8
0.6
sin(x)/x

0.4
0.2
0.0
−0.2

−15 −10 −5 0 5 10 15

Figure 2. Graph of sin x/x in the interval [−9π/2, 9π/2]

Let us call a point x = c in the domain of a function f (x) a critical point, if f ′ (c) = 0,
or f ′ (c) does not exist. Suppose the maximum (or a minimum) of a function occurs at
some interior point x = c, then f ′ (c) = 0. However, if we only know f ′ (c) = 0, we will
not be able to tell if f (c) is a a maximum or minimum point. One way of finding out is
to check the sign of f ′ (x) at x = c − t and x = c + t, where t is some positive constant.
For maximum points, the sign of f ′ (x) changes from positive (x = c − t) to negative
(x = c + t); for minimum points, the converse is true.
Another method of checking whether x = c yields the maximum or minimum of f (x)
is the Second Derivative Test - if f ′ (c) = 0 and f ′′ (c) < 0, then f has a (local) maximum
at x = c; similarly, if f ′′ (c) > 0,then f has a (local) minimum at x = c. Occasionally,
this test may fail if f ′′ (c) = 0 (as in the case of an inflection point), or f ′′ (c) does not
exist. To find the global maximum, we simply evaluate f (x) for elements in the set of
critical values {x1 , · · · , xn } at which the second derivative is negative. We obtain the
6
global maximum from
max{f (x1 ), f (x2 ), · · · , f (xn )};
similarly, for the set of critical values {x1 , · · · , xm } at which the second derivative is
positive, the global minimum is found from

min{f (x1 ), f (x2 ), · · · , f (xm )}.

Note that if the maximum or minimum of f (x) occurs at the end points of the domain of
f (x), they cannot be found by blind application of derivative tests. A simple example is
the function f (x) = 1/x over [1, 10]. The global minimum is 0.1, at the right end point
x = 10; while the global maximum 1 occur at the left end point x = 1. Trying to solve
f ′ (x) = −1/x2 = 0 does not work.

EXAMPLE 4. Consider a locus with two alleles A1 and A2 , with allele frequency p and
1 − p, respectively. If the locus is in Hardy-Weinberg equilibrium, then the genotype
frequencies are given as follows.

Genotype Frequency
A1 A1 p2
A1 A2 2p(1 − p)
A2 A2 (1 − p)2

How large can the proportion of heterozygotes (A1 A2 ) be?

SOLUTION. Let H denote the proportion of heterozygotes. Then,


dH d
= (2p(1 − p)) = 2 − 4p.
dp dp

We obtain p = 1/2 when we solve for 2 − 4p = 0, so H is at most 1/2. To be sure that


the maximum really occurs at the critical point p = 1/2, we check the second derivative
of H with respect to p. It is obvious that this is true. ♣

7
EXAMPLE 5. A biologist wishes to estimate the mutation rate in a particular gene.
From theory, he believes that the number of nucleotide differences follows a Poisson
distribution with probability mass function

λx e−λ
P (X = x) = , x = 0, 1, 2, . . . .
x!
He then collects a random sample of 1000 individuals. Using the most frequently observed
sequence as the reference sequence, he then counts the number of nucleotide differences
X1 , X2 , . . . , X1000 . Suggest a method for him to estimate the mutation parameter λ.

SOLUTION. The likelihood of the data is given by the product of probabilities for all
1000 individuals,
1000
Y λxi e−λ
L= .
i=1
xi !
Since the log function is monotone increasing, maximising L is equivalent to maximising
log L.
1000
X
log L = (xi log λ − λ) + H(x).
i=1

Differentiating log L with respect to λ,


1000
d(log L) X  xi 
= −1 .
dλ i=1
λ

We then solve for d(log L)/dλ = 0. The solution is


P1000
xi
λ̂ = i=1 .
1000
The sample mean is therefore a maximum likelihood estimator of λ. You can check that
the second derivative of log L with respect to λ is negative. ♣

KTF 2009/2010 (2)


8