6.3: The Inverse of a Logarithmic Function

  • Graph the inverse function of a logarithmic function
  • Find the equation of the inverse function of a logarithmic function
  • Use compositions of function to show equivalency: f(f1(x))=f1(f(x))=xf(f1(x))=f1(f(x))=x

Graphing the Inverse Function

One way to graph the inverse of a logarithmic function is by creating and using its inverse table. For example, to graph the inverse function of f(x)=log2xf(x)=log2x, we start by creating a table of values for the function (Table 1).

xx y=log2xy=log2x
1818 33
1414 22
1212 11
11 00
22 11
44 22
88 33
Table 1. Table of values for f(x)=log2xf(x)=log2x

To create an inverse table, we switch the values in the xx and yy columns so that the inputs become the values of yy and the outputs become the values of xx. The table after switching the values of the xx and yy columns is the inverse table (Table 2). Since f(x)=log2xf(x)=log2x is a one-to-one function, its inverse will also be a one-to-one function.

xx y=f1(x)y=f1(x)
33 1818
22 1414
11 1212
00 11
11 22
22 44
33 88
Table 2. Inverse table

Looking at the values in table 2, notice that as xx increases by 1, the inverse function value increases by a multiple of 2. This means that the inverse of a logarithmic function is an exponential function. In this case, the inverse of f(x)=log2xf(x)=log2x is f1(x)=2xf1(x)=2x.

Figure 1 shows the graphs of the function f(x)=log2xf(x)=log2x (the blue curve) and its inverse (the green curve) graphed usings the values in Tables 1 and 2.  Notice that the graph of the inverse function is a reflection of the graph of the original function with respect to the line y=xy=x (the red line).

Figure 1. The graphs of the function f(x)=log2xf(x)=log2x and its inverse function.

Notice that the inverse is also a function because it passes the vertical line test. The inverse is a one-to-one mapping. Therefore, the inverse is a function.

Example 1

Use Desmos to graph f(x)=2log2(x3)+1f(x)=2log2(x3)+1, then use reflection to graph its inverse function.

Solution

Copying and pasting the function into Desmos yields:

Graph of a log function

Now we draw in the line y=xy=x and reflect every point on the graph of y=f(x)y=f(x) across the line y=xy=x to get the inverse. Every point (x,y)(x,y) is reflected to (y,x)(y,x). The vertical asymptote x=3x=3 reflects to a horizontal asymptote y=3y=3.

log graph and its inverse

Try It 1

Use Desmos to graph f(x)=log2(x+4)+3f(x)=log2(x+4)+3, then use reflection to graph its inverse function.

The Inverse Function Equation

We already know that to find the equation of an inverse function for a given function, we set y=f(x)y=f(x), switch xx and yy, then solve for yy. For example, given the logarithmic function f(x)=log2xf(x)=log2x, we first set y=f(x)y=f(x):

y=log2xy=log2x

Then we switch xx and yy to get the inverse:

x=log2yx=log2y

Now we solve for yy by writing this logarithmic equation as an equivalent exponential equation. Based on the definition of logarithm, the base of the logarithm, 2, becomes the base of the exponential:

y=2xy=2x

Therefore, the inverse function of the logarithmic function f(x)=log2xf(x)=log2x is:

f1(x)=2x

Example 2

Determine the inverse function of g(x)=log5x.

Solution

First set y=g(x):  y=log5x

Switch x and y to get the inverse:  x=log5y

Use the definition of logarithm to solve for yy=5x

Write in function notation:  g1(x)=5x

Try It 2

Determine the inverse function of h(x)=log7x.

Example 3

Determine the inverse function of the logarithmic function f(x)=log4(x+5).

Solution

First set y=f(x):  y=log4(x+5)

Switch x and y to get the inverse:  x=log4(y+5)

Use the definition of logarithm to solve for yy+5=4x

Solve for y by subtracting 5 from both sides:  y=4x5

Write in function notation: f1(x)=4x5

Try It 3

Determine the inverse function of the logarithmic function g(x)=log3(x6).

For a logarithmic function that is in the form f(x)=alogbxh+k, we must first isolate the logarithm, before using the definition of a logarithm to solve for y.

Example 4

Determine the inverse function of the logarithmic function f(x)=4log3(x+2).

Solution

First set y=f(x):y=4log3(x+2)

Switch x and y to get the inverse:  x=4log3(y+2)

Isolate the logarithm by dividing both sides by 4: 14x=log3(y+2)

Use the definition of logarithm to solve for yy+2=3x4

Solve for y by subtracting 2 from both sides: y=3x42

Write in function notation:  f1(x)=3x42

Try It 4

Determine the inverse function of the logarithmic function f(x)=5log7(x3).

Example 5

Determine the inverse function of the logarithmic function f(x)=log5(x3)+2.

Solution

First set y=f(x)y=log5(x3)+2

Switch x and y to get the inverse: x=log5(y3)+2

Isolate the logarithm by subtracting 2 from both sides:  x2=log5(y3)

Use the definition of logarithm to solve for yy3=5x2

Solve for y by adding 3 to both sides:  y=5x2+3

Write in function notation: f1(x)=5x2+3

Example 6

Determine the inverse function of the logarithmic function f(x)=25log3(8x)4.

Solution

First set y=f(x)y=25log3(8x)4

Switch x and y to get the inverse:  x=25log3(8y)4

Isolate the logarithm by adding 4 to both sides: x+4=25log3(8y)

Isolate the logarithm by multiplying both sides by 52:  52(x+4)=log3(8y)

Use the definition of logarithm to solve for y8y=352(x+4)

Solve for y by dividing both sides by 8: y=18352(x+4)

Write in function notation: f1(x)=18352(x+4)

Try It 5

Determine the inverse function of the logarithmic function:

  1. f(x)=log2(x9)+1
  2. g(x)=34log5x2
  3. h(x)=13log2(x+5)+8
  4. F(x)=6log10(x3)+6

Composition of Inverse Functions

It is important to remember that an inverse function ‘undoes’ what was ‘done’ by the original function. Logarithmic functions and inverse functions are inverses of one another, so if we apply one function then apply its inverse, we should get back to where we started.

Consider the function f(x)=log4x and its inverse function f1(x)=4x. Now let’s perform a composition of functions:

(ff1)(x)=f(f1(x))=f(4x)=log44x

To simplify log44x, let’s set a=log44x. Then using the definition of logarithms, we can write an equivalent exponential equation:

4a=4x

Since the bases are identical, the exponents must be equal:

a=x

Consequently, log44x=x and, therefore, (ff1)(x)=x.

If we perform the composition in the opposite direction we get:

(f1f)(x)=f1(f(x))=f1(log4x)=4log4x

To simplify 4log4x, let’s set a=4log4x. Then using the definition of logarithms, we can write an equivalent exponential equation:

log4a=log4x

Since logarithms are one-to-one functions, a=x.

Consequently, 4log4x=x and, therefore, (f1f)(x)=x.

Example 7

Use composition of functions to show that f(x)=log2(x+1) and g(x)=2x1 are inverse functions.

Solution

It doesn’t matter the order in which we compose the functions.

(fg)(x)=f(2x1)=log2(2x1+1)=log22x

To simplify log22x, let a=log22x, then using the definition of logarithms:

2a=2xa=x

Consequently, (fg)(x)=x

(gf)(x)=g(log2(x+1))=2log2(x+1)1

To simplify 2log2(x+1), let a=2log2(x+1), then using the definition of logarithms:

log2a=log2(x+1)

a=x+1

Hence,

(gf)(x)=g(log2(x+1))=2log2(x+1)1=(x+1)1=x

Consequently, (gf)(x)=x

 

Therefore, f(x)=log2(x+1) and g(x)=2x1 are inverse functions.

Try It 6

Use composition of functions to show that f(x)=log3(x+4) and g(x)=3x4 are inverse functions.