# Calculus for Biological Scientists

## Section1.5Exponential and Logarithmic Functions

### Warm-Up1.5.1.

The table of a function $$h(x)$$ is given below. Compute $$AROC_{[-1,0]}\text{,}$$ $$AROC_{[0,1]}\text{,}$$ and $$AROC_{[1,2]}\text{,}$$ recalling Subsection 1.2.6 as needed.
Then sketch the visual representation of each average rate of change on a graph to get an idea of how the function changes over time.

### Subsection1.5.1Exponential Functions

You should have found in Warm-Up 1.5.1 that the value of $$AROC_{[a,b]}$$ was dependent on the interval $$[a,b]\text{.}$$ Since this function does not have a constant average rate of change, we know that it does not represent a linear relationship that we studied in Section 1.4. There is, however, still an important pattern to be discovered in this relationship: each consecutive output value is multiplied by the constant $$2$$ in order to get the next output value. This is the defining characteristic of an exponential function:

#### Definition1.5.2.Exponential Function.

An exponential function is a function of the form $$f(x)= b^x\text{,}$$ for some constant $$b$$ where $$b \gt 0$$ and $$b \neq 1\text{.}$$ The constant $$b$$ is called the base of the exponential.
If $$b \gt 1$$ we call the function exponential growth. If $$0 \lt b \lt 1$$ we call the function exponential decay. Use the interactive to view how the graph of $$f(x) = b^x$$ changes for different values of $$b\text{:}$$

#### Example1.5.3.Exponential Models.

Exponential functions can be accurate in modeling population growth on a restricted domain. If you have a population that initially has $$1$$ individual, and each individual produces one more individual every year (i.e., the population doubles every year), you could model this with the exponential function $$p(t) = 2^t\text{.}$$
You may observe a system that behaves exponentially, but does not exactly fit a model of the form $$y=b^x\text{.}$$ For example, the output value associated with $$x=0$$ may not be always be $$b^0 =1\text{.}$$ This is an instance in which transformations from Subsection 1.3.3 can be useful. A general transformation of an exponential function has the form
\begin{equation*} f(x) = v \cdot b^{h(x-r)}+ u\text{.} \end{equation*}
Using rules of exponents this can be written as
\begin{equation*} f(x) =(vb^{-hr}) \cdot (b^h)^x +u\text{.} \end{equation*}
Defining $$v_1=vb^{-hr}$$ as a new vertical scale and $$b_1=b^h$$ as a new base, we can write the transformation as
\begin{equation*} f(x)=v_1 \cdot (b_1)^x + u\text{,} \end{equation*}
using only a vertical scale and vertical shift on the graph of $$y=(b_1)^x\text{.}$$ Therefore, we will focus on transformations of exponential functions in the form $$f(x)=v \cdot b^x +u\text{.}$$ Take a moment to use the interactive below to describe how each parameter transforms $$y=b^x$$ ($$b \gt 1$$) before viewing the answers.
• $$v$$ Answer.
is a vertical scale by a factor of $$|v|\text{.}$$ When a function has the form $$f(x)=vb^x\text{,}$$ $$v$$ is the $$y$$-intercept.
• $$u$$ Answer.
is a vertical shift. It will shift the graph up or down $$|u|$$ units.
Though $$AROC_{[a,b]}$$ is not constant for exponential functions, we can still use these computations to help identify when a relationship fits an exponential model (or a transformation of one) using the following fact:

#### Example1.5.5.Constant AROC Ratio.

Looking at the table in Warm-Up 1.5.1, we compute
\begin{equation*} \dfrac{AROC_{[x+1,x+2]}}{AROC_{[x,x+1]}} \end{equation*}
for $$x=-1$$ and $$x=0\text{:}$$
\begin{equation*} \dfrac{AROC_{[-1+1,-1+2]}}{AROC_{[-1,-1+1]}} = \dfrac{AROC_{[0,1]}}{AROC_{[-1,0]}} = \dfrac{1}{0.5} = 2 \end{equation*}
\begin{equation*} \dfrac{AROC_{[0+1,0+2]}}{AROC_{[0,0+1]}} = \dfrac{AROC_{[1,2]}}{AROC_{[0,1]}} = \dfrac{2}{1} = 2 \end{equation*}
The table lists points of the function $$f(x) = 2^x\text{,}$$ which is why we computed the constant $$b=2$$ for each ratio.

#### Activity1.5.2.

Determine whether the tables below represent an exponential relationship (or a transformation of one). If yes, what is the base?
It can be useful to write exponential functions using specific bases, depending on the information we are given about the system and what question(s) we are trying to answer. There are two related contexts in which this will be relevant:

#### Doubling Time and Half Life.

Given a function $$p(t)=p_0 \cdot b^t\text{,}$$ $$b \gt 1\text{,}$$ the doubling time is the input value $$t_d$$ such that $$p(t_d)= 2p_0\text{.}$$
Given a function $$p(t)=p_0 \cdot b^t\text{,}$$ $$0 \lt b \lt 1\text{,}$$ the half life is the input value $$t_h$$ such that $$p(t_h)= \dfrac{1}{2}p_0\text{.}$$

#### Example1.5.8.Doubling Time.

If we know that the doubling time of a population is $$3$$ years, then we can quickly write down a model for this population using the base $$2\text{:}$$
\begin{equation*} p(t) = p_0 \cdot 2^{t/3}\text{,} \end{equation*}
where $$t$$ is measured in years. Note that when we plug in $$t=3\text{,}$$ we get
\begin{equation*} p(3) = p_0 \cdot 2^{3/3} = 2p_0\text{,} \end{equation*}
which shows that the doubling time is $$t_d =3$$ as desired. If we’d like to know how much the population increases each year, we can use rules of exponents to write
\begin{equation*} p(t)= p_0 \cdot (2^{1/3})^t\text{,} \end{equation*}
to see that the base is $$2^{1/3} \approx 1.26\text{.}$$ This means the population increases by approximately $$26\%$$ each year.
Another common base for writing exponential functions is the number $$e\text{.}$$ This is an irrational number equal to approximately $$2.718\text{,}$$ which is special in calculus for reasons we will see in Section 2.5. Writing an exponential function such as $$2^x$$ using base $$e$$ means re-writing $$2^x$$ as $$e^{kx}$$ for some constant $$k\text{.}$$ Using rules of exponents to write
\begin{equation*} 2^x = e^{kx} = (e^k)^x\text{,} \end{equation*}
we see this means finding a constant $$k$$ such that $$2 = e^k\text{.}$$ How do we find such a $$k\text{?}$$
Similarly, in Example 1.5.8, we were given the doubling time and found an equation. What if we were given an equation $$p(t)=10 \cdot (1.5)^t\text{,}$$ and asked to find the doubling time? We would need to solve the equation $$20 = 10 \cdot (1.5)^t\text{,}$$ or equivalently $$2 = 1.5^t\text{,}$$ for $$t\text{.}$$
Solving $$2 = e^k$$ for $$k$$ and $$2 = 1.5^t$$ for $$t$$ are similar in that the variable we are looking to solve for is in the exponent. These are called exponential equations, and we need tools from Subsection 1.5.2 to solve them.

### Subsection1.5.2Logarithmic Functions and Solving Exponential Equations

#### Question1.5.9.

Are exponential functions invertible? Hint: Picture what the graphs of exponential functions look like.
Yes, because they pass the horizontal line test (see Example 1.2.10).

#### Definition1.5.10.Logarithmic Function of Base $$b$$.

Given an exponential function with base $$b\text{,}$$ $$y=b^x\text{,}$$ its inverse function is called the logarithmic function of base $$b$$. It is written $$y=\log_b(x)\text{.}$$
Base $$10$$ and base $$e$$ are used often and have special notation:

#### The Common and Natural Log.

Instead of writing $$\log_{10}(x)\text{,}$$ we write $$\log(x)\text{.}$$ Note that every logarithm has a base, so if you don’t see one indicated, it is assumed to be $$10\text{!}$$ This is called the common logarithm.
Instead of writing $$\log_{e}(x)\text{,}$$ we write $$\ln(x)\text{.}$$ This is called the natural logarithm.
Since logarithmic functions are inverse functions of exponentials, and inverse functions are obtained by swapping the input and output of the original function, we can always interpret logarithmic expressions in terms of exponential expressions:

#### Interpreting Log Expressions.

The expression
\begin{equation*} y=\log_b(x) \end{equation*}
is equivalent to the expression
\begin{equation*} b^y = x\text{.} \end{equation*}

#### Example1.5.11.Interpreting Log Expressions.

$$\log_2(8) = 3$$ since $$2^3 = 8\text{.}$$
$$\log(0.01) = -2$$ since $$10^{-2} = 0.01\text{.}$$
$$\ln(\sqrt{e}) = 0.5$$ since $$e^{0.5} =\sqrt{e}\text{.}$$
Since the graph of an inverse functions is related to the graph of the original function by reflection across the line $$y=x$$ (Example 1.2.10), we can see what graphs of logarithmic functions look like as the base $$b$$ changes:
A property of logarithms that make them a useful tool for solving exponential equations is the following:

#### Composing Logarithms and Exponentials.

\begin{equation*} \log_b(a^x) = x\cdot \log_b(a) \end{equation*}
In words, this says that if everything inside of a logarithm is raised to a power, we can bring the power outside of the logarithm using multiplication. Note also that the bases do not need to match to use this property. If they do match, we get a nicer simplification:
\begin{equation*} \log_b(b^x) = x\cdot\log_b(b) = x \end{equation*}

#### Example1.5.12.Solving Exponential Equations Using Logarithms.

We will write $$y=2^x$$ in the form $$y=e^{kx}\text{.}$$ As seen previously, this means we must solve $$2=e^k$$ for $$k\text{:}$$
\begin{align*} 2 \amp=e^k\\ \ln(2) \amp=\ln(e^k)\\ \ln(2) \amp=k \end{align*}
So $$k = \ln(2)\text{,}$$ which means $$y=2^x$$ can be written as $$y =e^{\ln(2)x}\text{.}$$
We will find the doubling time for the function $$p(t)=10 \cdot (1.5)^t\text{.}$$ Since $$p(0) =10\text{,}$$ we must find the value $$t$$ such that $$p(t)=2 \cdot p(0) = 20\text{:}$$
\begin{align*} 20 \amp=10\cdot (1.5)^t\\ 2 \amp=1.5^t\\ \log(2) \amp=\log(1.5^t)\\ \log(2) \amp=t \cdot \log(1.5)\\ \dfrac{\log(2)}{\log(1.5)} \amp=t \end{align*}
So $$t_d = \dfrac{\log(2)}{\log(1.5)} \approx 1.71\text{.}$$

#### Activity1.5.3.

A fish population is changing according to the model $$p(t)= 500 \cdot e^{-2t}\text{.}$$
1. Find the doubling time or half life of the population (whichever is appropriate).
2. By what percentage does the population increase or decrease each year?

### Subsection1.5.3Scaling and Fitting Data with Logarithms

Aside from being a tool for solving exponential equations, logarithms can also be useful for scaling and fitting data, as our next examples illustrate.

#### Example1.5.13.Scaling Data.

Some systems produce data that are very large or small, and/or cover a very large range. It can be difficult to plot such data in an effective way. Logarithms are useful for taking very large (or small) numbers and making them more manageable, and for compressing a data set that covers a very large range.
For example, you may have a function that measures the acidity of soil over time. Acidity is based on the concentration of hydrogen ions present, and can be measured in moles per liter ($$M$$). These numbers are very small, and can vary widely if the acidity of the soil is changing.
The example below shows what the data might look like to plot the molarity $$a$$ against time $$t$$ in the first table. In the window given, it’s difficult to see any difference between the points. Further, because they cover such a large range of values ($$.1$$ to $$10^{-13}$$), it is difficult to change the window to display the relationship in an effective way.
Using the second table, we plot $$-\log(a)$$ against time $$t\text{.}$$ In fact, this is the definition of pH for measuring acidity. As you can see, this makes the numbers more manageable to plot, the relationship of acidity with respect to time easier to describe qualitatively, and changes the range of outputs to values between $$1$$ and $$13\text{.}$$

#### Example1.5.14.Fitting Data.

After collecting data, we may want to try and fit that data with a specific type of function. For example, we may suspect our data can be modeled by a power function: a function of the form $$f(x) = kx^p\text{.}$$ We would need to find values for the parameters $$k$$ and $$p$$ that best fit our data.
If we take the log of both sides of $$f(x) = kx^p\text{,}$$ we get
\begin{align*} \log(f(x)) \amp= \log(kx^p) \\ \log(f(x)) \amp= \log(k)+ \log(x^p) \\ \underset{y}{\log(f(x))} \amp= \underset{m}{p} \cdot \underset{x}{\log(x)} + \underset{y_0}{\log(k)} \end{align*}
This shows us that if our data fits a power function, then we can plot $$\log(f(x))$$ as our output and $$\log(x)$$ as our input and the resulting graph should be linear. Moreover, the slope of the linear function will be the power $$p$$ and the $$y$$-intercept of the linear function will be $$\log(k)\text{.}$$
The example below shows our original data points in the first table that we’d like to fit with a power function $$f(x)=kx^p\text{.}$$ The second table shows our data after taking the log of both input and output. We suspect the second table should be a linear function, so we can compute the average rate of change between each interval to confirm and find the slope:
\begin{equation*} \dfrac{\log(16)- \log(2)}{\log(2)-0} = 3 \end{equation*}
\begin{equation*} \dfrac{\log(54)- \log(16)}{\log(3)-\log(2)} = 3 \end{equation*}
So we see that $$p=3\text{.}$$ We can also see the $$y$$-intercept from the table is $$\log(2)\text{,}$$ so $$k=2\text{.}$$ This means the power function that fits our original data is $$y=2x^3\text{.}$$

### Subsection1.5.4Summary

• #### Question1.5.15.

What is an exponential function?
An exponential function is a function that has the form $$f(x)=b^x$$ for some constant $$b$$ where $$b \gt 0$$ and $$b \neq 1\text{.}$$ A special property of these functions is that the ratio of consecutive average rates of change is equal to $$b\text{.}$$ That is,
\begin{equation*} \dfrac{AROC_{[x+1,x+2]}}{AROC_{[x,x+1]}} = b \end{equation*}
for every $$x$$ value.
• #### Question1.5.16.

What is a logarithmic function?
A logarithmic function of base $$b$$ is the inverse function of the exponential function of base $$b\text{.}$$ That is, $$\log_b(x)=y$$ means $$b^y=x\text{.}$$
• #### Question1.5.17.

How do we solve exponential equations?
To solve equations for a variable that is in the exponent, we can apply logarithms to both sides of the equation and use properties of logarithms. Specifically, we use the property that $$\log_b(a^x)=x \cdot \log_b(a)\text{.}$$

### Exercises1.5.5Exercises

#### 1.

Let $$j(x)=e^{kx}\text{.}$$ For what values of $$k$$ is $$j(x)$$ increasing? For what values of $$k$$ is $$j(x)$$ decreasing? Justify your answers by using what you know about the graph of $$y=b^x\text{.}$$

#### 2.

In the table below, determine the value of $$c$$ that would make the points fit an exponential relationship with base $$0.25\text{.}$$

#### 3.

Use logarithms to find a power function that fits the data in the table below:

#### 4.

You have data that you suspect fits an exponential model of the form $$f(x)= a\cdot b^x\text{.}$$ Show that if you plot $$\log(f(x))$$ as the output and $$x$$ as the input, you should get a linear relationship. What is the slope? What is the $$y$$-intercept?
tutorial.math.lamar.edu/Classes/Alg/IntegerExponents.aspx#Int_Props
tutorial.math.lamar.edu/Classes/Alg/LogFunctions