Upload
lesley-allen
View
213
Download
0
Embed Size (px)
Citation preview
Functions
We will consider real-valued functions that are of interest in studying the efficiency of algorithms.Power functionsLogarithmic functionsExponential functions
Power Functions
A power function is a function of the form
f(x) = xa
for some real number a. We are interested in power functions where a 0.
Power Functions xa, a 1
The higher the power of x, the faster the function grows.xa grows faster than xb if a > b.
Power Functions xa, 0 < a < 1
The lower the power of x (i.e., the higher the root), the more slowly the function grows.xa grows more slowly than xb if a < b.
This is the same rule as before, stated in the inverse.
Multiples of Functions
Notice that x2 eventually exceeds any constant multiple of x.
Generally, if f(x) grows faster than cg(x), for any real number c, then f(x) grows “significantly” faster than g(x).
In other words, we think of g(x) and cg(x) as growing at “about the same rate.”
Logarithmic Functions
A logarithmic function is a function of the form
f(x) = logb x
where b > 1. The function logb x may be computed as
(ln x)/(ln b).
Growth of the Logarithmic Function
The logarithmic functions grow more and more slowly as x gets larger and larger.
Logarithmic Functions vs. Power Functions
The logarithmic functions grow more slowly than any power function xa, 0 < a < 1.
f(x) vs. f(x) log2 x
The growth rate of log x is between the growth rates of 1 and x.
Therefore, the growth rate of f(x) log x is between the growth rates of f(x) and x f(x).
Multiplication of Functions
If f(x) grows faster than g(x), then f(x)h(x) grows faster than g(x)h(x), for all positive-valued functions h(x).
If f(x) grows faster than g(x), and g(x) grows faster than h(x), then f(x) grows faster than h(x).
Exponential Functions
An exponential function is a function of the form
f(x) = ax,
where a > 0. We are interested in power functions where a 1.
Growth of the Exponential Function
The larger the base, the faster the function growsax grows faster then bx, if a > b > 1.
f(x) = 2x vs. Power Functions (Large Values of x)
5 10 15 20
500
1000
1500
2000
2500
3000
3500
2x
x3
Growth of the Exponential Function
Every exponential function grows faster than every power function.ax grows faster than xb, for all a > 1, b > 0.
Rates of Growth of Functions
The first derivative of a function gives its rate of change, or rate of growth.
Rates of Growth of Power Functions
.10 if ,decreasing is,1 if constant, is
,1 if ,increasing is1
aa
aaxx
dx
d aa