Skip to main content

Section 2.11 Logarithmic functions

Subsection Definition and algebraic properties

We observed in the previous section that exponential functions are one-to-one (in fact, monotonic), and hence invertible; and in ExampleΒ 2.10.26 we illustrated how properties of exponential functions \(f(x)=b^x\) (specifically graphical properties) can be translated directly to those of their inverse function \(f^{-1}\text{.}\) Those inverse functions turn out to be important enough to warrant their own name: logarithimic functions.

Definition 2.11.1. Logarithmic functions.

Let \(b\) be a positive real number. The logarithmic function with base \(b\) (or base-\(b\) logarithmic function) is the function
\begin{align*} \log_b\colon (0,\infty) \amp \rightarrow \R \end{align*}
defined as the inverse of the exponential function \(f(x)=b^x\text{.}\)
This method of defining a new function as the inverse of an existing one, is sometimes off-putting to students. We are accustomed to functions being defined via an explicit formula that allows us to compute its values directly. Note that this is not the case with our definition of logarithmic functions. We do not give you a formula for computing \(\log_b(x)\) for a given \(x\text{;}\) instead, we simply describe \(\log_b\) as the inverse function of the exponential function \(f(x)=b^x\text{.}\) So how do we deal with functions thus defined? The key is to use the many linked properties of a function \(f\) and its inverse \(f^{-1}\text{,}\) as articulated in TheoremΒ 2.10.25. The next theorem does just that, building on the various properties of exponential functions established in TheoremΒ 2.8.21. Statement (1) of the theorem is a direct applications of equations (2.24), (2.25), and (2.29) to the special case of \(f(x)=b^x\) and \(f^{-1}(x)=\log_b x\text{.}\) The properties of (2) follow from complementary properties of the exponential function essentially by reversing the roles of input and output.
The equivalence (2.32) is our main tool for computing actual values of \(\log_b\text{.}\) Let’s see how this works with an example.

Example 2.11.3. Computing logarithmic values.

Use the equivalence (2.32) to compute the given logarithmic expression without using technology.
  1. \(\displaystyle \log_2(32)\)
  2. \(\displaystyle \log_3(1/9)\)
  3. \(\displaystyle \log_{1/5}(\sqrt{5})\)
Solution.
  1. According to (2.32), we have \(\log_2(32)=s\) if and only if \(2^s=32\text{.}\) Since \(32=2^{5}\text{,}\) we conclude that \(\log_2 32=5\text{.}\)
  2. Similarly, \(\log_3(1/9)\) is the number \(s\) satisfying \(3^s=1/9\text{.}\) Since \(1/9=1/3^2=3^{-2}\text{,}\) we see that \(\log_3(1/9)=-2\text{.}\)
  3. We have \(\sqrt{5}=5^{1/2}=(5^{-1})^{-1/2}=(1/5)^{-1/2}\text{.}\) Equivalently, using (2.32), we see that \(\log_{1/5}(\sqrt{5})=-1/2\text{.}\)
The identities (2.35)–(2.38) can be used to simplify logarithmic expressions, as the next example illustrates.

Example 2.11.4. Simplifying logarithmic expressions.

Use the identities (2.35)–(2.38) to help compute the following logarithmic expressions without using technology.
  1. \(\displaystyle \log_{10}2+\log_{10}50\)
  2. \(\displaystyle 2\log_3 6-\log_3 4\)
Solution.
  1. We have
    \begin{align*} \log_{10}2+\log_{10}50 \amp =\log_{10}(2\cdot 50)\\ \amp = \log_{10} 100\\ \amp = 2\text{,} \end{align*}
    since \(100=10^2\text{.}\)
  2. We have
    \begin{align*} 2\log_3 6-\log_3 4 \amp = \log_3 6^2-\log_3 4\\ \amp = \log_3(6^2/4)\\ \amp = \log_3( 3^2)\\ \amp =2\text{.} \end{align*}
Continuing in our algebraic vein, we can use the identities (2.32)–(2.34) to solve equations involving logarithmic or exponential functions.

Example 2.11.5. Exponential and logarithmic equations.

Solve the given equation using the inverse identities (2.32)–(2.34). If possible, express your answer as a rational number. Otherwise, you may leave the answer in terms of logarithmic or exponential functions.
  1. \(\displaystyle 2^x=129\)
  2. \(\displaystyle 3^x=9^{2x-1}\)
  3. \(\displaystyle 2^{3x}=16^{1-x}\)
  4. \(\displaystyle 9\cdot 3^x=7^{2x}\)
  5. \(\displaystyle \log_3(x+5)+6=10\)
  6. \(\displaystyle 1+2\log_4(x+1)=2\log_2 x\)
Solution.
  1. Since do not recognize 129 as a rational power of \(2\text{,}\) our answer will be expressed in terms of logarithms. For the sake of illustration, we will solve in two different ways, using \(\log_2\) and \(\log_{10}\text{,}\) respectively. Using \(\log_2\text{,}\) we have
    \begin{align*} 2^x \amp =129\\ \log_2(2^x) \amp =\log_2(129) \\ x \amp =\log_2(129) \amp \knowl{./knowl/xref/eq_log_right_inv.html}{\text{(2.33)}}\text{.} \end{align*}
    Using \(\log_{10}\text{,}\) we have
    \begin{align*} 2^x \amp = 129\\ \log_{10}(2^x) \amp =\log_{10}129\\ x\log_{10} 2 \amp = \log_{10} 129 \amp \knowl{./knowl/xref/eq_log_power.html}{\text{(2.38)}}\\ x \amp = \frac{\log_{10}129}{\log_{10}2}\text{.} \end{align*}
    Interestingly, our different approaches yield very different looking answers. The change of base identity (2.39) reveals that the two answers are equal. Indeed, taking \(c=2\) and \(b=10\) in that identity, we see that
    \begin{align*} \log_2 129 \amp =\frac{\log_{10} 129}{\log_{10} 2}\text{.} \end{align*}
    Note that \(\log_2\) was a natural choice of base here since the original exponential equation involved the base \(2\text{;}\) and indeed, using \(\log_2\) instead of \(\log_{10}\) saved us a step in our solution.
  2. We have
    \begin{align*} 3^x \amp =9^{2x-1} \\ 3^x \amp =(3^2)^{2x-1} \\ 3^x \amp =3^{4x-2} \\ \log_3(3^x) \amp = \log_3(3^{4x-2})\\ x \amp = 4x-2 \amp \knowl{./knowl/xref/eq_log_right_inv.html}{\text{(2.33)}}\\ -3x \amp = -2 \\ x \amp = \frac{2}{3} \text{.} \end{align*}
    Note that instead of taking logarithms of both sides to get to the equation \(x=4x-2\text{,}\) we could have instead gone directly from \(3^x=3^{4x-2}\) to \(x=4x-2\text{.}\) This β€œequating exponents” rule, when the base is equal, follows from the one-to-one property of exponential functions. In general, we have \(b^x=b^y\) if and only if \(x=y\text{.}\) Feel free to use this shortcut in your algebra.
  3. We have
    \begin{align*} 2^{3x} \amp =16^{1-x} \\ 2^{3x} \amp =(2^4)^{1-x} \\ 2^{3x} \amp =2^{4-4x} \\ 3x \amp = 4-4x \amp (2^a=2^b \iff a=b)\\ 7x \amp =4 \\ x \amp =\frac{4}{7} \text{.} \end{align*}
  4. We have
    \begin{align*} 9\cdot 3^x \amp =7^{2x} \\ 3^2\cdot 3^x \amp =7^{2x} \\ 3^{x+2} \amp =7^{2x} \\ \log_3(3^{x+2}) \amp =\log_3(7^{2x}) \\ x+2 \amp = 2x\log_3 7 \amp \knowl{./knowl/xref/eq_log_right_inv.html}{\text{(2.33)}}, \knowl{./knowl/xref/eq_log_power.html}{\text{(2.38)}}\\ 2 \amp = x(2\log_3 7 -1) \\ x \amp = \frac{2}{2\log_3 7 -1} \text{.} \end{align*}
    Note how the two distinct bases \(3\) and \(7\) in this case prevented from expressing our answer in a simpler form.
  5. We have
    \begin{align*} \log_3(x+5)+6 \amp =10 \\ \log_3(x+5) \amp =4 \\ 3^{\log_3(x+5)} \amp =3^4 \\ x+5 \amp =81 \amp \knowl{./knowl/xref/eq_exp_right_inv.html}{\text{(2.34)}} \\ x \amp =76 \text{.} \end{align*}
  6. Since the logarithmic functions use different bases here, in order to get somewhere with our algebra, we will want to use a change of base formula. Taking \(b=4\) and \(c=2\text{,}\) we have
    \begin{align*} \log_4 a \amp =\frac{\log_2 a}{\log_2 4}\\ \amp =\frac{\log_2 a}{2}\text{,} \end{align*}
    since \(4=2^2\text{.}\) We now solve:
    \begin{align*} 1+2\log_4(x+1) \amp = 2\log_2 x \\ 1+2\cdot \frac{\log_2(x+1)}{2} \amp = 2\log_2 x \amp \knowl{./knowl/xref/eq_log_change_base.html}{\text{(2.39)}} \\ 1+\log_2(x+1) \amp = 2\log_2 x \\ 1 \amp =\log_2(x^2)-\log_2(x+1)\\ 1 \amp = \log_2(x^2/(x+1))\\ 2^1 \amp =2^{\log_2(x^2/(x+1))}\\ 2 \amp =x^2/(x+1)\\ 2(x+1) \amp = x^2 \\ 0 \amp = x^2-2x-2 \\ x \amp = \frac{2\pm \sqrt{(-2)^2-4\cdot 1 \cdot (-2)}}{2\cdot 1} \amp \\ x \amp = 1\pm \sqrt{3} \text{.} \end{align*}
    Since \(1-\sqrt{3}<0\text{,}\) and the domain of logarithmic functions is \((0,\infty)\text{,}\) we discard this solution. Thus \(x=1+\sqrt{3}\) is the only solution to the equation.
Before moving on to graphical properties of logarithmic functions, we consider the special case of the base-\(10\) logarithm \(\log_{10}\text{.}\) This logarithm appears fairly frequently in applications, mainly due to our favoring a base-10 (or decimal) number system. A useful manner of understanding \(\log_{10} x\) is as a measure of the length of the decimal expansion of \(x\text{.}\) This is made clear by looking at some simple examples:
\begin{align*} \log_{10} 10 \amp =\log_{10} 10^1=1 \\ \log_{10}100 \amp = \log_{10}10^2=2 \\ \log_{10}1000 \amp =\log_{10}10^3=3 \\ \log_{10}10000 \amp =\log_{10}10^4=4 \\ \log_{10}1\underset{ n \text{ zeros}}{\underbrace{00\dots 0}}\amp =\log_{10}10^n=n \amp \text{.} \end{align*}
We see that for powers of \(10\text{,}\) the base-10 logarithm \(\log_{10}10^n\) is equal to \(n\text{,}\) the number of trailing zeros behind the initial \(1\) in the decimal expansion of \(10^n\text{.}\) Equivalently, \(\log_{10}10^n\) is one less than the number of digits in the decimal expansion of \(10^n\text{.}\) What about for an arbitrary positive number \(x\) that is not a perfect power of 10? In that case, we can find an \(n\) such that
\begin{align*} 10^n \amp \leq x < 10^{n+1}\text{.} \end{align*}
In terms of decimal expansions, this means that \(x\) has at least as many decimals of \(10^n\text{,}\) and fewer decimals than \(10^{n+1}\text{:}\) i.e., \(x\) has \(n+1\) digits in its decimal expansion. This fact is reflected in the value \(\log_{10}x\text{.}\) Since, as we make official below, \(\log_{10}\) is an increasing function, the inequality \(10^n\leq x< 10^{n+1}\) implies
\begin{align*} n\amp \leq \log_{10} x < n+1\text{.} \end{align*}
Thus \(\log_{10} x\text{,}\) rounded to the nearest integer below \(x\text{,}\) is equal to one less than the number of digits in the decimal expansion of \(x\text{.}\) Let’s verify this with some examples, making use of technology:
\begin{align*} \log_{10} \underset{\boxed{2} \text{ digits}}{23}\amp \approx \boxed{1}.3617 \\ \log_{10} \underset{\boxed{3} \text{ digits}}{500} \amp \approx \boxed{2}.6990 \\ \log_{10} \underset{\boxed{4} \text{ digits}}{7000} \amp \approx \boxed{3}.8451 \\ \log_{10} \underset{\boxed{6} \text{ digits}}{125000} \amp \approx \boxed{5}.0969 \text{.} \end{align*}
Put another way, the number of digits in the decimal expansion of \(x\) is equal to the integer part of \(\log_{10}x\text{.}\) Because of the prevalence of base-10 logarithms, \(\log_{10}x\) is often written simply as \(\log x\text{.}\) We make this official now.

Definition 2.11.6. Base-\(10\) logarithm.

The base-\(10\) logarithm is the logarithmic function \(\log_{10}\text{,}\) which we will often write simply as \(\log\text{.}\)
Given a positive real number \(x\text{,}\) if \(n\) is the integer part of \(\log_{10} x\text{,}\) then \(x\) has \(n+1\) digits in its decimal expansion.
As a fun application of the change of base formula, we can estimate the number of digits in the decimal expansion of a big power of \(2\text{,}\) as long as we can approximate \(\log_{2}10\text{.}\)

Example 2.11.7. How big is \(2^n\text{?}\)

Use the change of base formula, and the fact that \(3 < \log_2 10< 4\) to derive an approximation for the number of digits in the decimal expansion of \(2^n\) for \(n\) a positive integer.
Check your result on the integers \(2^{10}\) and \(2^{50}\text{,}\) using technology.
Solution.
Let \(d(n)\) be the number of digits of the decimal expansion of \(2^n\text{.}\) From our discussion above, we know that \(d(n)\) is one more than the integer part of \(\log 2^n\text{.}\) Using the change of base formula between from base-\(10\) to base-\(2\text{,}\) we have
\begin{align*} \log 2^n \amp = \log_{10}2^n \\ \amp = \frac{\log_2 2^n}{\log_2 10}\\ \amp = \frac{n}{\log_2 10}\text{.} \end{align*}
Since \(3\leq \log_2 10\leq 4\text{,}\) we have
\begin{align*} \frac{n}{4} \amp \leq \log 2^n=\frac{n}{\log_2 10}\leq \frac{n}{3} \text{.} \end{align*}
Putting it all together, we see that
\begin{align*} \frac{n}{4}\amp \leq d(n) \leq \frac{n}{3}+1 \end{align*}
In particular, we estimate that \(2^{10}\) has between \(10/4=2.5\) and \(10/3+1\approx 4.3\) digits. More precisely, since the number of digits is an integer, \(2^{10}\) should have between \(3\) and \(4\) digits. In fact, we have
\begin{align*} 2^{10} \amp =(2^{5})^2\\ \amp =(32)^2\\ \amp = 1024\text{.} \end{align*}
Our estimate is correct!
Similarly, since \(50/4=12.5\) and \(50/3\approx 16.7\text{,}\) \(2^{50}\) should have between \(13\) and \(16\) digits. In fact, using technology, we find that
\begin{align*} 2^{50} \amp = 1,125,899,906,842,624 \text{,} \end{align*}
which has \(16\) digits. Again, our estimate was correct!
You may have noticed that the upper bound of estimates yielded for \(d(n)\) happened to be equal to the actual answer. This is just a happy accident for the values of \(n\) we chose. For example, \(2^{12}=4096\) has \(4\) digits, whereas our estimation method predicts between \(3\) and \(5\) digits.

Subsection Graphical properties

Just as with the algebraic properties, we can derive graphical properties of logarithmic functions using their inverse relation to exponential functions. With the exception of the statement about continuity, the following theorem follows almost immediately from TheoremΒ 2.9.5 and TheoremΒ 2.10.25. For example, letting \(f(x)=b^x\text{,}\) since we have
\begin{align*} \operatorname{domain} f \amp = \R\\ \range f \amp =(0,\infty)\text{,} \end{align*}
and since \(\log_b\) is the inverse of \(f\text{,}\) we have
\begin{align*} \operatorname{domain} \log_b \amp = (0,\infty)\\ \range \log_b \amp = \R\text{.} \end{align*}
Similarly, the monotonic and concavity properties of \(\log_b\) can be derived by seeing what happens when you reflect the graph of \(f(x)=b^x\) through the line \(y=x\) to obtain the graph of \(\log_b\text{.}\)
As with exponential functions, the graphical properties above can be used to quickly produce a graph of \(\log_b\text{.}\) Qualitatively, the graphs of any two logarithmic functions with base greater than \(1\) look very much alike, differing only in their steepness; indeed, using the change of base formula, since
\begin{align*} \log_c x \amp =\frac{1}{\log_b c}\log_b x\text{,} \end{align*}
we see that the graph of \(\log_c x\) is obtained by vertically scaling the graph of \(\log_b x\) by the factor \(1/(\log_b c)\text{.}\) Similar comments apply to the (less common) case of logarithmic functions with base \(b\) satisfying \(0< b< 1\text{.}\) As such the graphs of \(\log_2\) and \(\log_{1/2}\) in FigureΒ 2.11.9 can be used as models for the general case. Note how these two graphs appear to be mirror images of one another through the \(x\)-axis. This is explained once again by the change of base formula, since we have
\begin{align*} \log_{1/b} x \amp =\frac{\log_b x}{\log_b (1/b)}\\ \amp = \frac{\log_b x}{-1}\\ \amp =-\log_b x\text{.} \end{align*}
Lastly, we observe that just as with exponential functions, it is possible to make our graphs more precise by adding plotted points. Working base-2, or base-\(1/2\) this is easily done by plotting points \(P=(x,y)\) with \(x=2^n\text{.}\) Accordingly in the graphs below you find the following plotted points for various \(n\text{:}\)
\begin{align*} (2^n, \log_2 2^n) \amp = (2^n, n) \\ (2^n, \log_{1/2} 2^n) \amp = (2^n, -n) \text{.} \end{align*}
Graph of base-two log function
(a) \(f(x)=\log_2 x\)
Graph of base-one-half log function
(b) \(f(x)=\log_{1/2} x\)
Figure 2.11.9. Graphs of logarithmic functions

Exercises Exercises

3.

Find the solution of the exponential equation
\begin{equation*} -2+10^{5x}=30 \end{equation*}
correct to at least four decimal places.
\(x=\)
Answer.
\(0.301029995663981\)

4.

Find the solution of the exponential equation
\begin{equation*} 1000 (1.04)^{2t} = 50000 \end{equation*}
in terms of logarithms, or correct to four decimal places.
\(t=\)
Answer.
\(49.8719004692659\)