Now, we will define the domain and range of a logarithmic function given an equation or a graph. We will also construct graphs of logarithmic functions given tables and equations.
Graphing Logarithmic Functions
Now that we have a feel for the set of values for which a logarithmic function is defined, we move on to graphing logarithmic functions. The family of logarithmic functions includes the parent function \(y=log_b(x)\) along with all its transformations: shifts, stretches, compressions, and reflections.
We begin with the parent function \(y=log_b(x)\). Because every logarithmic function of this form is the inverse of an exponential function with the form \(y=b^x\), their graphs will be reflections of each other across the line \(y=x\). To illustrate this, we can observe the relationship between the input and output values of \(y=2^x\) and its equivalent \(x=log_2(y)\) in Table 1.
\(x\) | \(-3\) | \(-2\) | \(-1\) | \(0\) | \(1\) | \(2\) | \(3\) |
\(2^x=y\) | \(\frac{1}{8}\) | \(\frac{1}{4}\) | \(\frac{1}{2}\) | \(1\) | \(2\) | \(4\) | \(8\) |
\(log_2(y) = x\) | \(-3\) | \(-2\) | \(-1\) | \(0\) | \(1\) | \(2\) | \(3\) |
Table 1
Using the inputs and outputs from Table 1, we can build another table to observe the relationship between points on the graphs of the inverse functions \(f(x)=2^x\) and \(g(x)=log_2(x)\). See Table 2.
\(f(x)=2^x\) | \((−3, \frac{1}{8})\) | \((−2, \frac{1}{4})\) | \((−1, \frac{1}{2})\) | \((0, 1)\) | \((1, 2)\) | \((2, 4)\) | \((3, 8)\) |
\(g(x)=log_2(x)\) | \((\frac{1}{8}, -3)\) | \((\frac{1}{4}, -2)\) | \((\frac{1}{2}, -1)\) | \((1, 0)\) | \((2, 1)\) | \((4, 2)\) | \((8, 3)\) |
Table 2
Figure 2 Notice that the graphs of \(f(x)=2^x\) and \(g(x)=log_2(x)\) are reflections about the line \(y=x\).
Observe the following from the graph:
- \(f(x)=2^x\) has a \(y\)-intercept at \((0,1)\) and \(g(x)=log_2(x)\) has an \(x\)- intercept at \((1,0)\).
- The domain of \(f(x)=2^x, (− \infty, \infty)\), is the same as the range of \(g(x)=log_2(x)\).
- The range of \(f(x)=2^x, (0, \infty)\), is the same as the domain of \(g(x)=log_2(x)\).
CHARACTERISTICS OF THE GRAPH OF THE PARENT FUNCTION, \(f(x)=log_b(x)\):
For any real number \(x\) and constant \(b > 0, b \neq 1\), we can see the following characteristics in the graph of \(f(x)=log_b(x)\):
- one-to-one function
- vertical asymptote: \(x=0\)
- domain: \((0, \infty)\)
- range: \((−\infty, \infty)\)
- \(x\)-intercept: \((1,0)\) and key point \((b,1)\)
- \(y\)-intercept: none
- increasing if \(b > 1\)
- decreasing if \(0 < b < 1\)
See Figure 3.
Figure 3
Figure 4 shows how changing the base \(b\) in \(f(x)=log_b(x)\) can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function \(\ln(x)\) has base \(e \approx 2.718\).)
Figure 4 The graphs of three logarithmic functions with different bases, all greater than 1.
HOW TO
Given a logarithmic function with the form \(f(x)=log_b(x)\), graph the function.
- Draw and label the vertical asymptote, \(x=0\).
- Plot the \(x\)-intercept, \((1,0)\).
- Plot the key point \((b,1)\).
- Draw a smooth curve through the points.
- State the domain, \((0, \infty)\), the range, \((−\infty, \infty)\), and the vertical asymptote, \(x=0\).
EXAMPLE 3
Graphing a Logarithmic Function with the \(f(x) = log_b(x)\).
Graph \(f(x)=log_5(x)\). State the domain, range, and asymptote.
Solution
Before graphing, identify the behavior and key points for the graph.- Since \(b=5\) is greater than one, we know the function is increasing. The left tail of the graph will approach the vertical asymptote \(x=0\), and the right tail will increase slowly without bound.
- The \(x\)-intercept is \((1,0)\).
- The key point \((5,1)\) is on the graph.
- We draw and label the asymptote, plot and label the points, and draw a smooth curve through the points (see Figure 5).
Figure 5
The domain is \((0, \infty)\), the range is \((−\infty, \infty)\), and the vertical asymptote is \(x=0\).
TRY IT #3
Graph \(f(x)=log_{\frac{1}{5}}(x)\). State the domain, range, and asymptote.