topic badge

6.04 Logarithmic functions

Lesson

Describing the log function

The logarithmic function is described by the equation $y=\log_b\left(x\right)$y=logb(x) where $x$x is restricted to the domain of positive real numbers and the base $b$b is any positive real number not equal to $1$1.

Exploration

Because $x^0=1$x0=1 where $x$x is any real number, can be rewritten as $\log_x1=0$logx1=0 . Meaning, any logarithm of $1$1 is $0$0, irrespective of the base used, then the curve of all log functions of the form $y=\log_b\left(x\right)$y=logb(x) intersects the $x$x axis at $(1,0)$(1,0).  

The following graph shows $y=\log_2\left(x\right)$y=log2(x)  and $y=\log_{\frac{1}{2}}\left(x\right)$y=log12(x) illustrating the distinctive shape of the log curve.

The red curve is the curve of the function $f(x)=\log_2\left(x\right)$f(x)=log2(x), and the blue curve is the curve of the function $g(x)=\log_4\left(x\right)$g(x)=log4(x). Notice, the difference between the ordered pairs. the $x$x values are the same for the two functions; however, the $y$y values are opposite. Why? Take a look at the bases: $f(x)$f(x) :$base=2$base=2 and $g(x)$g(x)$base=\frac{1}{2}$base=12$=$=$2^{-1}$21

The two points shown on each curve shown help explain the way the slope of the curve changes as $b$b increases in value. 

At $x=16$x=16 we have $f(16)=\log_2\left(16\right)=4$f(16)=log2(16)=4 because $2^4=16$24=16. We also have $g(16)=\log_4\left(16\right)=2$g(16)=log4(16)=2 again because $4^2=16$42=16. Using the same reasoning, at $x=\frac{1}{16}$x=116 we have $f(\frac{1}{16})=-4$f(116)=4 and $g(\frac{1}{16})=-2$g(116)=2

More generally we can understand the shape of any log curve by reminding ourselves that if the $x$x values grow geometrically in powers (for example $2^0,2^1,2^2,2^3,2^4,2^5...$20,21,22,23,24,25...), then the corresponding $y$y values (the logarithms of $x$x) grow arithmetically (for example $0,1,2,3,4,5...$0,1,2,3,4,5...).

Did you know?

Can we take the logarithm of a negative number?

No. Because the base of an exponential function is always positive, no power of that base can ever be negative. We can never take the logarithm of a negative number. Also, we cannot take the logarithm of zero. Calculators may output a log of a negative number when in complex mode, but the log of a negative number is not a real number.

Also, since the logarithmic and exponential functions switch the  $x$x and  $y$yvalues, the domain and range of the exponential function are interchanged for the logarithmic function. Therefore, the domain of the logarithm function with base $b>0$b>0 is $(0,\infty)$(0,) and the range is $(−\infty,\infty)$(,).

 

Asymptotes for logarithmic functions

For values of $b$b the function $y=\log_b\left(x\right)$y=logb(x) has a vertical asymptote at $x=0$x=0. This means that there is no $y$y intercept - as $x$x approaches $0$0, the function approaches the $y$y axis but never arrives there.

The curves of logarithmic functions have no horizontal asymptote. If the graph is increasing, then the graph will continue to grow, but it will grow at an ever slowing pace. If the graph is decreasing, then the graph will continue to decrease, but it will decrease at an ever slowing pace. How do we show this algebraically? For $b>1$b>1 as $x\rightarrow\infty$x,  $y\rightarrow\infty$y and for $00<b<1 as $x\rightarrow\infty$x,  $y\rightarrow-\infty$y.

Any table of values normally show the $x$x values increasing exponentially as numbers of the form $b^k$bk. For example, to draw $y=\log_{10}\left(x\right)$y=log10(x) you might construct a table of values with the $x$x values as $10^{-3},10^{-2},10^{-1},10^0,10^1,10^2,10^3$103,102,101,100,101,102,103 and the corresponding $y$y values as $-3,-2,-1,0,1,2,3$3,2,1,0,1,2,3.  

 

Exploration

The following log graph applet allows you to experiment with different bases. You should note that as the base increases beyond $1$1 the rate of increase in the size of the logarithm decreases.

As you move the base back again closer and closer to $1$1 from above, the rate increases so that the curve becomes more and more vertical. You should be able to see why the function cannot exist for bases equal to $1$1

For positive bases less than $1$1, try moving $b$b across the full range of values. What do you notice?

 

Worked example

Question 1

Consider the function $y=\log_3x$y=log3x. Complete the table of values:

$x$x $\frac{1}{243}$1243 $\frac{1}{3}$13 $1$1 $3$3 $9$9 $81$81
$y$y            

Think: Substitute each value of $x$x into the equation, then solve for the $y$y value.

Do: 

$x$x $\frac{1}{243}$1243 $\frac{1}{3}$13 $1$1 $3$3 $9$9 $81$81
$y$y $y=\log_3\frac{1}{243}$y=log31243 $y=\log_3\frac{1}{3}$y=log313 $y=\log_31$y=log31 $y=\log_33$y=log33 $y=\log_39$y=log39 $y=\log_381$y=log381

Solve each 

$x$x $\frac{1}{243}$1243 $\frac{1}{3}$13 $1$1 $3$3 $9$9 $81$81
$y$y $3^y=\frac{1}{243}$3y=1243 $3^y=\frac{1}{3}$3y=13 $3^y=1$3y=1 $3^y=3$3y=3 $3^y=9$3y=9 $3^y=81$3y=81

 

$x$x $\frac{1}{243}$1243 $\frac{1}{3}$13 $1$1 $3$3 $9$9 $81$81
$y$y $3^y=3^{-5}$3y=35 $3^y=3^{-1}$3y=31 $3^y=3^0$3y=30 $3^y=3^1$3y=31 $3^y=3^2$3y=32 $3^y=3^4$3y=34

 

$x$x $\frac{1}{243}$1243 $\frac{1}{3}$13 $1$1 $3$3 $9$9 $81$81
$y$y $-5$5 $-1$1 $0$0 $1$1 $2$2 $4$4

Reflect: What is the end behavior of the function? Based on the above table, as the values of $x$x increase so does the $y$y  values. Therefore the function is increasing. What happens as the function the $x$x values approach $0$0? As we can see from the table, the $x$x value quickly approaches $0$0 but based on definition it will never equal zero. Therefore, the function will continue for negative infinity ($-\infty$ ) as it approaches but never touches zero.

 

Practice questions

Question 2

Consider the function $y=\log_4x$y=log4x, the graph of which has been sketched below.

Loading Graph...

  1. Complete the following table of values.

    $x$x $\frac{1}{16}$116 $\frac{1}{4}$14 $4$4 $16$16 $256$256
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Determine the $x$x-value of the $x$x-intercept of $y=\log_4x$y=log4x.

  3. How many $y$y-intercepts does $\log_4x$log4x have?

  4. Determine the $x$x value for which $\log_4x=1$log4x=1.

Question 3

We are going to sketch the graph of $y=\log_2x$y=log2x.

  1. Complete the table of values for $y=\log_2x$y=log2x.

    $x$x $\frac{1}{2}$12 $1$1 $2$2 $4$4 $16$16
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Plot the first four points found in part (a) on the graph.

    Loading Graph...

    The first point, $\left(\frac{1}{2},-1\right)$(12,1), has been plotted for you.

  3. Now plot the function $y=\log_2x$y=log2x by moving the asymptote and the two other points to appropriate positions.

    Loading Graph...

Question 4

Consider the function $y=\log_4x$y=log4x.

  1. Complete the table of values.

    $x$x $\frac{1}{1024}$11024 $\frac{1}{4}$14 $1$1 $4$4 $16$16 $256$256
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Consider the behavior of $\log_4x$log4x as $x$x changes.

    Which of the following statements is correct?

    $y=\log_4x$y=log4x is a decreasing function.

    A

    $y=\log_4x$y=log4x is an increasing function.

    B

    $y=\log_4x$y=log4x increases in some intervals of $x$x, and decreases in others.

    C
  3. What value does $\log_4x$log4x approach as $x$x approaches $0$0?

    $-4$4

    A

    0

    B

    $-\infty$

    C
  4. What happens when $x=0$x=0?

    $y=-\infty$y=

    A

    $y=-4$y=4

    B

    $y$y is undefined

    C

 

Natural logarithmic functions 

There is one particular logarithm base that has become very important  in mathematics. Logarithms derived using this special base are known as natural logarithms. The base is the irrational number given by $e=2.7182818...$e=2.7182818... . The logarithms are called natural because $e$e, Euler's number, is a number that arises in nature frequently and unavoidably. The base turns out to have far reaching ramifications in the study of such areas as the calculus, the mathematics of finance, sequences and series, and many other areas. In fact, the number $e$e is quite possibly the second most important constant in mathematics today. 

The function $y=\log_ex$y=logex is often written $y=\ln x$y=lnx, where the "ln" part is short for natural logarithm. The graph of this  particular function has the remarkable property that the slope of any tangent drawn to it has a value equal to the reciprocal of the $x$x - value of the tangent's point of contact, as depicted in this diagram. 

Worked examples

question 5

Rewrite $y=\ln x$y=lnx as an exponential function.

Think: The natural logarithm works the same way as the logarithm.

Do:  Rewrite using $base=e$base=e , the exponent is the result of the natural logarithm $y$y, and making the result of the exponential function $x$x

$e^y=x$ey=x

question 6

Rewrite $\log_e3x=y$loge3x=y in exponential form.

Think: The logarithm has a base of $e$e; however the process does not change. 

Do: Rewrite using $base=e$base=e , the exponent is the result of the logarithm $y$y, and making the result of the exponential function $3x$3x

$e^y=3x$ey=3x

Reflect: Is there a difference between $\log_ex$logex and $\ln x$lnx? Based on the above example, there is no difference. 

question 7

Write the inverse function of $y=2e^{3x}-1$y=2e3x1.

Think: When asked to write the inverse function, the first step is to switch the $x$x and $y$y then solve for $y$y.

Do: 

$y$y $=$= $2e^{3x}-1$2e3x1

(Given)

$x$x $=$= $2e^{3y}-1$2e3y1

(Switch $x$x and $y$y)

$x+1$x+1 $=$= $2e^{3y}$2e3y

(Add $1$1 to each side) 

$\frac{x+1}{2}$x+12 $=$= $e^{3y}$e3y

(Divide $2$2 to each side)

$\frac{\ln(x+1)}{2}$ln(x+1)2 $=$= $3y$3y

(Rewrite the exponential function)

$\frac{1}{3}\ln\frac{x+1}{2}$13lnx+12 $=$= $y$y

(Divide $3$3 to each side)

The inverse is of $y=2e^{3x}-1$y=2e3x1:

$y=\frac{1}{3}\ln\frac{x+1}{2}$y=13lnx+12

Practice questions

question 8

Which of the following logarithmic functions is known as the natural log?

  1. The logarithmic function with base $\pi$π.

    A

    The logarithmic function with base $1$1.

    B

    The logarithmic function with base $\frac{1}{e}$1e.

    C

    The logarithmic function with base $e$e.

    D

    The logarithmic function with base $10$10.

    E

question 9

Consider the function $f\left(x\right)=e^x-3$f(x)=ex3 for all $x\in\mathbb{R}$x.

  1. Find the inverse function $y$y in terms of $x$x.

  2. State the domain of the inverse. Express the domain as an inequality.

  3. State the range of the inverse. Express the range using interval notation.

question 10

Consider the function $f\left(x\right)=\log_e5x$f(x)=loge5x for all $x>0$x>0.

  1. By replacing $f\left(x\right)$f(x) with $y$y, find the inverse function.

    Leave your answer in terms of $x$x and $y$y.

  2. State the domain of the inverse function using interval notation.

  3. State the range of the inverse function using interval notation.

 

Translations of logarithmic graphs

Vertical

We have previously looked at transformations of functions. These transformations include scaling, translating, and reflecting, all of them in either the horizontal or vertical direction. These transformations can all be applied to logarithmic functions in the same way.

In particular, recall that adding a constant to the function corresponds to translating the graph vertically. So the graph of $g\left(x\right)=\log_bx+k$g(x)=logbx+k is a vertical translation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx. The translation is upwards if $k$k is positive, and downwards if $k$k is negative.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=\log_bx+k$g(x)=logbx+k, for $k<0$k<0.

Notice that the asymptote is not changed by a vertical translation, and is still the line $x=0$x=0. The $x$x-intercept has changed however, and now occurs at a point further along the $x$x-axis. The original $x$x-intercept (which was at $\left(1,0\right)$(1,0)) has now been translated vertically to $\left(1,k\right)$(1,k) and is no longer on the $x$x-axis.

Worked examples

question 12

The graphs of the function $f\left(x\right)=\log_3\left(-x\right)$f(x)=log3(x) and another function $g\left(x\right)$g(x) are shown below.

 

  • Describe the transformation used to get from $f\left(x\right)$f(x) to $g\left(x\right)$g(x).

Think: $g\left(x\right)$g(x) has the same general shape as $f\left(x\right)$f(x), just translated upwards. We can figure out how far it has been translated by looking at the distance between corresponding points.

Do: The point on $g\left(x\right)$g(x) that is directly above the $x$x-intercepts of $f\left(x\right)$f(x) is at $\left(-1,5\right)$(1,5), which is $5$5 units higher. In fact, we can see the constant distance of $5$5 units all the way along the function:

So $f\left(x\right)$f(x) has been translated $5$5 units upwards to give $g\left(x\right)$g(x).

 

  • Determine the equation of the function $g\left(x\right)$g(x).

Think: We know that $f\left(x\right)$f(x) has been vertically translated $5$5 units upwards to give $g\left(x\right)$g(x). That is, the function has been increased by $5$5.

Do: This means that $g\left(x\right)=\log_3\left(-x\right)+5$g(x)=log3(x)+5. This function has an asymptote at $x=0$x=0, and the negative coefficient of $x$x means that it takes values to the left of the asymptote, just like $f\left(x\right)$f(x).

 

Functions of the form $y=\log_b\left(\pm x\right)+k$y=logb(±x)+k

A function of the form $y=\log_bx+k$y=logbx+k represents a vertical translation by $k$k units of the function $y=\log_bx$y=logbx.

Similarly, a function of the form $y=\log_b\left(-x\right)+k$y=logb(x)+k represents a vertical translation by $k$k units of the function $y=\log_b\left(-x\right)$y=logb(x).

In both cases:

  • The translation is upwards if $k$k is positive, and downwards if $k$k is negative.
  • The asymptote of the translated function remains at $x=0$x=0.

Practice questions

Question 13

A graph of the function $y=\log_2x$y=log2x is shown below.

A graph of the function $y=\log_2x+2$y=log2x+2 can be obtained from the original graph by transforming it in some way.

Loading Graph...

  1. Complete the table of values below for $y=\log_2x$y=log2x:

     

    $x$x $\frac{1}{2}$12 $1$1 $2$2 $4$4
    $\log_2x$log2x $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$

     

  2. Now complete the table of values below for $y=\log_2x+2$y=log2x+2:

     

    $x$x $\frac{1}{2}$12 $1$1 $2$2 $4$4
    $\log_2x+2$log2x+2 $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$

     

  3. Which of the following is a graph of $y=\log_2x+2$y=log2x+2?

    Loading Graph...

    A

    Loading Graph...

    B

    Loading Graph...

    C

    Loading Graph...

    D
  4. Which features of the graph are unchanged after it has been translated $2$2 units upwards?

    Select all that apply.

    The vertical asymptote.

    A

    The general shape of the graph.

    B

    The $x$x-intercept.

    C

    The range.

    D

Question 13

Which of the following options shows the graph of $y=\log_3x$y=log3x after it has been translated $2$2 units up?

  1. Loading Graph...

    A

    Loading Graph...

    B

    Loading Graph...

    C

    Loading Graph...

    D

Question 14

The function $y=\log_5x$y=log5x is translated downwards by $2$2 units.

  1. State the equation of the function after it has been translated.

  2. The graph of $y=\log_5x$y=log5x is shown below. Draw the translated graph on the same plane.

     

    Loading Graph...

 

Dilation and reflection

Recall that multiplying a function by a constant corresponds to vertically rescaling the function. The graph of $g\left(x\right)=a\log_bx$g(x)=alogbx is a vertical dilation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx if $\left|a\right|$|a| is greater than $1$1, and a vertical compression if $\left|a\right|$|a| is between $0$0 and $1$1.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=a\log_bx$g(x)=alogbx, for $00<a<1.

Additionally, if the coefficient $a$a is negative there is also a reflection across the $x$x-axis.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=a\log_bx$g(x)=alogbx, for $a<-1$a<1.

Notice that the asymptote is not changed by this type of transformation, and is still the line $x=0$x=0. The $x$x-intercept also remains unchanged, since multiplying a $y$y-coordinate of $0$0 by any constant $a$a results in $0$0.

Every other point on the graph, however, moves further away from the $x$x-axis (if $\left|a\right|>1$|a|>1) or closer to the $x$x-axis (if $0<\left|a\right|<1$0<|a|<1).

 

Worked examples

question 15

The graphs of the function $f\left(x\right)=\log_4\left(-x\right)$f(x)=log4(x) and another function $g\left(x\right)$g(x) are shown below.

 

Determine the equation of the function $g\left(x\right)$g(x).

Think: $g\left(x\right)$g(x) is upside down relative to $f\left(x\right)$f(x), and is stretched so that its corresponding points are further away from the $x$x-axis. So there has been a vertical dilation and a reflection about the $x$x-axis. This means that $g\left(x\right)$g(x) will be of the form $g\left(x\right)=a\log_4\left(-x\right)$g(x)=alog4(x) where $a<-1$a<1.

Do: To determine the particular dilation, let's look at the point $\left(-4,1\right)$(4,1) on the graph of $f\left(x\right)$f(x). The corresponding point on the graph of $g\left(x\right)$g(x) is $\left(-4,-3\right)$(4,3).

To get from a $y$y-value of $1$1 to a $y$y-value of $-3$3, we have multiplied by $-3$3. So the value of $a$a must be $-3$3, and therefore the function is $g\left(x\right)=-3\log_4\left(-x\right)$g(x)=3log4(x).

 

Functions of the form $y=a\log_b\left(\pm x\right)$y=alogb(±x)

A function of the form $y=a\log_bx$y=alogbx represents a vertical rescaling of the function $y=\log_bx$y=logbx.

Similarly, a function of the form $y=a\log_b\left(-x\right)$y=alogb(x) represents a vertical rescaling of the function $y=\log_b\left(-x\right)$y=logb(x).

In both cases:

  • $\left|a\right|>1$|a|>1 corresponds to a vertical dilation.
  • $0<\left|a\right|<1$0<|a|<1 corresponds to a vertical compression.
  • If the sign of $a$a is negative, then there is also a reflection across the $x$x-axis.

Practice questions

Question 16

Consider the functions $f\left(x\right)=3\log_5x$f(x)=3log5x and $g\left(x\right)=\log_5x$g(x)=log5x.

  1. Evaluate $g\left(5\right)$g(5).

  2. Evaluate $f\left(5\right)$f(5).

  3. How does the graph of $f\left(x\right)$f(x) differ from the graph of $g\left(x\right)$g(x)?

    The graph of $f\left(x\right)$f(x) is a reflection of the graph of $g\left(x\right)$g(x) about the $y$y-axis.

    A

    The graph of $f\left(x\right)$f(x) is a vertical compression of the graph of $g\left(x\right)$g(x).

    B

    The graph of $f\left(x\right)$f(x) is a horizontal translation of the graph of $g\left(x\right)$g(x).

    C

    The graph of $f\left(x\right)$f(x) is a vertical dilation of the graph of $g\left(x\right)$g(x).

    D

Question 17

The graph of $y=\log_7x$y=log7x is shown below.

Loading Graph...

  1. What transformation of the graph of $y=\log_7x$y=log7x is needed to get the graph of $y=-3\log_7x$y=3log7x?

    Reflection across the $x$x-axis only.

    A

    Vertical compression by a factor of $3$3 and reflection across the $x$x-axis.

    B

    Vertical dilation by a factor of $3$3 and reflection across the $x$x-axis.

    C

    Vertical dilation by a factor of $3$3 only.

    D

    Vertical compression by a factor of $3$3 only.

    E
  2. Now draw the graph of $y=-3\log_7x$y=3log7x on the same plane as $y=\log_7x$y=log7x:

     

    Loading Graph...

 

Horizontal 

Recall that subtracting a constant from the $x$x-value inside a function corresponds to translating the graph horizontally. So the graph of $g\left(x\right)=\log_b\left(x-h\right)$g(x)=logb(xh) is a horizontal translation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx. The translation is to the right if $h$h is positive, and to the left if $h$h is negative.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=\log_b\left(x-h\right)$g(x)=logb(xh), for $h>0$h>0.

Notice that the asymptote of the translated function is the line $x=h$x=h, which is $h$h units across from the original asymptote of $x=0$x=0. The $x$x-intercept has also been translated $h$h units across, from the point $\left(1,0\right)$(1,0) to the point $\left(1+h,0\right)$(1+h,0).

Worked example

Question 18

The graphs of the function $f\left(x\right)=\log_2\left(-x\right)$f(x)=log2(x) and another function $g\left(x\right)$g(x) are shown below.

 

  • Describe the transformation used to get from $f\left(x\right)$f(x) to $g\left(x\right)$g(x).

Think: $g\left(x\right)$g(x) has the same general shape as $f\left(x\right)$f(x), just translated to the right. We can figure out how far it has been translated by looking at key features, such as the asymptote and $x$x-intercept.

Do: The asymptote of $f\left(x\right)$f(x) is the line $x=0$x=0 (the $y$y-axis), while the asymptote of $g\left(x\right)$g(x) is the line $x=7$x=7. So $f\left(x\right)$f(x) has been translated $7$7 units to the right to give $g\left(x\right)$g(x).

 

  • Determine the equation of the function $g\left(x\right)$g(x).

Think: We know that $f\left(x\right)$f(x) has been horizontally translated $7$7 units to the right to give $g\left(x\right)$g(x). So we want to replace $x$x with $x-7$x7.

Do: This means that $g\left(x\right)=\log_2\left(-\left(x-7\right)\right)$g(x)=log2((x7)). This function has an asymptote at $x=7$x=7, and the negative coefficient of $x$x means that it takes values to the left of the asymptote, just like $f\left(x\right)$f(x) does.

We can also rewrite this function in the form $g\left(x\right)=\log_2\left(7-x\right)$g(x)=log2(7x).

Reflect: We can substitute some values of $x$x into $g\left(x\right)=\log_2\left(7-x\right)$g(x)=log2(7x) that are on either side of $x=7$x=7 to confirm that the function matches the graph shown.

For example, when $x=8$x=8 we have that $g\left(8\right)=\log_2\left(7-8\right)=\log_2\left(-1\right)$g(8)=log2(78)=log2(1) which is undefined.

On the other side, when $x=6$x=6 we have that $g\left(6\right)=\log_2\left(7-6\right)=\log_2\left(1\right)=0$g(6)=log2(76)=log2(1)=0, which is the $x$x-intercept of the graph.

Functions of the form $y=\log_b\left(\pm\left(x-h\right)\right)$y=logb(±(xh))

A function of the form $y=\log_b\left(x-h\right)$y=logb(xh) represents a horizontal translation by $h$h units of the function $y=\log_bx$y=logbx.

Similarly, a function of the form $y=\log_b\left(-\left(x-h\right)\right)=\log_b\left(h-x\right)$y=logb((xh))=logb(hx) represents a horizontal translation by $h$h units of the function $y=\log_b\left(-x\right)$y=logb(x).

In both cases:

  • The translation is to the right if $h$h is positive, and to the left if $h$h is negative.
  • The translated function has an asymptote at $x=h$x=h.

Practice questions

Question 19

The graphs of the functions $f\left(x\right)=\log_3x$f(x)=log3x and $g\left(x\right)=\log_3\left(x+6\right)$g(x)=log3(x+6) are shown below.

Which of the following best describes the transformation from $f\left(x\right)$f(x) to $g\left(x\right)$g(x)?

Loading Graph...

  1. $f\left(x\right)$f(x) has been translated $6$6 units to the left to give $g\left(x\right)$g(x).

    A

    $f\left(x\right)$f(x) has been translated $6$6 units downwards to give $g\left(x\right)$g(x).

    B

    $f\left(x\right)$f(x) has been translated $6$6 units to the right to give $g\left(x\right)$g(x).

    C

    $f\left(x\right)$f(x) has been translated $6$6 units upwards to give $g\left(x\right)$g(x).

    D

Question 20

The function $f\left(x\right)=\log_3x$f(x)=log3x and another function $g\left(x\right)$g(x) are shown below.

Determine the equation of the function $g\left(x\right)$g(x).

Loading Graph...

 

Domain of logarithm functions

The function defined by $y=\log_b\left[f\left(x\right)\right]+c$y=logb[f(x)]+c has a domain determined by the solution of the inequality given by $f\left(x\right)>0$f(x)>0. Remember that the domain is the set of values that $x$x can take. The function $f\left(x\right)$f(x) is said to be the argument of the logarithmic function, and it is this that must be kept positive for the logarithmic function to be defined. 

Worked examples

Question 21

Algebraically verify the domain of the function $y=\log_2\left(2x-6\right)-1$y=log2(2x6)1.

Think: Determine the expression to be set greater than zero.

Do: The domain of the function $y=\log_2\left(2x-6\right)-1$y=log2(2x6)1 is found by solving the inequality $2x-6>0$2x6>0. Here, $2x>6$2x>6, and thus $x>3$x>3

Reflect: Verify the domain with the graph of the function:

Question 22

Algebraically verify the domain of the function $$.

Think: Determine the expression to be set greater than zero. 

Do: The domain of $y=\ln\left(-x\right)$y=ln(x) is found by setting $-x>0$x>0 from which we see that $x<0$x<0

Reflect: Verify the domain with the graph of the function:

 

Range of logarithm functions

The range (the set of values that the function can take) can be a little more difficult to determine but there are some forms of the log function where the range is trivial. For example, any log function of the form $y=\log_b\left(mx+c\right)+d$y=logb(mx+c)+d for constants $a,b,c$a,b,c and $d$d will have the range given by $y\in\Re$y. That is to say there are no restrictions on the range because the the quantity $mx+c$mx+c only effects the domain, and the constant $d$d translates the curve vertically without effecting the range.  

Thus functions like $y=\log_3\left(2x\right)$y=log3(2x)$y=\log_3\left(1-2x\right)+2$y=log3(12x)+2 or even $y=\log_{\frac{1}{2}}\left(1+x\right)$y=log12(1+x) all have the range given by $y\in\Re$y.

When thinking about the range, it is a good idea to look at the graph first. In most cases, the graph will alert us to possible changes to the domain and range.  We will find that restrictions start to appear when the arguments become non-linear.

For example the least value of $y$y for the function $y=\log_2\left(x^2+2\right)$y=log2(x2+2) occurs when $x=0$x=0 whence $y=1$y=1. The function's natural domain includes all real numbers, and the range is given by $y\ge1$y1 as readily seen by the graph. 

Practice questions

QUESTION 23

Find the domain of $\log\left(3x+9\right)$log(3x+9). State your answer as an inequality.

QUESTION 24

Find the domain of $\log\left(-7x\right)$log(7x). State your answer as an inequality.

QUESTION 25

Find the domain of $\ln\left(x^2+9\right)$ln(x2+9). Write your answer in interval notation.

 

Graph logarithmic functions Alog(x-h)+k

We have already worked with single transformations for logarithmic functions. Now, we will combine the transformations.

Graphs of the form $y=a\log_b\left(x-h\right)+k$y=alogb(xh)+k

To sketch the graph of a function of the form $y=a\log_b\left(x-h\right)+k$y=alogb(xh)+k, start by identifying the locations of the asymptote and the $x$x-intercept.

Then plot a couple of extra points to see the general shape of the graph.

 

Exploration

It is important to experiment with the different effects yourself. The following applet allows you to vary the constants of the log function given by $y=a\log_b\left(x-h\right)+k$y=alogb(xh)+k. Focus on varying each constant separately at first, and then try combinations of constants. See what you can discover yourself.

Practice questions

QUESTION 26

Consider the function $y=4\log_2\left(x-7\right)$y=4log2(x7).

  1. Solve for the $x$x-coordinate of the $x$x-intercept.

  2. State the equation of the vertical asymptote.

  3. Sketch the graph of $y=4\log_2\left(x-7\right)$y=4log2(x7).

    Loading Graph...

QUESTION 27

Consider the function $y=\log_2\left(x-1\right)-4$y=log2(x1)4.

  1. Solve for the $x$x-coordinate of the $x$x-intercept.

  2. State the equation of the vertical asymptote.

  3. Sketch the graph of $y=\log_2\left(x-1\right)-4$y=log2(x1)4.

    Loading Graph...

QUESTION 28

Consider the function $y=-3\log_5\left(4-x\right)$y=3log5(4x).

  1. Solve for the $x$x-coordinate of the $x$x-intercept.

  2. State the equation of the vertical asymptote.

  3. Sketch the graph of $y=-3\log_5\left(4-x\right)$y=3log5(4x).

    Loading Graph...

Outcomes

MGSE9-12.F.IF.7

Graph functions expressed algebraically and show key features of the graph both by hand and by using technology.

MGSE9-12.F.IF.7e

Graph exponential and logarithmic functions, showing intercepts and end behavior, and trigonometric functions, showing period, midline, and amplitude.

What is Mathspace

About Mathspace