topic badge

6.03 Logarithmic functions

Logarithmic functions

Exploration

For f\left(x\right)=2^x:

  1. Sketch the graph of f\left(x\right) and f^{-1}\left(x\right) on the same coordinate plane.
  2. Compare the characteristics of f\left(x\right) and f^{-1}\left(x\right). What do you notice?

Logarithmic function

A function f\left(x\right) that represents the exponent to which b must be raised to get x. The logarithmic parent function is represented by the form f\left(x\right)=\log_{b}x, where x > 0, b > 0, and b \neq 1.

When we graph the inverse of an exponential function, we get a logarithmic function.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

An inverse function is a reflection across the line y = x which maps each point \left(x, y\right) to \left(y, x\right). Since y=\log_b\left(x\right) is the inverse of f\left(x\right)=b^x:

  • f\left(x\right) has a point at (0,\,1), so f^{-1}\left(x\right) has a point at (1,\,0)
  • f\left(x\right) has a point at (1,\,b), so f^{-1}\left(x\right) has a point at (b,\,1)
  • f\left(x\right) has an asymptote at y=0, f^{-1}\left(x\right) has an asymptote at x=0

The points that were approaching the y-axis on the parent exponential function are now approaching the x-axis in the logarithmic function. This means the parent logarithmic function will have a vertical asymptote.

-1
1
2
3
4
5
6
7
8
9
x
-4
-3
-2
-1
1
2
3
4
y

When the base b>1, the graph of the parent logarithmic function increases over its domain.

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • Increasing over the domain: \left(0, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • No y-intercept

  • The vertical asymptote is x=0

  • End behavior as x\to 0^{+}, f\left(x\right)\to -\infty
  • End behavior as x\to\infty, f\left(x\right)\to \infty

When we examine the end behavior on the left side of the graph, we cannot look at what is happening as x approaches negative infinity because the graph never crosses the vertical asymptote at x=0. Instead, the x-values approach a single value, in this case x=0. To indicate that x is approaching 0 from the positive side, we use the notation x\to 0^{+}.

-1
1
2
3
4
5
6
7
8
9
x
-4
-3
-2
-1
1
2
3
4
y

When 0<b<1, the graph decreases over its domain.

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • Decreasing over the domain: \left(0, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • No y-intercept

  • The vertical asymptote is x=0

  • End behavior as x\to 0^{+},\,f\left(x\right)\to \infty
  • End behavior as x\to \infty,\,f\left(x\right)\to -\infty

Since a logarithm is defined as the inverse of an exponential equation, we can use this relationship to evaluate logarithmic functions. Remember that the output of a logarithmic function represents the exponent that the base must be raised to.

\displaystyle y=\log_b \left(x\right) \iff b^y=x
\bm{b}
is the base and b>0, b\neq 1

Consider the function f\left(x\right)=\log_4{x}. If we want to find the output when x=16, we can use the inverse relationship to evaluate the logarithm. \log_4\left(16\right)=2\text{ because }4^2=16

When the base of a logarithm is not written, the understood base is 10.

\log\left(x\right)=\log_{10}\left(x\right)

Examples

Example 1

Determine if the following graphs and table represent a logarithmic function.

a
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

Identify key characteristics of a logarithmic graph, such as the approach to a vertical asymptote and increasing or decreasing behavior in y-values as x increases.

Apply the idea

The graph shows a curve that increases as x gets larger and has a vertical asymptote on the left, which are typical traits of a logarithmic function.

This graph represents a logarithmic function.

b
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Apply the idea

This graph does not match the typical shape of a logarithmic function. It shows a graph with two asymptotes and a discontinuity that divides the function into two sections, which is characteristic of a rational function instead.

So this graph does not represent a logarithmic function.

c
x1248
y0123
Worked Solution
Create a strategy

Analyze the given table of values to see if it corresponds to a logarithmic function. We can use the relationship between exponential functions and logarithmic functions to identify patterns.

Apply the idea

The y-values in the table increase by 1 each time the x-value doubles, which suggests a logarithmic relationship where the base of the logarithm is 2. We can also see that this table is a possible inverse of the function y=2^x, which further verifies that the relationship is logarithmic.

This table represents a logarithmic function.

Example 2

Given g\left(x\right)=\log_\frac{1}{2}\left(x\right) is the inverse of f\left(x\right)=\left(\dfrac{1}{2}\right)^x.

-2
-1
1
2
3
4
x
1
2
3
4
y
a

Use the graph of f\left(x\right)=\left(\dfrac{1}{2}\right)^x to create a table of values for the logarithmic function.

Worked Solution
Create a strategy

Identify points on the graph of f\left(x\right) to create a table of values. Each point (x,\,y) on f\left(x\right) will correspond to the point (y,x) on the inverse, g\left(x\right).

Apply the idea

To create a table of values, we will look for points on f\left(x\right) that are easy to identify.

x-2-10123
f\left(x\right)421\dfrac{1}{2}\dfrac{1}{4}\dfrac{1}{8}

Now, we will interchange the inputs and outputs to create a table of values for the inverse.

x421\dfrac{1}{2}\dfrac{1}{4}\dfrac{1}{8}
g\left(x\right)-2-10123
b

Graph g\left(x\right)=\log_\frac{1}{2}\left(x\right).

Worked Solution
Create a strategy

Plot the points from the table created in part (a) and draw the curve that passes through these points.

Apply the idea
-1
1
2
3
4
x
-2
-1
1
2
3
4
y
c

Compare the asymptotes, domain, range, and intercepts of f\left(x\right)=\left(\dfrac{1}{2}\right)^x and \\g\left(x\right)=\log_\frac{1}{2}\left(x\right).

Worked Solution
Create a strategy

Since these are inverse functions, the features related to inputs and outputs will be swapped. We can use this understanding and our knowledge of parent exponential and logarithmic functions to compare their key features.

Apply the idea
  • Asymptotes: For f\left(x\right), there is a horizontal asymptote at y=0, and for g\left(x\right), there is a vertical asymptote at x=0.

  • Domain: The domain of f\left(x\right) is all real numbers, while the domain of g\left(x\right) is x > 0.

  • Range: The range of f\left(x\right) is y > 0, and the range of g\left(x\right) is all real numbers.

  • Intercepts: For f\left(x\right), the y-intercept is at (0,1), and there are no x-intercepts. For g\left(x\right), the x-intercept is at (1,0), and there is no y-intercept.

Reflect and check

Notice that both functions are decreasing over their domain. For exponential functions of the form y=b^x and logarithmic functions of the form y=\log_b{x}, the functions will increase when b>1 and decrease when 0<b<1.

Example 3

Consider the function f\left(x\right)=\log_3\left(x\right).

a

Identify the increasing or decreasing intervals.

Worked Solution
Create a strategy

The base of a parent logarithmic function will tell us whether the function is increasing or decreasing over its domain.

  • If b>1, the function increases over the domain \left(0,\infty\right)

  • If 0<b<1, the function decreases over the domain \left(0,\infty\right)

Apply the idea

The base of the logarithm is 3. Since b>1, this tells us it is an increasing function.

The function is increasing for (0, \infty)

Reflect and check

We can use the graph of y=3^x to find the key points and use them to graph f\left(x\right)=\log_3\left(x\right)

Graph of y=3^x

-3
-2
-1
1
2
3
x
1
2
3
4
5
6
7
8
9
y

Graph of f\left(x\right)=\log_3\left(x\right)

1
2
3
4
5
6
7
8
9
x
-3
-2
-1
1
2
3
y

We can confirm from the graph that the function f\left(x\right)=\log_3\left(x\right) is increasing everywhere.

b

Determine the end behavior.

Worked Solution
Create a strategy

To determine the end behavior, we have to look at what is happening with our graph as the x-values decrease and increase. Remember that a graph can never cross a vertical asymptote, so this will impact the values x can approach as they decrease. Instead of approaching negative infinity, x now approaches a single value.

We can use the graph from the reflect and check of part (a) to visualize the end behavior.

Apply the idea
1
2
3
4
5
6
7
8
9
x
-3
-2
-1
1
2
3
y

This function has a vertical asymptote at x=0 that restricts the end behavior on the left side of the graph.

As the x-values decrease, they approach x=0 from the positive (right) side. The notation we use to indicate x is approaching from the positive (right) side is written as x\to 0^{+}.

As the x-values decrease, the y-values decrease infinitely. As x\to0^{+}, f\left(x\right)\to -\infty.

Now let's take a look at the right side of the graph. As the x-values increase, f\left(x\right) increases infinitely. As x\to \infty, f\left(x\right)\to \infty.

c

State the domain and range of f\left(x\right)=\log_3\left(x\right).

Worked Solution
Create a strategy

A function's domain is the set of all possible inputs, and a function's range is the set of all possible outputs.

Apply the idea

Domain: (0, \infty)

Range: (-\infty,\,\infty)

Reflect and check

Remember, the graph never reaches an asymptote, but rather continues approaching it inifinitely. This graph has a vertical asymptote at x=0, which means this graph will never reach x=0. This is why we did not include x=0 in the domain.

d

Evaluate f\left(x\right)=\log_3\left(x\right) when x=81.

Worked Solution
Create a strategy

Begin by substituting x=81 into the function. Then ask yourself: to what exponent must the base be raised to in order to get 81?

Apply the idea

This question is asking us to find the output of the expression \log_3(81).

The base of the logarithm is 3. To what exponent must 3 be raised to get 81? We must raise 3 to the power of 4 to get 81.

Because 3^4=81,\,\log_3(81)=4.

Reflect and check

We can also use technology to check our answer. However, many scientific calculators will only evaluate logarithms with a base of 10, so we must be careful to use one that allows us to specify the base of the logarithm.

Idea summary

We can use the inverse relationship between logarithmic and exponential functions to find key points with which to sketch the graph of a logarithmic function.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

The graph of the parent logarithmic function has the following characteristics:

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • No y-intercept

  • The vertical asymptote is x=0

  • The function is increasing when b>1
  • The function is decreasing when 0<b<1
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
y=\log_b\left(x\right), where b>1
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
y=\log_b\left(x\right), where 0<b<1

Transformations of logarithmic functions

Logarithmic functions can be dilated, reflected, and translated in a similar way to other functions.

Translation

A transformation in which every point in a figure is moved in the same direction and by the same distance

Translations can be categorized as horizontal (moving left or right, along the x-axis) or vertical (moving up or down, along the y-axis), or a combination of the two.

Vertical translations can be represented algebraically by g\left(x\right) = f\left(x\right) + kwhere k \gt 0 translates upwards and k \lt 0 translates downwards.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
5
y
Vertical translation of 4 units upwards: {g\left(x\right) = f\left(x\right) + 3}
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Vertical translation of 4 units downwards: {g\left(x\right)=f\left(x\right)-3}

Similarly, horizontal translations can be represented by g\left(x\right) = f\left(x - h\right) where h > 0 translates to the right and h < 0 translates to the left.

-3
-2
-1
1
2
3
4
5
x
-4
-3
-2
-1
1
2
3
4
y
Horizontal translation of 3 units to the right: {g\left(x\right) = f\left(x - 3\right)}
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Horizontal translation of 3 units left: {g\left(x\right) = f\left(x+3\right)}

Notice that a vertical translation does not affect the vertical asymptote but a horizontal translation does affect the vertical asymptote.

Reflection

A transformation that produces the mirror image of a figure across a line

A reflection across the x-axis can be represented algebraically by g\left(x\right) = -f\left(x\right)A reflection across the y-axis can be represented algebraically by g\left(x\right) = f\left(-x\right)

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Reflection across the x-axis: {g\left(x\right)=-f\left(x\right)}
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Reflection across the y-axis: {g\left(x\right)=f\left(-x\right)}
Vertical compression

A transformation that scales all of the y-values of a function by a constant factor towards the x-axis

Vertical stretch

A transformation that scales all of the y-values of a function by a constant factor away from the x-axis

Compressions and stretches are more generally called dilations.

Vertical dilations can be represented algebraically by g\left(x\right) = af\left(x\right)where 0 \lt \left|a\right| \lt 1 corresponds to a compression and \left|a\right| \gt 1 corresponds to a stretch.

1
2
3
4
5
6
7
8
x
-4
-3
-2
-1
1
2
3
4
y
Vertical compression with scale factor of 0.5: {g\left(x\right) = 0.5f\left(x\right)}
1
2
3
4
5
6
7
8
x
-4
-3
-2
-1
1
2
3
4
y
Vertical stretch with a scale factor of 2: {g\left(x\right) = 2f\left(x\right)}
Horizontal compression

A transformation that scales all of the x-values of a function by a constant factor toward the y-axis

Horizontal stretch

A transformation that scales all of the x-values of a function by a constant factor away from the y-axis

Horizontal dilations can be represented algebraically by g\left(x\right) = f\left(cx\right)where \left|c\right| \gt 1 corresponds to a compression and 0 \lt \left|c\right| \lt 1 corresponds to a stretch.

For horizontal stretches and compressions, c=\dfrac{1}{\text{scale factor}}

1
2
3
4
5
6
7
8
x
-4
-3
-2
-1
1
2
3
4
y
Horizontal compression with a scale factor of \dfrac{1}{2}: {g\left(x\right)=f\left(2x\right)}
1
2
3
4
5
6
7
8
x
-4
-3
-2
-1
1
2
3
4
y
Horizontal stretch with a scale factor of 2: {g\left(x\right)=f\left(\dfrac{1}{2}x\right)}

The logarithmic parent function f\left(x\right)=\log_b\left(x\right) can be transformed to f\left(x\right)=a\log_b\left[c\left(x-h\right)\right]+kwith the correct values of a,\,b,\,h and k to apply transformations to f\left(x\right). When given a transformed function, we must convert it back to standard notation to correctly identify the transformations applied to the parent function.

We can use the relationship between an equation and its transformations to write equations and sketch graphs.

Examples

Example 4

The graph of the parent function is shown as a dashed curve. Write the equation of each transformed function.

a

Parent function: f\left(x\right) = \log_{\frac{1}{3}}x

-8
-6
-4
-2
2
4
6
8
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

To write the equation of the transformed function, identify the transformations applied to the parent function. Look for reflections, translations, stretches, or compressions.

Apply the idea

The transformed graph represents a reflection of the parent function over the y-axis. This can be represented by negating the input variable x.

The transformed function is f\left(x\right) = \log_{\frac{1}{3}}\left(-x\right).

b

Parent function: f\left(x\right) = \log_{4}x

1
2
3
4
5
6
7
8
9
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
Worked Solution
Create a strategy

The shape of the transformed graph appears to be the same as the original graph. This implies that the function has not been dilated.

Apply the idea

The transformed graph shows the parent function was shifted upwards by 2 units. This vertical translation can be represented by adding 2 to the parent function.

The transformed function is f\left(x\right) = \log_{4}\left(x\right) + 2.

Example 5

The graph of f\left(x\right)=\log\left(x\right) is shown.

-12
-10
-8
-6
-4
-2
2
4
6
8
10
x
-4
-3
-2
-1
1
2
3
4
f\left(x\right)
a

Describe how g\left(x\right)=\log(-(x+2))-1 was transformed from f\left(x\right).

Worked Solution
Create a strategy

To describe the transformation, compare g\left(x\right) to the transformation form of a function: g\left(x\right)=a\log\left[c\left(x-h\right)\right]+k

Apply the idea

When comparing g\left(x\right) to transformation form, we can see that a=1,\,c=-1,\,h=-2,\, and k=-1.

  • c=-1 indicates a reflection over the y-axis
  • h=-2 indicates a horizontal shift 2 units to the left
  • k=-1 indicates a vertical shift 1 unit downward

Combining these transformations, g\left(x\right) is the result of reflecting f\left(x\right) across the y-axis, shifting it 2 unit to the left and 1 unit down.

b

Graph g\left(x\right) on the same coordinate plane.

Worked Solution
Create a strategy

Apply the identified transformations to the original graph point by point, reflecting across the y-axis, shifting left 2 units and down 1 unit to graph g\left(x\right).

Apply the idea

We can use the points \left(1,\,0\right) and \left(10,\,1\right) on the graph of f\left(x\right) to graph the transformed function.

-12
-10
-8
-6
-4
-2
2
4
6
8
10
x
-4
-3
-2
-1
1
2
3
4
f\left(x\right)
Reflect and check

We can use technology to confirm that we graphed the function correctly and to verify the transformations identified in part (a).

A screenshot of the GeoGebra graphing tool showing the graphs of f of x equals log base 10 of x and g of x equals log base 10 of left parenthesis negative 1 times left parenthesis x + 2 right parenthesis right parenthesis minus 1. Speak to your teacher for more details.

This graph has the same points as the function we plotted, showing that we graphed the function correctly. We can also see that the function has been reflected across the y-axis and shifted 2 units left and 1 unit down.

c

Identify and compare the asymptotes, zeros, and end behavior of f\left(x\right) and g\left(x\right).

Worked Solution
Create a strategy

To compare these functions, we'll first identify each feature for both functions separately. We will look for the vertical asymptote by finding the value that makes the argument of the logarithm zero, and we can find the zeros and determine the end behavior by examining the graph from part (b).

Apply the idea

For f\left(x\right)=\log\left(x\right), the vertical asymptote is at x=0, since the logarithm is undefined at x=0.

For g\left(x\right)=\log\left(-\left(x+2\right)\right)-1, we know that the vertical asymptote will be shifted left 2 units due to the horizontal translation. This function has a vertical asymptote at x=-2 as this logarithm is undefined at x=-2.

Now, let's use the graph from the previous part to find and compare the zeros of each function:

-12
-10
-8
-6
-4
-2
2
4
6
8
10
x
-4
-3
-2
-1
1
2
3
4
f\left(x\right)

The function f\left(x\right) has a zero at x=1 and the function g\left(x\right) has a zero at x=-12.

Both functions have a zero, but the zero of f\left(x\right) occurs on the positive side of coordinate plane whereas then zero of g\left(x\right)occurs on the negative side of coordinate plane.

When examining the end behavior, we must take the vertical asymptote into consideration. Looking at the graph of f\left(x\right), we see as x approaches positive infinity, the y-valuesapproach positive infinity. As the x-valuesdecrease, the function approaches the vertical asymptote at {x=0} from the positive (right) side, and the y-values approach negative infinity.

  • End behavior as x\to 0^{+}, f\left(x\right)\to -\infty

  • End behavior as x\to \infty, f\left(x\right)\to \infty

Now let's take a look at the end behavior of g\left(x\right). As the x-valuesapproach negative infinity, the y-values approach positive infinity. As the x-values increase, the function approaches the vertical asymptote at x=-2 from the negative (left) side, and the y-values approach negative infinity.

  • End behavior as x\to -\infty, f\left(x\right)\to \infty

  • End behavior as x\to -2^{-}, f\left(x\right)\to -\infty

Upon comparison, the end behavior indicates f\left(x\right) increases everywhere whereas g\left(x\right) decreases everywhere.

Reflect and check

We can determine the zeros of logarithmic functions algebraically by setting the function equal to 0 and solving for x.

To find the zero of f\left(x\right), we let \log\left(x\right)=0. In a logarithmic function, x is the result of raising the base to the power of 0. Any value raised to the 0th power is 1, so x=1.

Similarly, we let g\left(x\right)=0 to find the zero of g\left(x\right). We must first isolate the logarithmic expression to determine the exponent that the base must be raised to.

\displaystyle \log(-(x+2))-1\displaystyle =\displaystyle 0Equate the function to 0
\displaystyle \log(-(x+2))\displaystyle =\displaystyle 1Isolate the logarithmic expression

Now, we know that the base (which in this case is 10) raised to the power of 1 must be equal to the argument of the logarithm.

\displaystyle 10^1\displaystyle =\displaystyle -(x+2)Rewrite the equation
\displaystyle -10\displaystyle =\displaystyle x+2Divide both sides by -1
\displaystyle -12\displaystyle =\displaystyle xSubtract both sides by 2
Idea summary

The logarithmic parent function f\left(x\right)=\log_b\left(x\right) can be transformed to f\left(x\right)=a\log_b\left[c\left(x-h\right)\right]+k

  • If a<0, the basic curve is reflected across the x-axis.

  • The graph is vertically stretched or compressed by a factor of a.

  • If c<0, the basic curve is reflected across the y-axis.

  • The graph is horizontally stretched or compressed by a factor of c.

  • The graph is translated horizontally by h units.

  • The graph is translated vertically by k units.

Outcomes

A2.F.1

The student will investigate, analyze, and compare square root, cube root, rational, exponential, and logarithmic function families, algebraically and graphically, using transformations.

A2.F.1a

Distinguish between the graphs of parent functions for square root, cube root, rational, exponential, and logarithmic function families.

A2.F.1b

Write the equation of a square root, cube root, rational, exponential, and logarithmic function, given a graph, using transformations of the parent function, including f(x) + k; f(kx); f(x + k); and kf(x), where k is limited to rational values. Transformations of exponential and logarithmic functions, given a graph, should be limited to a single transformation.

A2.F.1c

Graph a square root, cube root, rational, exponential, and logarithmic function, given the equation, using transformations of the parent function including f(x) + k; f(kx); f(x + k); and kf(x), where k is limited to rational values. Use technology to verify transformations of the functions.

A2.F.1e

Compare and contrast the graphs, tables, and equations of square root, cube root, rational, exponential, and logarithmic functions.

A2.F.2

The student will investigate and analyze characteristics of square root, cube root, rational, polynomial, exponential, logarithmic, and piecewise-defined functions algebraically and graphically.

A2.F.2a

Determine and identify the domain, range, zeros, and intercepts of a function presented algebraically or graphically, including graphs with discontinuities.

A2.F.2b

Compare and contrast the characteristics of square root, cube root, rational, polynomial, exponential, logarithmic, and piecewise-defined functions.

A2.F.2c

Determine the intervals on which the graph of a function is increasing, decreasing, or constant.

A2.F.2f

For any value, x, in the domain of f, determine f(x) using a graph or equation. Explain the meaning of x and f(x) in context, where applicable.

A2.F.2g

Describe the end behavior of a function.

A2.F.2h

Determine the equations of any vertical and horizontal asymptotes of a function using a graph or equation (rational, exponential, and logarithmic).

A2.F.2j

Graph the inverse of a function as a reflection over the line y = x.

What is Mathspace

About Mathspace