# 8.7 Logarithmic Functions

Logarithms are the inverse of exponential functions &ndash; they allow us to undo exponential functions and solve for the exponent. They are also commonly used to express quantities that vary widely in size.

Logarithm Equivalent to an Exponential

The logarithm (base $b$) function, written $\log_b (x)$, is the inverse of the exponential function (base $b$), $b^x$.

This means the statement $b^a=c$ is equivalent to the statement $\log_b (c)=a$.

#### Example 1

Write these exponential equations as logarithmic equations:

1. $2^3=8$
2. $5^2=25$
3. $10^{-4}=\frac{1}{10000}$

1. $2^3=8$ is equivalent to $\log_2(8)=3$.
2. $5^2=25$ is equivalent to $\log_5(25)=2$.
3. $10^{-4}=\frac{1}{10000}$ is equivalent to $\log_{10}\left(\frac{1}{10000}\right)=-4$.

#### Example 2

Solve $2^x=10$ for $x$.

By rewriting this equation using a logarithm, we get $x=\log_2(10)$.

While this does define a solution, and an exact solution at that, you may find it somewhat unsatisfying since it is difficult to compare this expression to the decimal estimate we made earlier. Also, giving an exact expression for a solution is not always useful – often we really need a decimal approximation to the solution. Luckily, this is a task calculators and computers are quite adept at. Unluckily for us, most calculators and computers will only evaluate logarithms of two bases, base 10 and base $e$. Happily, this ends up not being a problem, as we’ll see briefly.

Common and Natural Logarithms

The common log is the logarithm with base 10, and is typically written $\log(x)$.
The natural log is the logarithm with base $e$, and is typically written $\ln(x)$.

#### Example 3

Evaluate $\log(1000)$ using the definition of the common log.

To evaluate $\log(1000)$, we can say $x=\log(1000)$, then rewrite into exponential form using the common log base of 10:$10^x=1000.$
From this, we might recognize that 1000 is the cube of 10, i.e., $10^3=1000$, so $x = 3$.
We also can use the inverse property of logs to write $\log_{10}\left(10^3\right) =3$.

 Number Number as exponential log(number) 1000 $10^3$ 3 100 $10^2$ 2 10 $10^1$ 1 1 $10^0$ 0 0.1 $10^{-1}$ -1 0.01 $10^{-2}$ -2 0.001 $10^{-3}$ -3

#### Example 4

Evaluate $\log(500)$ using you calculator or computer.

Using a computer or calculator, we can evaluate and find that $\log(500)\approx 2.69897$.

Because logarithms are inverse functions of exponentials, we can, in particular, use them to solve exponential equations, where the unknown is in the exponent, in much the same way as we use the inverse properties of addition vs. subtraction or multiplication vs. division when rearranging equations to solve for an unknown value.

Properties of Logarithms

Inverse Properties:

(1) $\log_b(b^x)=x$

(2) $b^{\log_b(x)}=x$

Exponent Property

(3) $\log_b\left(A^r\right)=r\,\log_b(A)$

Here is an example how these properties are useful:

Suppose we have the following equation and had to determine the value of $r$:

$2\cdot 1.8^x=17.2$

To solve for $x$, we first have to determine which operations, and in which order, are acting on $x$, and then undo them in the opposite order. Because $x$ is first put into the exponent of 1.8, and then the new value is multiplied by 2, we first have to undo the last operation, i.e., we must divide by 2:

$1.8^x=\frac{17.2}{2}$

Looking at the equation now, we can see that the only thing happening to $x$ is that $x$ is put into the exponent of 1.8. The opposite operation would be the inverse property (1), so we could apply $log_{1.8}$ to get just $x$. However, the typical scientific calculator only calculates the common and the natural log, so $log_{1.8}$ won’t be helpful when applied to the other side of the equation. So instead we will apply either $\log$ or $ln$ to both sides of the equation, and then bring the exponent down by using the exponent property (3):

\begin{align*} \ln(1.8)^x&=\ln\left(\frac{17.2}{2}\right)\Rightarrow x\ln(1.8)=\ln\left(\frac{17.2}{2}\right)\\ &\Rightarrow x=\frac{\ln\left(\frac{17.2}{2}\right)}{\ln(1.8)}\approx 3.660788 \end{align*}

General process for solving exponential equations:

1. Isolate the exponential expressions when possible.
2. Take the logarithm of both sides.
3. Utilize the exponent property for logarithms to pull the variable down from the exponent.
4. Continue to use algebra to solve for the variable.

#### Example 5 – solving for a variable in the exponent

In the last section, we predicted the population (in billions) of India $t$ years after 2008 by using the function $f(t)=1.14(1+0.0134)^t$. If the population continues following this trend, when will the population reach 2 billion?

Answer: $t =?$, $f(t) = 2$, $f(t)=1.14(1+0.0134)^t$

 Initial equation. $1.14(1.0134)^t=2$ Divide by 1.14 to isolate the exponential expression. $1.0134^t=\dfrac{2}{1.14}$ Take the logarithm to both sides of the equation. $\ln\left(1.0134^t\right)=\ln\left(\dfrac{2}{1.14}\right)$ Apply the exponent property on the right side. $t\cdot \ln(1.0134)=\ln\left(\dfrac{2}{1.14}\right)$ Divide both sides by $\ln(1.0134)$ $t = \dfrac{\ln\left(\dfrac{2}{1.14}\right)}{\ln(1.0134)}$ Calculate. $t\approx 42.23 \text{ years}$

If this growth rate continues, the model predicts the population of India will reach 2 billion about 42 years after 2008, or approximately in the year 2050.

#### Example 6 – solving for a variable in the exponent

Solve $5e^{-0.3t}=2$ for $t$.

 State the initial equation. $5e^{-0.3t}=2$ Divide by 5 to isolate the exponential. $e^{-0.3t}=\frac{2}{5}$ Take the natural log of both sides. $\ln\left(e^{-0.3t}\right)=\ln\left(\dfrac{2}{5}\right)$ Use the inverse property for logs (2). $-0.3t=\ln\left(\dfrac{2}{5}\right)$ Divide by -0.3. $t = \dfrac{\ln\left(\dfrac{2}{5}\right)}{-0.3}$ Calculate. $t\approx 3.054$

In addition to solving exponential equations, logarithmic expressions are very useful in compound interest questions.

#### Example 7 – compound interest

Let’s consider an example from the previous section: Suppose an investment of $2,000 at the annual rate of 1.89% can be compounded quarterly and continuously. Determine when the total amount, including interest, will reach$2,500 in each of the two cases of compounding.

Answer: $t=?$

Compounding quarterly: $A_q(t)=P\left(1+\frac{r}{m}\right)^{mt}=2000\left(1+\frac{0.0189}{4}\right)^{4t}$

\begin{align*} A_q(t)&=2500\Rightarrow 2000\left(1+\frac{0.0189}{4}\right)^{4t}=2500\\ &\Rightarrow\left(1+\frac{0.0189}{4}\right)^{4t}=\frac{2500}{2000}\\ &\Rightarrow\ln\left(\left(1+\frac{0.0189}{4}\right)^{4t}\right)=\ln\left(\frac{2500}{2000}\right)\\ &\Rightarrow 4t\cdot\ln\left(1+\frac{0.0189}{4}\right)=\ln\left(\frac{2500}{2000}\right)\\ &\Rightarrow t=\frac{\ln\left(\frac{2500}{2000}\right)}{4\cdot \ln\left(1+\frac{0.0189}{4}\right)}\\ &\Rightarrow t\approx 11.834 \end{align*}

Since 11.834 years is between 11 years and three quarters and 12 years, the time it will for the investment to reach 2500 by compounding quarterly is 12 years. Compounding continuously: $A_c(t)=Pe^{rt}=2000e^{0.0189t}$ \begin{align*} A_c(t)&=2500\Rightarrow 2000e^{0.0189t}=2500\\ &\Rightarrow e^{0.0189t}=\frac{2500}{2000}\\ &\Rightarrow\ln\left(e^{0.0189t}\right)=\ln\left(\frac{2500}{2000}\right)\\ &\Rightarrow 0.0189t\ln(e)=\ln\left(\frac{2500}{2000}\right)\\ &\Rightarrow 0.0189t=\ln\left(\frac{2500}{2000}\right)\\ &\Rightarrow t=\frac{\ln\left(\frac{2500}{2000}\right)}{0.0189}\\ &\Rightarrow t\approx 11.807 \end{align*} Since 11.807 years is approximately 11 years and $0.807(12)$ months, the time it will for the investment to reach2500 by compounding continuously is 11 years and 10 months.

While we don’t often need to sketch the graph of a logarithm, it is helpful to understand the basic shape.

Graphical Features of the Logarithm

Graphically, given the function $g(x)=\log_b(x)$.

• The graph has a horizontal intercept at (1, 0).
• The graph has a vertical asymptote at $x = 0$.
• The graph is increasing and concave down.
• The domain of the function is $x \gt 0$, or $(0, \infty)$ in interval notation.
• The range of the function is all real numbers, or $(-\infty, \infty)$ in interval notation.

When sketching a general logarithm with base $b$, it can be helpful to remember that the graph will pass through the points $(1, 0)$ and $(b, 1)$.

To get a feeling for how the base affects the shape of the graph, examine the graphs below:

Another important observation made was the domain of the logarithm: $x \gt 0$. Like the reciprocal and square root functions, the logarithm has a restricted domain which must be considered when finding the domain of a composition involving a log.

#### Example 8 – domain of a logarithmic function

Find the domain of the function $f(x)=\log(5-2x)$.

The logarithm is only defined when the input is positive, so this function will only be defined when $5-2x \gt 0$.Solving this inequality, $-2x \gt -5$, so $x\lt \frac{5}{2}$.The domain of this function is $x\lt \frac{5}{2}$, or, in interval notation, $\left(-\infty, \frac{5}{2} \right)$.