# Graphing Logarithmic Functions

Concept

## Logarithmic Function

Logarithmic functions are functions that can be written in the form $f(x) = \log_b(x).$ They have a domain restricted to $x>0,$ and their range is all real numbers. For functions with the base $0 the graph of $f(x) = \log_b(x)$ is decreasing over its entire domain.

If the base, $b,$ is greater than $1,$ the graph is increasing over the entire domain.

The reason logarithmic functions are undefined for $x\leq 0$ can be explained by rewriting the logarithm in exponential form. $y=\log_3(x)\quad \Leftrightarrow \quad 3^y=x$ For all real numbers, $y,$ the term $3^y>0.$ Consider a few powers of $3.$ $3^1=3, \quad 3^0=1, \quad 3^{\text{-} 1}=\dfrac{1}{3}, \quad 3^{\text{-}2}=\dfrac{1}{3^2}=\dfrac{1}{9}$

As the exponent decreases, the value of $3^y$ becomes smaller, but never equals $0$ or becomes negative. Since $3^y=x,$ it follows then that $x>0.$
Exercise

Graph the logarithmic function using a table of values. Then, describe the intercepts, end behavior and increasing/decreasing intervals of the function. $y=\log_2(x)$

Solution

To calculate $y$-values for logarithmic functions by hand, it can be helpful to think about the logarithm as an exponent. $\log_2(x)$ can be thought of as "$2$ to what power equals $x$?" Thus, $x$ is all the powers of $2$ and $y$ is the exponent on base $2.$ We can list known powers of $2$ to determine corresponding values of $x$ and $y.$

Powers of 2 $x$ $y$
$2^{{\color{#009600}{\text{-} 2}}}=\dfrac{1}{2^2}={\color{#0000FF}{\dfrac{1}{4}}}$ ${\color{#0000FF}{\dfrac{1}{4}}}$ ${\color{#009600}{\text{-} 2}}$
$2^{{\color{#009600}{\text{-} 1}}}=\dfrac{1}{2^1}={\color{#0000FF}{\dfrac{1}{2}}}$ ${\color{#0000FF}{\dfrac{1}{2}}}$ ${\color{#009600}{\text{-} 1}}$
$2^{{\color{#009600}{1}}}={\color{#0000FF}{2}}$ ${\color{#0000FF}{2}}$ ${\color{#009600}{1}}$
$2^{{\color{#009600}{2}}}={\color{#0000FF}{4}}$ ${\color{#0000FF}{4}}$ ${\color{#009600}{2}}$
$2^{{\color{#009600}{3}}}={\color{#0000FF}{8}}$ ${\color{#0000FF}{8}}$ ${\color{#009600}{3}}$

The $x$-$y$ points from the table above can be plotted on a coordinate plane. Connecting the points with a smooth curve gives the graph.

Example

### Key Features

Now that the graph is drawn we can describe the intercepts, end behavior and increasing/decreasing intervals of the function.

• First, the graph shows an $x$-intercept at $(1,0).$
• From the left-end of the graph, it appears as though the graph approaches the $y$-axis but does not intersect it. This is true because $x=0$ for all $y$-intercepts. We know the domain of a logarithmic function is $x>0.$ Thus, there is no $y$-intercept.
• As $x$ approaches $+\infty,$ $y$ continues to increase. Thus, the function increases over its entire domain, $x>0.$
• Looking at the graph, we can see that the left-end extends downward and the right-end extends upward. Thus, the end behavior of $y=\log_2(x)$ can be written as follows.

\begin{aligned} \text{As}\ x \rightarrow 0 , && \ y \rightarrow \text{-} \infty \\ \text{As}\ x \rightarrow +\infty , && \ y \rightarrow +\infty \end{aligned} Let us show this in the graph.

Show solution Show solution
Method

## Solving Logarithmic Equations Graphically

A logarithmic equation is an equation which can be written in the form $C=\log_b(x),$

where $C$ is a constant. This type of equation can be solved graphically. This is done by first graphing the function $y=\log_b(x),$ then finding the $x$-coordinate(s) of the point(s) on the graph that has the $y$-coordinate(s) $C.$ All found $x$-coordinates are solutions to the equation.
Exercise

Solve the equation graphically. $\log_4(x)=1.5$

Solution

When equations are solved graphically, the variable terms are isolated on one side of the equation, with the constant term on the other. In the given equation, this is already the case. Therefore, we do not need to rearrange the equation before constructing the function rule. $f(x)=\log_4(x)$ We can graph $f$ in a coordinate plane.

The solution to the equation is the $x$-value of the point whose $y$-coordinate is $1.5.$ We'll mark this point on the graph.

From the graph, we can see that $x=8.$ We can verify this solution by substiuting it into the original equation.
$\log_4(x)=1.5$
$\log_4({\color{#0000FF}{8}})\stackrel{?}{=}1.5$
$1.5=1.5$
Since $x=8$ makes a true statement, it is a solution to the equation.
Show solution Show solution
Concept

## Inverse Functions

Inverse functions are two functions that undo each other. The functions $f(x)$ and $g(x)$ are inverses of each other if $f\left(g(x)\right)=x \quad \text{and} \quad g\left(f(x)\right)=x.$

When a function is denoted $f(x),$ its inverse is often referred to as $f^{\text{-} 1}(x).$
Rule

## Inverse Functions to Logarithmic Functions

Logarithmic functions and exponential functions are inverses of each other. This yields \begin{aligned} f(x)=\log_n(x) \quad &\Leftrightarrow \quad f^{\text{-} 1}(x)=x^n \\ g(x)=x^n \quad &\Leftrightarrow \quad g^{\text{-} 1}(x)=\log_n(x). \end{aligned} When two inverse functions are graphed in the same coordinate plane, their graphs are reflections of each other in the line $y=x.$ This can be seen for the function $f(x)=\log_{2}(x)$ and its inverse $g(x)=2^x$.

Exercise

Show that the logarithmic function and the exponential function are inverses. $f(x)=\log_4(x) \quad \quad \quad g(x)=4^x$

Solution

The inverse of a function switches the $x$- and $y$-values of all the points on the function. Thus, one way to determine if two functions are inverses is two examine their coordinates. We'll begin by creating a table of values for a few points on $f.$ Since $f(x)=\log_4(x),$ we can think of $x$ as powers of $4$ and $f(x)$ as exponents for base $4.$

$x$ $\log_4(x)$ $f(x)$
${\color{#0000FF}{\dfrac{1}{16}}}$ $\log_4({\color{#0000FF}{\frac{1}{16}}})$ $\text{-} 2$
${\color{#0000FF}{\dfrac{1}{4}}}$ $\log_4({\color{#0000FF}{\frac{1}{4}}})$ $\text{-} 1$
${\color{#0000FF}{1}}$ $\log_4({\color{#0000FF}{1}})$ $0$
${\color{#0000FF}{2}}$ $\log_4({\color{#0000FF}{2}})$ $0.5$
${\color{#0000FF}{4}}$ $\log_4({\color{#0000FF}{4}})$ $1$
${\color{#0000FF}{16}}$ $\log_4({\color{#0000FF}{16}})$ $2$

Next, we can create a table for $g$ using the values of $f(x)$ for $x.$

$x$ $4^x$ $y$
${\color{#0000FF}{\text{-} 2}}$ $4^{{\color{#0000FF}{\text{-} 2}}}$ $\dfrac{1}{16}$
${\color{#0000FF}{\text{-} 1}}$ $4^{{\color{#0000FF}{\text{-} 1}}}$ $\dfrac{1}{4}$
${\color{#0000FF}{0}}$ $4^{\color{#0000FF}{0}}$ $1$
${\color{#0000FF}{1}}$ $4^{\color{#0000FF}{1}}$ $4$
${\color{#0000FF}{2}}$ $4^{\color{#0000FF}{2}}$ $16$

It can be seen that the coordinates of the points of $f$ and $g$ are switched. Assuming the behaviors of both functions follow this pattern, we can conclude that $f$ and $g$ are inverses.

Show solution Show solution