Graphing Logarithmic Functions

{{ 'ml-heading-theory' | message }}

Concept

Logarithmic Function

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

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

The reason logarithmic functions are undefined for x0x\leq 0 can be explained by rewriting the logarithm in exponential form. y=log3(x)3y=x y=\log_3(x)\quad \Leftrightarrow \quad 3^y=x For all real numbers, y,y, the term 3y>0.3^y>0. Consider a few powers of 3.3. 31=3,30=1,3-1=13,3-2=132=19 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 3y3^y becomes smaller, but never equals 00 or becomes negative. Since 3y=x,3^y=x, it follows then that x>0.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=log2(x) y=\log_2(x)

Solution

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

Powers of 2 xx yy
2-2=122=142^{{\color{#009600}{\text{-} 2}}}=\dfrac{1}{2^2}={\color{#0000FF}{\dfrac{1}{4}}} 14{\color{#0000FF}{\dfrac{1}{4}}} -2{\color{#009600}{\text{-} 2}}
2-1=121=122^{{\color{#009600}{\text{-} 1}}}=\dfrac{1}{2^1}={\color{#0000FF}{\dfrac{1}{2}}} 12{\color{#0000FF}{\dfrac{1}{2}}} -1{\color{#009600}{\text{-} 1}}
21=22^{{\color{#009600}{1}}}={\color{#0000FF}{2}} 2{\color{#0000FF}{2}} 1{\color{#009600}{1}}
22=42^{{\color{#009600}{2}}}={\color{#0000FF}{4}} 4{\color{#0000FF}{4}} 2{\color{#009600}{2}}
23=82^{{\color{#009600}{3}}}={\color{#0000FF}{8}} 8{\color{#0000FF}{8}} 3{\color{#009600}{3}}

The xx-yy 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 xx-intercept at (1,0).(1,0).
  • From the left-end of the graph, it appears as though the graph approaches the yy-axis but does not intersect it. This is true because x=0x=0 for all yy-intercepts. We know the domain of a logarithmic function is x>0.x>0. Thus, there is no yy-intercept.
  • As xx approaches +,+\infty, yy continues to increase. Thus, the function increases over its entire domain, x>0.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=log2(x)y=\log_2(x) can be written as follows.

As x0, y-As x+, y+\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=logb(x), C=\log_b(x),

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

Solve the equation graphically. log4(x)=1.5 \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)=log4(x) f(x)=\log_4(x) We can graph ff in a coordinate plane.

The solution to the equation is the xx-value of the point whose yy-coordinate is 1.5.1.5. We'll mark this point on the graph.

From the graph, we can see that x=8.x=8. We can verify this solution by substiuting it into the original equation.
log4(x)=1.5\log_4(x)=1.5
log4(8)=?1.5\log_4({\color{#0000FF}{8}})\stackrel{?}{=}1.5
1.5=1.51.5=1.5
Since x=8x=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)f(x) and g(x)g(x) are inverses of each other if f(g(x))=xandg(f(x))=x. f\left(g(x)\right)=x \quad \text{and} \quad g\left(f(x)\right)=x.

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

Inverse Functions to Logarithmic Functions

Logarithmic functions and exponential functions are inverses of each other. This yields f(x)=logn(x)f-1(x)=xng(x)=xng-1(x)=logn(x).\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.y=x. This can be seen for the function f(x)=log2(x)f(x)=\log_{2}(x) and its inverse g(x)=2xg(x)=2^x.

Exercise

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

Solution

The inverse of a function switches the xx- and yy-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.f. Since f(x)=log4(x), f(x)=\log_4(x), we can think of xx as powers of 44 and f(x)f(x) as exponents for base 4.4.

xx log4(x)\log_4(x) f(x)f(x)
116{\color{#0000FF}{\dfrac{1}{16}}} log4(116)\log_4({\color{#0000FF}{\frac{1}{16}}}) -2\text{-} 2
14{\color{#0000FF}{\dfrac{1}{4}}} log4(14)\log_4({\color{#0000FF}{\frac{1}{4}}}) -1\text{-} 1
1{\color{#0000FF}{1}} log4(1)\log_4({\color{#0000FF}{1}}) 00
2{\color{#0000FF}{2}} log4(2)\log_4({\color{#0000FF}{2}}) 0.50.5
4{\color{#0000FF}{4}} log4(4)\log_4({\color{#0000FF}{4}}) 11
16{\color{#0000FF}{16}} log4(16)\log_4({\color{#0000FF}{16}}) 22

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

xx 4x4^x yy
-2{\color{#0000FF}{\text{-} 2}} 4-24^{{\color{#0000FF}{\text{-} 2}}} 116\dfrac{1}{16}
-1{\color{#0000FF}{\text{-} 1}} 4-14^{{\color{#0000FF}{\text{-} 1}}} 14\dfrac{1}{4}
0{\color{#0000FF}{0}} 404^{\color{#0000FF}{0}} 11
1{\color{#0000FF}{1}} 414^{\color{#0000FF}{1}} 44
2{\color{#0000FF}{2}} 424^{\color{#0000FF}{2}} 1616

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

Show solution Show solution

Exercises

{{ 'mldesktop-placeholder-grade-tab' | message }}
{{ 'mldesktop-placeholder-grade' | message }} {{ article.displayTitle }}!
{{ grade.displayTitle }}
{{ exercise.headTitle }}
{{ 'ml-btn-focusmode-tooltip' | message }} settings_overscan
Test
{{ 'mldesktop-selftest-notests' | message }} {{ article.displayTitle }}!
{{ tests.error }}

{{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

keyboard_backspace
{{ section.title }} keyboard_backspace {{ 'ml-btn-previous' | message }} {{ 'ml-btn-previous-exercise' | message }} {{ 'ml-btn-next-exercise' | message }} keyboard_backspace {{ 'ml-btn-next-exercise' | message }}