Logarithmic Function and its Inverse - Interactive HTML5 Applet

Use this interactive HTML5 applet to explore the behavior of logarithmic functions and their inverses. Change the parameters \( c \), \( d \), and the base \( B \) of the logarithmic function (purple) to analyze the corresponding geometric transformations on the inverse function (green).

Table of Contents

Function and Its Inverse

Logarithmic Function (purple):

\[ f(x) = \log_B(x + c) + d \]

Inverse Function — Exponential (green):

\[ f^{-1}(x) = B^{\,x - d} - c \]

The two functions are reflections of each other across the red line \( y = x \).

Derivation of the Inverse

To find the inverse of \( f(x) = \log_B(x + c) + d \), follow these steps:

  1. Write the function with \( y \): \[ y = \log_B(x + c) + d \]
  2. Swap \( x \) and \( y \): \[ x = \log_B(y + c) + d \]
  3. Isolate the logarithm: \[ x - d = \log_B(y + c) \]
  4. Rewrite in exponential form: \[ B^{\,x - d} = y + c \]
  5. Solve for \( y \): \[ y = B^{\,x - d} - c \]

Therefore, the inverse function is:

\[ f^{-1}(x) = B^{\,x - d} - c \]

Note: The base \( B \) must satisfy \( B \gt 0 \) and \( B \ne 1 \).

Interactive Applet

Legend:

— Logarithmic function \( f(x) \)

— Inverse function \( f^{-1}(x) \)

— Line \( y = x \)

How to use: Enter values for \( c \), \( d \), and base \( B \) and click Draw. Use the zoom buttons to adjust the viewing window.

Key Observations

Properties Table

Property Logarithmic Function \( f(x) = \log_B(x + c) + d \) Inverse \( f^{-1}(x) = B^{\,x - d} - c \)
Domain \( (-c, +\infty) \) \( (-\infty, +\infty) \)
Range \( (-\infty, +\infty) \) \( (-c, +\infty) \)
Asymptote Vertical: \( x = -c \) Horizontal: \( y = -c \)
\( y \)-intercept \( f(0) = \log_B(c) + d \) (if \( c \gt 0 \)) \( f^{-1}(0) = B^{-d} - c \)
Monotonicity Increasing if \( B \gt 1 \) Increasing if \( B \gt 1 \)
Symmetry Reflections of each other across \( y = x \)

Worked Examples

Example 1: Basic Case (\( B = 2, c = 0, d = 0 \))

Show Solution

Function: \( f(x) = \log_2(x) \)

Inverse: \( f^{-1}(x) = 2^x \)

Verify: \( f(1) = \log_2 1 = 0 \) and \( f^{-1}(0) = 2^0 = 1 \). The point \( (1,0) \) on \( f \) corresponds to \( (0,1) \) on \( f^{-1} \).

Also, \( f(2) = \log_2 2 = 1 \) and \( f^{-1}(1) = 2^1 = 2 \), confirming the reflection across \( y = x \).

Example 2: With Horizontal Shift (\( c = 3, d = 0, B = 2 \))

Show Solution

Function: \( f(x) = \log_2(x + 3) \)

Inverse: \( f^{-1}(x) = 2^x - 3 \)

The vertical asymptote of \( f \) is at \( x = -3 \). The horizontal asymptote of \( f^{-1} \) is at \( y = -3 \).

Check: \( f(-2) = \log_2(1) = 0 \), so \( (-2, 0) \in f \). Then \( f^{-1}(0) = 2^0 - 3 = -2 \), giving \( (0, -2) \in f^{-1} \). ✓

Example 3: With Vertical Shift (\( c = 0, d = 2, B = 10 \))

Show Solution

Function: \( f(x) = \log_{10}(x) + 2 \)

Inverse: \( f^{-1}(x) = 10^{\,x - 2} \)

Check: \( f(1) = \log_{10}(1) + 2 = 2 \), so \( (1, 2) \in f \). Then \( f^{-1}(2) = 10^{0} = 1 \), giving \( (2, 1) \in f^{-1} \). ✓

Example 4: Full Parameters (\( B = 3, c = -1, d = 2 \))

Show Solution

Function: \( f(x) = \log_3(x - 1) + 2 \)

Inverse: \( f^{-1}(x) = 3^{\,x - 2} + 1 \)

Domain of \( f \): \( x \gt 1 \). Range of \( f \): all real numbers.

Check: \( f(4) = \log_3(3) + 2 = 1 + 2 = 3 \). Then \( f^{-1}(3) = 3^{1} + 1 = 4 \). ✓

Vertical asymptote of \( f \): \( x = 1 \). Horizontal asymptote of \( f^{-1} \): \( y = 1 \).

Frequently Asked Questions

What is the inverse of a logarithmic function?

The inverse of \( f(x) = \log_B(x + c) + d \) is \( f^{-1}(x) = B^{\,x - d} - c \). This is an exponential function obtained by swapping the roles of \( x \) and \( y \) and solving for \( y \).

Why is the inverse of a logarithm an exponential function?

Logarithms and exponentials are inverse operations by definition. If \( y = \log_B(x) \), then \( B^y = x \). This reciprocal relationship is why the graph of a logarithmic function is the mirror image of the corresponding exponential function across the line \( y = x \).

How do you find the inverse of \( f(x) = \log_B(x + c) + d \)?

Write \( y = \log_B(x + c) + d \). Swap \( x \) and \( y \): \( x = \log_B(y + c) + d \). Isolate the logarithm: \( x - d = \log_B(y + c) \). Rewrite in exponential form: \( B^{\,x - d} = y + c \). Solve for \( y \): \( y = B^{\,x - d} - c \). So \( f^{-1}(x) = B^{\,x - d} - c \).

How do the graphs of a function and its inverse relate?

The graph of the inverse function is the reflection of the graph of the original function across the line \( y = x \). Every point \( (a, b) \) on the original function corresponds to the point \( (b, a) \) on the inverse function.

What happens to the vertical asymptote of a logarithmic function when you invert it?

The vertical asymptote of the logarithmic function (at \( x = -c \)) becomes a horizontal asymptote of the inverse exponential function (at \( y = -c \)). This is because reflection across \( y = x \) exchanges vertical and horizontal lines.

More Resources