Graphing the Logarithmic Function

Concept sheet | Mathematics

To graph a logarithmic function, first identify the vertical asymptote and observe the sign of parameter |b| to locate the curve. Then, using logarithm laws, construct a table of values to plot key points and graph the curve.

Important!

The logarithmic function has a vertical asymptote and its domain is restricted. The curve is located on the left or right side of the asymptote. The side that the curve is on can be determined by analyzing parameter |b.|

  • If parameter |b| is positive, the curve lies on the right side of the asymptote.
  • If parameter |b| is negative, the curve lies on the left side of the asymptote.
How to Graph a Logarithmic Function From a Table of Values

How to Graph a Logarithmic Function From a Table of Values

Moments in the video :

  • 00:00-Recall the role of parameters b and h
  • 01:20-Sketch the asymptote
  • 01:49-Determine the sign of b
  • 02:00-Find points that belong to the curve
  • 04:52-Graph the curve

Graphing the Logarithmic Function in the Form of |f(x)=a\log_c\left(b(x-h)\right)+k|

The logarithmic function in the form |f(x)=a\log_c\big(b(x-h)\big)+k| has a vertical asymptote at |x=h.| Here are the steps to follow to graph it.

Rule
  1. Graph the vertical asymptote at |x=h.|
  2. Determine which side of the asymptote the curve lies on by analyzing parameter |b.|
  3. Calculate the coordinates of a few points belonging to the curve.
  4. Plot the points found in Step 3 on the Cartesian plane and draw the curve.
     
Be careful!

When graphing the logarithmic function, the curve must get closer and closer to the asymptote without ever touching it.

Example

Graph the logarithmic function with the rule |f(x)=-4\log_{3}\left(\dfrac{1}{2}(x+10)\right)+5.|

  1. Graph the vertical asymptote at |\boldsymbol{x=h.}|
    Since |h=-10,| the equation of the asymptote is |x=-10.|
  2. Determine which side of the asymptote the curve lies on by analyzing parameter |\boldsymbol{b.}|
    We determine that |b=\dfrac{1}{2}.| Since |b| is positive, the curve lies to the right of the asymptote.||x>-10||
Since parameter b is positive, the curve of the logarithmic function lies to the right of the asymptote.
avatar
  1. Construct a table of values.
    Since the curve lies to the right of the asymptote, we choose |x|-values that are greater than |-10.|
    Let’s use |x=-8.| ||\begin{align}f(\boldsymbol{\color{#560FA5}x}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}x}+10)\right)+5\\ f(\boldsymbol{\color{#560FA5}{-8}}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}{-8}}+10)\right)+5\\ f(-8) &= -4\log_{3}\left(\frac{1}{2}\times2\right)+5\\ f(-8) &= -4\log_{3}(1)+5\end{align}||The logarithm of 1 is |0.| ||\begin{align}f(-8) &= -4(0)+5\\&= 5\end{align}||So, a point on the curve is |(-8,5).| Next, we repeat and find other coordinates with different |x|-values.
    Let’s use |x=-4.| ||\begin{align}f(\boldsymbol{\color{#560FA5}x}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}x}+10)\right)+5\\ f(\boldsymbol{\color{#560FA5}{-4}}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}{-4}}+10)\right)+5\\ f(-4) &= -4\log_{3}\left(\frac{1}{2}\times6\right)+5\\ f(-4) &= -4\log_{3}(3)+5\\ f(-4) &= -4(1)+5\\ f(-4) &= -4+5\\ f(-4) &= 1\end{align}||So, another point on the curve is |(-4,1).| 
    Let’s calculate the |y|-intercept by taking |x=0.| ||\begin{align}f(\boldsymbol{\color{#560FA5}x}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}x}+10)\right)+5\\ f(\boldsymbol{\color{#560FA5}0}) &= -4\log_{3}\left(\dfrac{1}{2}(\boldsymbol{\color{#560FA5}0}+10)\right)+5\\ f(0) &= -4\log_{3}\left(\frac{1}{2}\times10\right)+5\\ f(0) &= -4\log_{3}(5)+5\end{align}||Applying the change of base law for logarithms, we get the following:
    ||\begin{align}f(0) &= -4\left(\dfrac{\log(5)}{\log(3)}\right)+5\\ &\approx -4(1.46)+5\\&\approx -5.86+5\\&\approx -0.86\end{align}||So, the |y|-intercept is |-0.86.|
    Continuing in the same way, we get the following table of values:
|\boldsymbol{x}||-8||-4||0||8||44|
|\boldsymbol{y}||5||1||-0.86||-3||-7|
avatar
  1. Plot the points found in Step 3 on the Cartesian plane and draw the curve.
The graph of a logarithmic function on the Cartesian plane.
avatar
Tip

To make logarithm calculations easier and find integer coordinates, we select |x|-values so the argument of the logarithm is a power of the base.

In the previous example, the rule was |f(x)=-4\log_{3}\left(\dfrac{1}{2}(x+10)\right)+5.| The base is |\boldsymbol{\color{#FF55C3}3}| and the argument is |\boldsymbol{\color{#333FB1}{\dfrac{1}{2}(x+10)}}.|

We determine the powers of |\boldsymbol{\color{#FF55C3}3}.| ||\begin{align}&\boldsymbol{\color{#FF55C3}3^\color{#3A9A38}0}&&\boldsymbol{\color{#FF55C3}3^\color{#3A9A38}1}&&\boldsymbol{\color{#FF55C3}3^\color{#3A9A38}2}&&\boldsymbol{\color{#FF55C3}3^\color{#3A9A38}3}&&\boldsymbol{\color{#FF55C3}3^\color{#3A9A38}4}\\&\boldsymbol{\color{#333FB1}1}&&\boldsymbol{\color{#333FB1}3}&&\boldsymbol{\color{#333FB1}9}&&\boldsymbol{\color{#333FB1}{27}}&&\boldsymbol{\color{#333FB1}{81}}\end{align}||Then, we find the |x|-values that have these powers in the argument.

||\begin{align}\boldsymbol{\color{#333FB1}{\dfrac{1}{2}(x+10)}} &= \boldsymbol{\color{#333FB1}1}\\ x+10 &= 2\\ x &= -8\end{align}||When |x=-8,| the argument is |\boldsymbol{\color{#333FB1}1}.| ||\log_{\boldsymbol{\color{#FF55C3}3}}(\boldsymbol{\color{#333FB1}1})=\boldsymbol{\color{#3A9A38}0}||||\begin{align}\boldsymbol{\color{#333FB1}{\dfrac{1}{2}(x+10)}} &= \boldsymbol{\color{#333FB1}3}\\ x+10 &= 6\\ x &= -4\end{align}||When |x=-4,| the argument is |\boldsymbol{\color{#333FB1}3}.| ||\log_{\boldsymbol{\color{#FF55C3}3}}(\boldsymbol{\color{#333FB1}3})=\boldsymbol{\color{#3A9A38}1}||||\begin{align}\boldsymbol{\color{#333FB1}{\dfrac{1}{2}(x+10)}} &= \boldsymbol{\color{#333FB1}9}\\ x+10 &= 18\\ x &= 8\end{align}||When |x=8,| the argument is |\boldsymbol{\color{#333FB1}9}.| ||\log_{\boldsymbol{\color{#FF55C3}3}}(\boldsymbol{\color{#333FB1}9})=\boldsymbol{\color{#3A9A38}2}||
avatar

So, by choosing |x=-8,| |x=-4,| and |x=8,| there is no need to use the change of base law for logarithms to do the calculations. Also, we get coordinates that are integers.

Questions other students have asked about this topic

See all questions in the Help Zone