2.6 Graphs of Logarithmic Functions

Learning Objectives

In this section, you will:

  • Identify the domain of a logarithmic function and its transformations.
  • Graph logarithmic functions and its transformations.

In Section 2.3, Graphs of Exponential Functions, we saw how creating a graphical representation of an exponential model gives us another layer of insight for predicting future events. How do logarithmic graphs give us insight into situations? Because every logarithmic function is the inverse function of an exponential function, we can think of every output on a logarithmic graph as the input for the corresponding inverse exponential equation.

To illustrate, suppose we invest $2500 in an account that offers an annual interest rate of 5%, compounded continuously. We already know that the balance in our account for any year [latex]t[/latex] can be found with the equation [latex]A=2500{e}^{0.05t}.[/latex]

But what if we wanted to know the year given any balance? We would need to create a corresponding new function by using logarithms to solve for the year; thus we would need to create a logarithmic model for this situation. By graphing the model, we can see the output (year) for any input (account balance). For instance, what if we wanted to know how many years it would take for our initial investment to double? Figure 1 shows this point on the logarithmic graph.

A graph titled, “Logarithmic Model Showing Years as a Function of the Balance in the Account”. The x-axis is labeled, “Account Balance”, and the y-axis is labeled, “Years”. The line starts at 25,000 on the first year. The graph also notes that the balance reaches 5,000 near year 14.

Figure 1.

In this section, we will discuss the values for which a logarithmic function is defined, and then turn our attention to graphing the family of logarithmic functions.

Finding the Domain of a Logarithmic Function

Before working with graphs, we will take a look at the domain (the set of input values) for which the logarithmic function is defined.

Recall that the exponential function is defined as [latex]f\left(x\right)={b}^{x}\text{ }[/latex] for any real number [latex]x[/latex] and constant [latex]b>0,[/latex] [latex]b\ne 1,[/latex] where

  • The domain of [latex]f\left(x\right)[/latex] is [latex]\left(-\infty ,\infty \right).[/latex]
  • The range of [latex]f\left(x\right)[/latex] is [latex]\left(0,\infty \right).[/latex]

In a previous section we learned that the logarithmic function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] is the inverse of the exponential function with base b.  So, as inverse functions:

  • The domain of [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] is the range of [latex]f^{-1}\left(x\right)={b}^{x}:[/latex] [latex]\left(0,\infty \right).[/latex]
  • The range of [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] is the domain of [latex]f^{-1}\left(x\right)={b}^{x}:[/latex] [latex]\left(-\infty ,\infty \right).[/latex]

Transformations of the logarithmic function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] behave similarly to those of other functions. Just as with toolkit and exponential functions, we can apply the four types of transformations—shifts, stretches, compressions, and reflections—to the original function without loss of shape.

In Section 2.3, Graphs of Exponential Functions we saw that certain transformations can change the range of [latex]y={b}^{x}.[/latex] Similarly, applying transformations to the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] can change the domain. When finding the domain of a logarithmic function, therefore, it is important to remember that we can only take the logarithm of positive real numbers. That is, the value of the input expression of the logarithmic function must be greater than zero.

For example, consider [latex]f\left(x\right)={\mathrm{log}}\left(2x-3\right).[/latex] This function is defined for any values of [latex]x[/latex] such that the input expression, in this case [latex]2x-3,[/latex] is greater than zero. To find the domain, we set up an inequality and solve for [latex]x:[/latex]

[latex]\begin{align*}2x-3&>0&&\text{Show the input expression is greater than zero}.\\2x&>3&&\text{Add 3}.\\x&>1.5&&\text{Divide by 2.}\end{align*}[/latex]

 

In interval notation, the domain of [latex]f\left(x\right)={\mathrm{log}}\left(2x-3\right)[/latex] is [latex]\left(1.5,\infty \right).[/latex]

How To

Given a logarithmic function, identify the domain.

  1. Set up an inequality showing the input expression greater than zero.
  2. Solve for [latex]x.[/latex]
  3. Write the domain in interval notation.

example 1:  Identifying the Domain of a Logarithmic Shift

What is the domain of [latex]f\left(x\right)={\mathrm{log}}_{2}\left(x+3\right)?[/latex]

Try it #1

What is the domain of [latex]f\left(x\right)={\mathrm{log}}_{5}\left(x-2\right)+1?[/latex]

example 2:  Identifying the Domain of a Logarithmic Shift and Reflection

What is the domain of [latex]f\left(x\right)=\mathrm{log}\left(5-2x\right)?[/latex]

Try it #2

What is the domain of [latex]f\left(x\right)=\mathrm{log}\left(x-5\right)+2?[/latex]

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 function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] along with all its transformations: shifts, stretches, compressions, and reflections.

We begin with the function [latex]y={\mathrm{log}}_{b}\left(x\right).[/latex] Because every logarithmic function of this form is the inverse of an exponential function with base b, their graphs will be reflections of each other across the line [latex]y=x.[/latex] To illustrate this, we can observe the relationship between the input and output values of [latex]y={2}^{x}[/latex] and its equivalent [latex]x={\mathrm{log}}_{2}\left(y\right)[/latex] in Table 1.

Table 1
[latex]x[/latex] [latex]-3[/latex] [latex]-2[/latex] [latex]-1[/latex] [latex]0[/latex] [latex]1[/latex] [latex]2[/latex] [latex]3[/latex]
[latex]{2}^{x}=y[/latex] [latex]\frac{1}{8}[/latex] [latex]\frac{1}{4}[/latex] [latex]\frac{1}{2}[/latex] [latex]1[/latex] [latex]2[/latex] [latex]4[/latex] [latex]8[/latex]
[latex]y={2}^{x}[/latex] [latex]\frac{1}{8}[/latex] [latex]\frac{1}{4}[/latex] [latex]\frac{1}{2}[/latex] [latex]1[/latex] [latex]2[/latex] [latex]4[/latex] [latex]8[/latex]
[latex]x={\mathrm{log}}_{2}\left(y\right)[/latex] [latex]-3[/latex] [latex]-2[/latex] [latex]-1[/latex] [latex]0[/latex] [latex]1[/latex] [latex]2[/latex] [latex]3[/latex]

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 [latex]f\left(x\right)={2}^{x}[/latex] and [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right).[/latex] See Table 2.

Table 2
[latex]f\left(x\right)={2}^{x}[/latex] [latex]\left(-3,\frac{1}{8}\right)[/latex] [latex]\left(-2,\frac{1}{4}\right)[/latex] [latex]\left(-1,\frac{1}{2}\right)[/latex] [latex]\left(0,1\right)[/latex] [latex]\left(1,2\right)[/latex] [latex]\left(2,4\right)[/latex] [latex]\left(3,8\right)[/latex]
[latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] [latex]\left(\frac{1}{8},-3\right)[/latex] [latex]\left(\frac{1}{4},-2\right)[/latex] [latex]\left(\frac{1}{2},-1\right)[/latex] [latex]\left(1,0\right)[/latex] [latex]\left(2,1\right)[/latex] [latex]\left(4,2\right)[/latex] [latex]\left(8,3\right)[/latex]

As we’d expect, the x– and y-coordinates are reversed for the inverse functions. Figure 2 shows the graph of [latex]f[/latex] and [latex]g.[/latex]

Graph of two functions, f(x)=2^x and g(x)=log_2(x), with the line y=x denoting the axis of symmetry.

Figure 2. Notice that the graphs of[latex]\text{ }f\left(x\right)={2}^{x}\text{ }[/latex]and[latex]\text{ }g\left(x\right)={\mathrm{log}}_{2}\left(x\right)\text{ }[/latex]are reflections about the line[latex]\text{ }y=x.[/latex]

Observe the following from the graph:

  • [latex]f\left(x\right)={2}^{x}[/latex] has a y-intercept at [latex]\left(0,1\right)[/latex] and [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] has an x– intercept at [latex]\left(1,0\right).[/latex]
  • The domain of [latex]f\left(x\right)={2}^{x},[/latex] [latex]\left(-\infty ,\infty \right),[/latex] is the same as the range of [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right).[/latex]
  • The range of [latex]f\left(x\right)={2}^{x},[/latex] [latex]\left(0,\infty \right),[/latex] is the same as the domain of [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right).[/latex]

Recall that for exponential growth functions like [latex]f\left(x\right)=2^x[/latex], we observed that as x decreased without bound, [latex]f\left(x\right)[/latex] gets closer and closer to zero from above. We concluded that exponential growth functions of the form [latex]f(x)=ab^x[/latex] have a horizontal asymptote of [latex]y=0[/latex] on one side.  We created tables supporting this idea numerically.  Using the inverse relationship, we will study what happens in the logarithmic function as the input gets closer and closer to zero from the right of zero or through values of x slightly larger than zero.

To create a table of values to explore this idea, we choose input values that get closer and closer to zero from the right side and then evaluate [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right).[/latex]  We choose values slightly larger than zero because the logarithm is defined only for positive values and we want to observe what happens near the boundary of the domain.  See Table 3.

Table 3
[latex]x[/latex] 0.1 0.01 0.001 0.0001
[latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] -3.322 -6.644 -9.966 -13.288

As [latex]x[/latex] gets closer and closer to zero from the right (or from the positive side), the function values decrease without bound (go toward minus infinity).  Referring back to Figure 2,  we observe that the graph of [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex]  decreases without bound or decreases rapidly as [latex]x[/latex] approaches zero from the right.

We use arrow notation to express these ideas. See Table 4.

Table 4:  Arrow Notation
Symbol Meaning
[latex]x\to {a}^{-}[/latex] [latex]x[/latex] approaches [latex]a[/latex] from the left ([latex]x<a[/latex] but values are increasing to get closer and closer to [latex]a[/latex])
[latex]x\to {a}^{+}[/latex] [latex]x[/latex] approaches [latex]a[/latex] from the right ([latex]x>a[/latex] but values are decreasing to get closer and closer to [latex]a[/latex])
[latex]f\left(x\right)\to \infty [/latex] the output goes toward infinity (the output increases without bound)
[latex]f\left(x\right)\to -\infty [/latex] the output goes toward negative infinity (the output decreases without bound)
[latex]\\[/latex]For the function [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex], we write in arrow notation, as [latex]x\to {0}^{+},\text{ }g\left(x\right)\to-\infty .[/latex]  This behavior demonstrates a vertical asymptote, which is a vertical line where the graph decreases rapidly  as the input values get closer and closer to 0 from the right hand side.[latex]\\[/latex]

Definition

A vertical asymptote of a graph is a vertical line [latex]x=a[/latex] where the function’s output tends toward positive or negative infinity as the inputs approach [latex]a.[/latex] We write

 as [latex]x\to a^{-},f\left(x\right)\to \infty,[/latex] or as [latex]x\to a^{+},f\left(x\right)\to \infty, [/latex] or

as [latex]x\to a^{-},f\left(x\right)\to -\infty,[/latex] or as [latex]x\to a^{+},f\left(x\right)\to -\infty .[/latex][latex]\\[/latex]

Note that vertical asymptotes may exist as [latex]x=a[/latex] is approached from one side or the other.  In the case of the logarithmic function, the domain will only exist on one side of the asymptote so the asymptote will be one-sided.  When we study other families of functions, we will see examples where the function increases and/or decreases rapidly on both sides of the vertical asymptote.

Note that when technology is used to graph logarithmic functions, it often appears that there is a vertical intercept rather than a vertical asymptote. Creating a table of values demonstrates that, in fact, there is a vertical asymptote. 

Characteristics of the Graph of the Function, f(x) = logb(x)

For any real number [latex]x[/latex] and constant [latex]b>0,[/latex] [latex]b\ne 1,[/latex] we can see the following characteristics in the graph of [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right):[/latex]

  • one-to-one function
  • vertical asymptote: [latex]x=0[/latex]
  • domain: [latex]\left(0,\infty \right)[/latex]
  • range: [latex]\left(-\infty ,\infty \right)[/latex]
  • horizontal intercept: [latex]\left(1,0\right)[/latex] and key point [latex]\left(b,1\right)[/latex]
  • vertical intercept: none
  • increasing if [latex]b>1[/latex] and decreasing if [latex]0<b<1[/latex]

See Figure 3.

Figure 3.

How To

Given a logarithmic function with the form [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right),[/latex] graph the function.

  1. Draw and label the vertical asymptote, [latex]x=0.[/latex]
  2. Plot the horizontal intercept, [latex]\left(1,0\right).[/latex]
  3. Plot the key point [latex]\left(b,1\right).[/latex]
  4. Draw a smooth curve through the points.
  5. State the domain, [latex]\left(0,\infty \right),[/latex] the range, [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote, [latex]x=0.[/latex]

example 3:  Graphing a Logarithmic Function with the Form f(x) = logb(x).

Graph [latex]f\left(x\right)={\mathrm{log}}_{5}\left(x\right).[/latex] State the domain, range, and asymptote.

Try it #3

Graph [latex]f\left(x\right)={\mathrm{log}}_{\frac{1}{5}}\left(x\right).[/latex] State the domain, range, and vertical asymptote.

For [latex]b > 1,[/latex] the base of the logarithm effects how quickly the graph increases as [latex]x[/latex] gets larger or decreases as [latex]x[/latex] goes to zero. Figure 5 shows the graphs of three logarithmic functions [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] with the base [latex]b=2,[/latex] [latex]b=e\approx 2.718,[/latex] and [latex]b=10[/latex]. Observe that the graphs compress vertically as the value of the base increases. The key points for the graphs are (2, 1), (e, 1) and (10, 1) respectively showing that base [latex]b=2[/latex] reaches an output value of 1 more quickly than base e or 10.

Graph of three equations: y=log_2(x) in blue, y=ln(x) in orange, and y=log(x) in red. The y-axis is the asymptote.

Figure 5. The graphs of three logarithmic functions with different bases, all greater than 1.

Graphing Transformations of Logarithmic Functions

As we mentioned in the beginning of the section, transformations of logarithmic graphs behave similarly to those of toolkit and exponential functions. We can shift, stretch, compress, and reflect the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] without loss of shape.

Graphing a Horizontal Shift of y = logb(x)

We will begin by looking at a horizontal shift of the function [latex]y={\mathrm{log}}_{b}\left(x\right).[/latex] Consider the function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x-c\right),[/latex] where [latex]c[/latex] is a constant. If [latex]c[/latex] is positive, then the horizontal shift is to the right and if [latex]c[/latex] is negative, the horizontal shift is to the left. Note that, as we observed in earlier sections, because the general formula for the horizontal shift contains a minus sign, [latex]c[/latex] will have the opposite sign of what you observe in the formula.

Summary of horizontal shifts

Figure 6

Horizontal Shifts of the Function y = logb(x)

For any constant [latex]c,[/latex] the function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x-c\right)[/latex]

  • shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] right [latex]c[/latex] units if [latex]c>0.[/latex]
  • shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] left [latex]c[/latex] units if [latex]c<0.[/latex]
  • has the vertical asymptote [latex]x=c.[/latex]
  • has domain [latex]\left(c,\infty \right).[/latex]
  • has range [latex]\left(-\infty ,\infty \right).[/latex]

How To

Given a logarithmic function with the form [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x-c\right),[/latex] graph the translation.

  1. Determine the value for [latex]c.[/latex]  It will have the opposite sign of what you see in the simplified formula.
  2. Identify the horizontal shift:
    • If [latex]c>0,[/latex] shift the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] right [latex]c[/latex] units.
    • If [latex]c<0,[/latex] shift the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] left [latex]c[/latex] units.
  3. Draw the vertical asymptote [latex]x=c.[/latex]
  4. Identify two or three key points from the function [latex]y={\mathrm{log}}_{b}\left(x\right).[/latex] Find new coordinates for the shifted functions by adding [latex]c[/latex] to the [latex]x[/latex] coordinate.
  5. Label the points.
  6. The domain is [latex]\left(c,\infty \right),[/latex] the range is [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote is [latex]x=c.[/latex]

example 4:  Graphing a Horizontal Shift of the Function y = logb(x)

Sketch the horizontal shift [latex]f\left(x\right)={\mathrm{log}}_{3}\left(x-2\right)[/latex] alongside the function [latex]y={\mathrm{log}}_{3}\left(x\right).[/latex] Include the key points and the vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Try it #4

Sketch a graph of [latex]f\left(x\right)={\mathrm{log}}_{3}\left(x+4\right)[/latex] alongside the function [latex]y={\mathrm{log}}_{3}\left(x\right)[/latex]. Include the key points and the vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Graphing a Vertical Shift of y = logb(x)

When a constant [latex]d[/latex] is added to the function [latex]y={\mathrm{log}}_{b}\left(x\right),[/latex] the result is a vertical shift [latex]d[/latex] units in the direction of the sign of [latex]d.[/latex] To visualize vertical shifts, we can observe the general graph of the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] alongside the shift, [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)+d.[/latex] See Figure 8.

Figure 8

Vertical Shifts of the Function y = logb(x)

For any constant [latex]d,[/latex] the function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)+d[/latex]

  • shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] up [latex]d[/latex] units if [latex]d>0.[/latex]
  • shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] down [latex]d[/latex] units if [latex]d<0.[/latex]
  • has the vertical asymptote [latex]x=0.[/latex]
  • has domain [latex]\left(0,\infty \right).[/latex]
  • has range [latex]\left(-\infty ,\infty \right).[/latex]

How To

Given a logarithmic function with the form [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)+d,[/latex] graph the translation.

  1. Identify the vertical shift:
    • If [latex]d>0,[/latex] shift the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] up [latex]d[/latex] units.
    • If [latex]d<0,[/latex] shift the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] down [latex]d[/latex] units.
  2. Draw the vertical asymptote [latex]x=0.[/latex]
  3. Identify two or three key points from the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex]. Find new coordinates for the shifted functions by adding [latex]d[/latex] to the [latex]y[/latex] coordinate.
  4. Label the points.
  5. The domain is [latex]\left(0,\infty \right),[/latex] the range is [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote is [latex]x=0.[/latex]

example 5:  Graphing a Vertical Shift of the Function y = logb(x)

Sketch a graph of [latex]f\left(x\right)={\mathrm{log}}_{3}\left(x\right)-2[/latex] alongside the function [latex]y={\mathrm{log}}_{3}\left(x\right)[/latex]. Include the key points and the vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Try it #5

Sketch a graph of [latex]f\left(x\right)={\mathrm{log}}_{2}\left(x\right)+2[/latex] alongside the function [latex]y={\mathrm{log}}_{2}\left(x\right)[/latex]. Include the key points and vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Graphing Vertical Stretches and Compressions of y = logb(x)

When the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is multiplied by a constant [latex]a>0,[/latex] the result is a vertical stretch or compression of the original graph. To visualize stretches and compressions, we set [latex]a>0[/latex] and observe the general graph of the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] alongside the vertical stretch or compression, [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x\right).[/latex] See Figure 10.

Figure 10

Vertical Stretches and Compressions of the Function y = logb(x)

For any constant [latex]a>1,[/latex] the function [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x\right)[/latex]

  • stretches the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] vertically by a factor of [latex]a[/latex] if [latex]a>1.[/latex]
  • compresses the  function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] vertically by a factor of [latex]a[/latex] if [latex]0<a<1.[/latex]
  • has the vertical asymptote [latex]x=0.[/latex]
  • has the horizontal intercept [latex]\left(1,0\right).[/latex]
  • has domain [latex]\left(0,\infty \right).[/latex]
  • has range [latex]\left(-\infty ,\infty \right).[/latex]

How To

Given a logarithmic function with the form  [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x\right),[/latex] [latex]a>0,[/latex] graph the translation.

  1. Identify the vertical stretch or compressions:
    • If [latex]|a|>1,[/latex] the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is stretched by a factor of [latex]a[/latex] units.
    • If [latex]|a|<1,[/latex] the graph of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is compressed by a factor of [latex]a[/latex] units.
  2. Draw the vertical asymptote [latex]x=0.[/latex]
  3. Identify two or three key points from the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex]. Find new coordinates for the stretched or compressed function by multiplying the [latex]y[/latex] coordinates by [latex]a.[/latex]
  4. Label the points.
  5. The domain is [latex]\left(0,\infty \right),[/latex] the range is [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote is [latex]x=0.[/latex]

example 6:  Graphing a Stretch or Compression of the Function y = logb(x)

Sketch a graph of [latex]f\left(x\right)=2{\mathrm{log}}_{4}\left(x\right)[/latex] alongside the function [latex]y={\mathrm{log}}_{4}\left(x\right)[/latex]. Include the key points and the vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Try it #6

Sketch a graph of [latex]f\left(x\right)=\frac{1}{2}\text{ }{\mathrm{log}}_{4}\left(x\right)[/latex] alongside the function [latex]y={\mathrm{log}}_{4}\left(x\right)[/latex]. Include the key points and the vertical asymptote on the graph. State the domain, range, and vertical asymptote.

example 7:  Combining a Shift and a Stretch

Sketch a graph of [latex]f\left(x\right)=5\mathrm{log}\left(x+2\right).[/latex] State the domain, range, and vertical asymptote.

Try it #7

Sketch a graph of the function [latex]f\left(x\right)=3\mathrm{log}\left(x-2\right)+1.[/latex] State the domain, range, and vertical asymptote.  Identify at least 2 key points on [latex]f\left(x\right)=3\mathrm{log}\left(x-2\right)+1.[/latex]

Graphing Reflections of y = logb(x)

When the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is multiplied by [latex]-1[/latex] we are negating the output so, the result is a reflection about the x-axis. When the input is multiplied by [latex]-1,[/latex] the result is a reflection about the y-axis. To visualize reflections, we restrict [latex]b>1,[/latex] and observe the general graph of the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] alongside the reflection about the x-axis, [latex]g\left(x\right)={\mathrm{-log}}_{b}\left(x\right)[/latex] and the reflection about the y-axis, [latex]h\left(x\right)={\mathrm{log}}_{b}\left(-x\right).[/latex]

Figure 13

Reflections of the Function y = logb(x)

The function [latex]f\left(x\right)={\mathrm{-log}}_{b}\left(x\right)[/latex]

  • reflects the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] about the x-axis, and
  • has domain, [latex]\left(0,\infty \right),[/latex] range, [latex]\left(-\infty ,\infty \right),[/latex] and vertical asymptote, [latex]x=0,[/latex] which are unchanged from the original function.

The function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(-x\right)[/latex]

  • reflects the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] about the y-axis,
  • has domain [latex]\left(-\infty ,0\right),[/latex] and
  • has range, [latex]\left(-\infty ,\infty \right),[/latex] and vertical asymptote, [latex]x=0,[/latex] which are unchanged from the original function.

How To

Given a logarithmic function with the  function [latex]y={\mathrm{log}}_{b}\left(x\right),[/latex] graph a translation.

If [latex]f\left(x\right)=-{\mathrm{log}}_{b}\left(x\right)[/latex] If [latex]f\left(x\right)={\mathrm{log}}_{b}\left(-x\right)[/latex]
  1. Draw the vertical asymptote, [latex]x=0.[/latex]
  1. Draw the vertical asymptote, [latex]x=0.[/latex]
  1. Plot the x-intercept, [latex]\left(1,0\right).[/latex]
  1. Plot the x-intercept, [latex]\left(-1,0\right).[/latex]
  1. Reflect the graph of the function [latex]fy={\mathrm{log}}_{b}\left(x\right)[/latex] about the x-axis. Key point [latex]\left(b,\text{ }1\right)[/latex] reflects to [latex]\left(b,\text{ }-1\right).[/latex]
  1. Reflect the graph of the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] about the y-axis. Key point [latex]\left(b,\text{ }1\right)[/latex] reflects to [latex]\left(-b,\text{ }1\right).[/latex]
  1. Draw a smooth curve through the points.
  1. Draw a smooth curve through the points.
  1. State the domain, [latex]\left(0,\infty \right),[/latex] the range, [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote [latex]x=0.[/latex]
  1. State the domain, [latex]\left(-\infty ,0\right),[/latex] the range, [latex]\left(-\infty ,\infty \right),[/latex] and the vertical asymptote [latex]x=0.[/latex]

example 8:  Graphing a Reflection of a Logarithmic Function

Sketch a graph of [latex]f\left(x\right)=\mathrm{log}\left(-x\right)[/latex] alongside the function [latex]y=\mathrm{log}\left(x\right)[/latex]. Include the key points and vertical asymptote on the graph. State the domain, range, and vertical asymptote.

Try it #8

Graph [latex]f\left(x\right)=-\mathrm{log}\left(-x\right).[/latex] State the domain, range, and vertical asymptote.

Summarizing Translations of the Logarithmic Function

Now that we have worked with each type of translation for the logarithmic function, we can summarize each in Table 5 to arrive at the general equation for translating exponential functions.

Table 5
Translations of the Function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex]
Translation Form
Shift

  • Horizontally [latex]c[/latex] units to the left or right
  • Vertically [latex]d[/latex] units up or down
[latex]f\left(x\right)={\mathrm{log}}_{b}\left(x-c\right)+d[/latex]
Stretch and Compress

  • Vertical stretch if [latex]|a|>1[/latex]
  • Vertical compression if [latex]|a|<1[/latex]
[latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x\right)[/latex]
Reflect about the x-axis [latex]f\left(x\right)=-{\mathrm{log}}_{b}\left(x\right)[/latex]
Reflect about the y-axis [latex]f\left(x\right)={\mathrm{log}}_{b}\left(-x\right)[/latex]
General equation for all translations [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x-c\right)+d[/latex]

example 9:  Finding the Vertical Asymptote of a Logarithm Graph

What is the vertical asymptote of [latex]f\left(x\right)=-2{\mathrm{log}}_{3}\left(x+4\right)+5?[/latex]

Try it #9

What is the vertical asymptote of [latex]f\left(x\right)=3+\mathrm{ln}\left(x-1\right)?[/latex]

example 10:  Finding the Equation from a Graph

Find a possible equation for the common logarithmic function graphed in Figure 15.

Graph of a logarithmic function with a vertical asymptote at x=-2, has been vertically reflected, and passes through the points (-1, 1) and (2, -1).

Figure 15.

Try it #10

Give the equation of the natural logarithm graphed in Figure 16.  Note that the points [latex]\left(-2, -1\right) [/latex] and [latex]\left(e-3, 1\right)[/latex] are on the graph.

Graph of a logarithmic function with a vertical asymptote at x=-3, has been vertically stretched by 2, and passes through the points (-1, -1).

Figure 16.

Q&A

Is it possible to tell the domain and range and describe the end behavior of a function just by looking at the graph?

Yes, if we know the function is a general logarithmic function. For example, look at the graph in Figure 16. The graph approaches [latex]x=-3[/latex] (or thereabouts) more and more closely, so [latex]x=-3[/latex] is, or is very close to, the vertical asymptote. It approaches from the right, so the domain is all points to the right, [latex]\left\{x\text{ }|\text{ }x>-3\right\}.[/latex] The range, as with all general logarithmic functions, is all real numbers. And we can see the end behavior because the graph goes down as it goes left and up as it goes right. The end behavior is that as [latex]x\to -{3}^{+},f\left(x\right)\to -\infty[/latex] and as [latex]x\to \infty ,f\left(x\right)\to \infty .[/latex]

Access these online resources for additional instruction and practice with graphing logarithms.

Key Equations

General Form for the Translation of the Logarithmic Function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x-c\right)+d[/latex]

Key Concepts

  • To find the domain of a logarithmic function, set up an inequality showing the input expression greater than zero, and solve for [latex]x.[/latex]
  • The graph of the function [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] has an x-intercept at [latex]\left(1,0\right),[/latex] domain [latex]\left(0,\infty \right),[/latex] range [latex]\left(-\infty ,\infty \right),[/latex] vertical asymptote [latex]x=0,[/latex] and
    • if [latex]b>1,[/latex] the function is increasing.
    • if [latex]0<b<1,[/latex] the function is decreasing.

     

  • The equation [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x-c\right)[/latex] shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] horizontally
    • right [latex]c[/latex] units if [latex]c>0.[/latex]
    • left [latex]c[/latex] units if [latex]c<0.[/latex]

     

  • The equation [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)+d[/latex] shifts the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] vertically
    • up [latex]d[/latex] units if [latex]d>0.[/latex]
    • down [latex]d[/latex] units if [latex]d<0.[/latex]
  • The equation [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x\right)[/latex]
    • stretches the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] vertically by a factor of [latex]a[/latex] if [latex]|a|>1.[/latex]
    • compresses the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] vertically by a factor of [latex]a[/latex] if [latex]|a|<1.[/latex]
  • The equation [latex]f\left(x\right)=-{\mathrm{log}}_{b}\left(x\right)[/latex] represents a reflection of the function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] about the x-axis.
  • The equation [latex]f\left(x\right)={\mathrm{log}}_{b}\left(-x\right)[/latex] represents a reflection of the  function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] about the y-axis.
  • All translations of the logarithmic function can be summarized by the general equation [latex] f\left(x\right)=a{\mathrm{log}}_{b}\left(x-c\right)+d.[/latex]
  • Given an equation with the general form [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x-c\right)+d,[/latex] we can identify the vertical asymptote [latex]x=c[/latex] for the transformation.
  • Using the general equation [latex]f\left(x\right)=a{\mathrm{log}}_{b}\left(x-c\right)+d,[/latex] we can write the equation of a logarithmic function given its graph.