Exponential and Logarithmic Functions document

1
Exponential and Logarithmic Functions
Exponential and logarithmic functions play an important role in our efforts to model natural
phenomenon. They occur in applications to business and economics as well as natural
science. Population growth, radioactive decay, any indeed any growth or decay situation
is modeled using exponential functions. Logarithmic functions are used to model, for
example, sound intensity and earth quake intensity. And interestingly enough exponential
and logarithmic functions, as we shall see, are inverses of one another, so that information
regarding one can often be understood by examining the other.
1.1
Exponential functions
Exponential functions are simply defined. An example is the function f (x) = 2x . More
generally, for any constant a > 0, we can define the corresponding exponential function
by f (x) = ax . As before we can also speak of exponential equations y = ax . The number
a is referred to as the base of the exponential function f (x) = ax . In more conventional
function notation, one sometimes writes expa (x) for ax and we refer to it as the exponential
function base a.
The difficulty with this definition, as it stands, is that we are not quite sure what it means.
If x = n is a positive integer, then an is well defined. More generally, if x = pq is a positive
p
rational number, then a q is the pth power of the q th root of a, and is again well defined.
−p
And, for negative powers of rational numbers, a q = 1p . Thus, ax is well defined for x
aq
any rational number. What about irrational numbers? How would we define for instance
aπ ?
Think back. An irrational number is a number with an infinite decimal expansion that never
repeats indefinitely some block of digits. So if x denotes an arbitrary irrational number,
let xn be the rational number whose first n digits of its decimal expansion
correspond to
√
the first n digits of the decimal expansion of x. For instance if x = 2, where the decimal
expansion begins as x = 1.4142135633 · · · , then x1 = 1.4, x2 = 1.41, x3 = 1.414, and so
on. With this convention we are then able to define ax as limn→∞ axn .
The graph of an exponential function is easily visualized. If the base a > 1, then as x gets
large, ax gets very large; in the same way, if x < 0 and large in absolute value, say x = −10,
then a−10 = a110 which is a small positive number less than 1, and then of course a0 = 1,
since anything to the power zero is by definition equal to 1. Putting these observations
together and letting the base be a = 2 or a = 3 the graphs of the functions f (x) = 2x
and g(x) = 3x are shown in figure 1. In particular we note that any exponential function
f (x) = ax is increasing over the entire real line; namely, if x1 < x2 then ax1 < ax2 .
1
Figure 1: The graphs of f (x) = 2x in red and g(x) = 3x in green
Figure 2: The graph of f (x) =
2
x
1
2
x
In the case that the base 0 < a < 1, say a = 12 , since 12
= 2−x , thinking of equations
x
instead of functions, the graph of y = 12
is just the reflection about the y axis of the
x
graph of y = 2 . Remember to obtain the equation of a reflection about the y axis, it is
necessary to put a negative sign in front of every occurrence of the x variable. The graph
is that which we see in figure 2.
1.1.1
Compound Interest
Suppose you have deposited a sum of P dollars in a bank that pays an annual interest
rate of r percent. After the first year you
then have
P + rP = P (1 + r) dollars. After the
second year you then have, P (1 + r) + r P (1 + r) which after factoring out the common
2
factor of P (1 + r) becomes
P (1 + r)(1
+ r) = P (1 + r) . Similarly, after the third year, the
amount is P (1 + r)2 + r P (1 + r)2 = P (1 + r)2 (1 + r) = P (1 + r)3 . This process continues
so that after k years there is P (1 + r)k dollars in the bank.
As a particular example, if the $ 1, 000 is deposited and the interest rate r is 6% = 0.06,
after 10 years the amount in the bank is 1000(1 + 0.06)10 = $ 1, 790.85
Now suppose that the bank calculates the interest twice a year, or biannually. The effective
interest rate for half a year is then taken to be 2r %. After 5 years the interest will have been
calculated 10 times, each time with the rate being 2r %. Thus from our previous observation,
the amount in the bank after 5 years, during which the interest is compounded biannually,
will be P (1 + 2r )2×5 .
Generalizing, if the interest is calculated n times per year at an annual rate of r%, the
effective rate over an nth of a year is nr %. If the amount P is invested in this way over k
years, there are then nk periods over which the interest is calculated. The amount after k
years, during which the interest is compounded n times per year, is then P (1 + nr )nk .
Result 1 If an amount P is invested at an annual interest rate of r% calculated (compounded) n time per year, the amount available after k years is
r nk
P 1+
n
(1)
Example 2 If an amount of $ 1, 000 is invested at an annual rate of 6% = 0.06 compounded weekly, how much is there after 10 years?
Solution
Here n = 52; so the amount after 10 years is 1, 000 1 +
3
0.06
52
52×10
= $ 1, 821.49
1.1.2
The Number
e
Lets think of a generalized growth process in which the initial amount present is said
to be 1 unit of whatever you happen to be considering and the nominal rate of growth
is r = 100% = 1. Also lets no longer restrict the basic time unit to be that of a year.
And whatever this time period is lets model the growth over discrete sub units of time say n periods within the basic time unit. Following what we have done above, we have
r = 1, P = 1 and k = 1, and the amount of our substance after 1 basic unit of time, during
which the growth has been compounded n times, is
1+
1 n
.
n
Now the thing is, growth does not occur only at discrete moments. It is a continuous
process. Therefore to get a good model of what a continuous generalized growth process
is, we need to look at smaller and smaller subunits over which the growth is occurring.
That is, to get a good description of the amount present after one basic time unit we need
to consider the limit as n → ∞. of the above expression. We refer to this amount with the
letter e. That is,
1 n
e = lim 1 +
.
n→∞
n
By doing the calculation for larger and larger values of n, we can get good approximations
to the limit.
n
n
1 + n1
2
10
100
1,000
10,000
100,000
1,000,000
10,000,000
2.25
2.5937
2.70481
2.716923
2.7181459
2.7182682
2.7182804
2.7182816
The exponential function that uses the number e as its base is often referred to as the
natural exponential function, and if the context is understood the word natural is often
dropped. To emphasize the functional notation sometimes the the natural exponential
function is given the name exp , and we write exp(x) = ex .
Definition 3 The number e is defined to be the value of the limit
lim
n→∞
1+
4
1 n
.
n
The natural exponential function is the function
exp(x) = ex
In the particular growth example in which a sum P of money is invested at a rate of r%
for a period of t years and compounded n times per year, we can rewrite equation 1 above
as
h
r nt
r n/r irt
P 1+
=P 1+
n
n
(2)
If we now set m = nr , the above then becomes
P
h
1+
1 m irt
m
(3)
If the number of periods per year over which the interest is compounded is increased
infinitely, we arrive at the situation in which the interest is being compounded continuously
or in other words the amount invested is growing continuously. To do this we need to take
the limit of either of the terms in line 2 as n goes to infinity.
However, since m = nr , the limit as n goes to infinity is the same as the limit as m goes to
infinity. Therefore we may instead look at the limit of the expression in line 3. Doing this
we get,
h
1 m irt
lim P 1 +
= P ert .
m→∞
m
Result 4 If a principal amount P is invested at an annual rate of r% and is compounded
continuously, the amount A(t) after t years is
A(t) = P ert .
1.1.3
Derivatives of exponential functions
Letting f (x) = ax , we wish to calculate the derivative f 0 (x) . For this we need to use the
definition of the derivative as a limit as follows.
f 0 (x) = limh→0
= limh→0
f (x+h)−f (x)
h
= limh→0
ax+h −ax
h
ax ah −ax
h
= limh→0
ax (ah −1)
h
= ax limh→0
ah −1
h
5
Next, since by definition f 0 (0) = limh→0
ah −1
h ,
we can conclude that
f 0 (x) = f 0 (0)ax .
In other words, for an exponential function which measures some quantity as a function
time, this tells us that the instantaneous rate of change at any particular time is always
proportional to the amount present. This is a basic characteristic of systems involving
growth or decay. For instance the population of a pen of rabbits grows in proportion to
the number of rabbits in the pen, and the amount of a radioactive isotope is decaying at
any time at a rate proportional to the proportion to the amount present.
The difficulty now is in calculating the value of f 0 (0) for a specific values of a. In the case
that a = e, by definition of the derivative, we know that
eh − e0
eh − 1
= lim
.
h→0
h→0
h
h
f 0 (0) = lim
That this is true, is not necessarily obvious and the proof needs more technique than has
so far been developed. We can however see the plausibility of the result by looking at
approximations of the limit for small values of h.
eh −1
h
h
10−1
10−2
10−3
10−4
1.051709
1.005016708
1.00050016671
1.00005000167
We summarize as follows.
Result 5 If f (x) = ex , f 0 (x) = ex .
Later we will show formulae for the derivatives of exponential functions with base a not
equal to e.
Using the result above combined with the chain rule, we can also find derivatives of functions that are compositions involving the natural exponential function.
Example 6
3
Writing the exponential function with the ”exp” notation, the function f (x) = ex −x can
be rewritten as f (x) = exp(x3 − x). Taking the derivative using the chain rule then gives us
the derivative of the outside function, with all its contents left alone, times the derivative
of the contents. We get
3
f 0 (x) = ex −x (3x2 − 1).
6
We can also employ all the techniques developed for finding maximums and minimums.
3
For the example f (x) = ex −x , if we set f 0 (x) = 0, then since the natural exponential
2
function can never be negative, the derivative can be zero only
q if 3x − 1 = 0. Solving for
x, gives possible points maximums or minimums at x = ± 13 ≈ ±0.57735. Taking the
second derivative with hope of applying the second derivative test, gives:
f 00 (x) = 6xex
3 −x
+ ex
3 −x
(3x2 − 1)2 = ex
3 −x
Figure 3: graph of f (x) = ex
6x + (3x2 − 1)2
3 −x
q 3
and f 00 − 13 , since ex −x is always positive, the signs will
q
be determined by the sign of the factor 6x + (3x2 − 1)2 . This is negative for x = − 13 and
q
q q 1
positive for x = 13 . Thus f 00 − 13 < 0 and f 00
> 0 so there is a maximum for
3
q
q
f at x = − 13 and a minimum at x = 13 . The graph is shown in figure 3.
To test the sign of f 00
q 1
3
7
1.2
Logarithmic Functions
Since the exponential function f (x) = ax is always increasing and the graph necessarily
satisfies the horizontal line test, the function then has an inverse. This inverse is called
the logarithmic function base a and is expressed as loga x. If a = e, one writes instead ln x.
The function f (x) = ln x is called the natural logarithmic function. Since the logarithmic
functions are the inverses of corresponding exponential functions, if we choose a fixed base
a and then do the exponential function base a followed by its inverse loga or, in the reverse
order, the loga followed by the exponential function expa , we in both cases have the identity.
That is using function notation
loga expa (x) = x
and
exp loga (x) = x.
Whereas using exponential notation we have
loga (ax ) = x
loga x
a
=x
(4)
(5)
In the special case of the natural logarithm function ln, the latter equations become
ln(ex ) = x
ln x
e
=x
(6)
(7)
Try this. Take your scientific calculator. Take any number say x = 5. Punch it in and
then hit the ex key. This gives you the value of e5 , Now hit the ln button. You should have
gotten back the number 5. What you have done is to perform the calculation ln(e5 ) = 5.
Now apply the functions in reverse order. Plug in 5; hit the ln button; then hit the ex
button. You will then have made the calculation eln 5 = 5.
The shape of the graph of a logarithmic function may be deduced from that of its corresponding exponential function, for as you remember, the graph of the inverse is the
reflection about the diagonal line y = x of the original. So in the particular case of the natural logarithmic function g(x) = ln x, its graph is the reflection of the graph of exp(x) = ex .
Both are shown in figure 4.
8
Figure 4: graph of f (x) = ex in red and g(x) = ln x in green
1.2.1
Properties of logarithmic functions
Since g(y) = loga y is the inverse of f (x) = ax , we know that if y = ax , then from line 4
g(y) = loga y = x. Some like this definition of the loga . It says that loga y is the unique
number x with the property that ax = y.There are then three properties of any logarithmic
function that may be deduced immediately. First, since ax = y is never negative or zero,
loga is not defined for non-poistive numbers. This is borne out with the graph of f (x) = ex
in 4. Then, starting with x = 0, if we use 0 as an exponent for a we get a0 = 1. If we then
apply the loga function, we will get back to the beginning, namely x = 0; thus loga 1 = 0.
In the same way, if we start with x = 1 and use 1 as an exponent for a, we get a1 = a, and
thus if we again apply loga , we get back to x = 1. That is, loga a = 1.
Below is a list of 6 properties that logarithm functions satisfy. Properties one through three
have been explained above. Property four says that the log of a product is the product of
the logs. Property five tells us that the log of a number to the power r is r times the log,
and property six tells us how to covert between various logarithm bases.
Result 7 Logarithm properties
1. loga x is defined only for x > 0 and if 0 < x < 1, loga x < 0.
2. loga 1 = 0
9
3. loga a = 1
4. loga xy = loga x + loga y
5. loga xr = r loga x.
6. logb x =
loga x
loga b
proof of property 4:
If we consider the log of a product, loga xy and then use this as an exponent for a, we
get
aloga xy = xy
(8)
But using the law of exponents,
aloga x+loga y = aloga x aloga y
and since aloga x = x and aloga y = y, we have
aloga x+loga y = xy
(9)
Comparing line 8 with line 9 and realizing that an exponential function is strictly increasing
and therefore injective, we can conclude that
loga xy = loga x + loga y.
In other words, the log of a product is the sum of the logs.
proof of property 5:
s
Using the exponent law which says that ar ) = ars and from the property of inverse
functions that tells us that alog x = x, for a number r, we have that
r
ar log x = alog x = xr .
(10)
Also from the property of inverse functions, it follows that
r
aloga x = xr
Comparing lines 10 and 11, we as before conclude that
10
(11)
loga xr = r loga x.
proof of property 6:
Starting with the identity blogb x = x, take loga of both sides. We get
loga blogb x = loga x.
Using property 5, this becomes
(logb x)(loga b) = loga x.
We conclude that
logb x =
loga x
.
loga b
Example 8
1. Using property 4, ln(x2 − 2x + 1) = ln (x + 1)(x − 1) = ln(x + 1) + ln(x − 1)
2. Using property 4 and property 5, the log of a quotient is the difference of the logs.
loga dc = loga (c · d−1 ) = loga c + loga d−1 = loga c − loga d
3. To convert from one logarithm base to another is often useful. Our calculators allow
us to obtain good approximations for natural logarithms and for logarithms base 10.
Base 2 comes up in applications, and converting from base 2 to base e or base 10 is
3.5553
the only good way to obtain results. For instance log2 35 = lnln35
2 ≈ 0.69314 ≈ 5.1292.
1.2.2
Derivative of logarithm functions
To find the derivative of a logarithm function loga x, we first find the derivative of ln x, but
to do this we need to talk of the Inverse Function Theorem which tells us how to determine
the derivative of a function from that of its inverse, provided such exists. It says that the
derivative of a function f with and inverse f −1 is the reciprocal of the derivative of the
inverse evaluated at the point f (x).
Theorem 9 Let f be a function and let f −1 be the inverse of f. Then,
d −1
1
f (x) = (f −1 )0 (x) = dx
f 0 f −1 (x)
11
The proof is very easy. Lets first see how it is used. Let f −1 (x) = ln x = y and let
f (y) = exp(y) = ey be its inverse. According to the theorem and the fact that exp0 (y) =
1 y
e = ey , we have
dy
1
1
1
d
ln x =
= ln x = .
0
dx
exp (ln x)
x
e
Now for the proof of the theorem.
Proof. Since f and f −1 are inverses of one another, we know that
f f −1 (x) = x.
Taking the derivative of both sides using the chain rule, we have,
h i (f 0 f −1 (x) · (f −1 )0 (x) = 1,
which implies that
d −1
1
f (x) = (f −1 )0 (x) = dx
−1
0
f f (x)
Knowing the derivative of ln x using Property 6 of logarithms, allows us to find the derivative of logarithm functions with an arbitrary base. If we now change notations and set
ln x
f (x) = loga x, by Property 6, f (x) =
. Using the above result gives:
ln a
f 0 (x) =
d
1
loga x =
.
dx
x ln a
When speaking of the exponential functions, we established that the derivative of the
natural exponential function exp(x) = ex was simply ex . That is the natural exponential
function has the property that its derivative is itself. But what about the derivative of
other exponential functions ax ? Knowing the derivative of its inverse loga , we could use
the inverse function in reverse to come up with the answer. The result, the proof of which is
d x
an exercise is stated that
a = ax ln a. Following is a summary of previous results.
dx
Result 10
d x
1.
e = ex
dx
12
d x
a = ax ln a
dx
d
1
3.
ln x =
dx
x
d
1
4.
loga x =
dx
x ln a
Examples:
2.
1. Using the chain rule,
d
dx
2. Using the chain rule,
√
d
x3
5
dx
ln(x3 + 7x + 2) =
3. Again using the chain rule,
4. Once more,
p
d
dx
=
d
dx
2
3x
√
2 x3
√
(ln 5)5
ln(ln x2 ) =
log2 (x3 + 2x2 + 1) =
=
=
1.3
3x2 +7
.
x3 +7x+2
1
ln x2
x3 .
×
d
dx
ln x2 =
2x
.
x2 ln x2
d
1
× dx
log2 (x3 + 2x2
log2 (x3 +2x2 +1)
1
3x2 +4x
√
× (ln 2)(x
3 +2x2 +1)
3
2
2 log2 (x +2x +1)
3x2 +4x
√
.
(2 ln 2)(x3 +2x2 +1) log2 (x3 +2x2 +1)
2
√
+ 1)
Growth and Decay
Growth and decay in the nature, for instance population growth or radioactive decay, may
be simply modeled using the exponential function
A(t) = A0 ekt
where A(t) represents an amount present at time t with A0 = A(0) being the initial
amount and k is a constant that characterizes the particular nature of the growth or decay.
If k > 0 then A(t) is an increasing function and the equation describes growth, and if
k < 0, it describes decay
For example, radioactive elements decay continuously, and a common problem is to determine how much remains after a given time assuming we know the amount of time, known
as the half-life, that it takes for half of the original amount to have decayed. Consider the
following specific examples.
Example 11 Suppose that the half-life of a radioactive element is 12 years. How long
1 th
of a gram?
would it take for 1 gram of the material to decay to a 16
13
Solution
Here A0 = 1, so the equation becomes A(t) = ekt , where we need to determine the value of
k. We are told however that for t = 12, A(t) = 21 gram. From the equation, we then know
that
1
= e12k
2
We need to solve for k. To do this we apply the natural logarithm function to both sides of
the equation, remembering that it is the inverse of the exponential function - see equation
6.
ln 0.5 = 12k
Hence, k = ln120.5 , and consulting our calculator, we see that k ≈ −0.05776. The decay
equation then becomes
A(t) = e−0.5576t ,
We can now answer the question by setting A(t) =
Again applying ln to both sides, we see that
ln
1
16
and solving
1
16
= e−0.5576t for t.
1
= −0.05576t
16
1
ln 16
≈ 49.72 years.
−0.05576
Example 12 After the last outbreak of the bubonic plague medical researchers began growing the bacterium in petrie dishes in an effort to arrive at a cure. Starting with a culture of
5,000 bacteria they noticed that after one hour the count had risen to 10,500. How many
bacteria were there after 4 hours?
Solving for t gives, t =
Solution
Using the equation A(t) = A0 ekt , we have A0 = 5, 000 and since t = 1, A(1) = 10, 500, we
have
10, 500 = 5, 000ek .
which becomes
2.1 = ek
after dividing both sides by 5, 000 Applying ln to both sides gives
ln 2.1 = k
14
The equation then becomes
A(t) = 5, 000et ln 2.1
When t = 4,
A(4) = 5, 000e4 ln 2.1
But in the exponent
4 ln 2.1 = ln(2.1)4 = ln 19.4481.
Thus
A(4) = 5, 000eln 19.4481 = (5000)(19.4481) = 97240.5
Example 13 In the outbreak of avian flu in 2007 there were 120 cases world wide September 10, 2007 and on November 1, 2007 there were 3,000. Assuming an exponential growth
model, how many cases world wide would there have been January 1, 2008?
Solution
Assuming a model A(t) = A0 ekt and measuring time in days, the initial amount A0 = 120
and the number of days from September 1 to November 1, counting September 10 but not
November 1 is 52. Thus we have
A(52) = 3, 000 = 120e52k
or
25 = e52k .
Solving for k by taking applying ln to both sides gives
k=
ln 25
≈ 0.06190145817.
52
The formula is then, A(t) = 120e0.06190145817t . There are 113 days between September 10
and January 1. Calculating A(113), gives
A(113) = 120e(0.06190145817)(113) =≈ 130, 921.
15