title | layout |
---|---|
Graphs of Logarithmic Functions |
page |
In Graphs of Exponential Functions{: .target-chapter}, we saw how creating a graphical representation of an exponential model gives us another layer of insight for predicting future events. How do logarithmic graphs give us insight into situations? Because every logarithmic function is the inverse function of an exponential function, we can think of every output on a logarithmic graph as the input for the corresponding inverse exponential equation. In other words, logarithms give the cause for an effect.
To illustrate, suppose we invest $2500
in an account that offers an annual interest rate of 5%,
compounded continuously. We already know that the balance in our account for any year t
can be found with the equation A=2500 e 0.05t .
But what if we wanted to know the year for any balance? We would need to create a corresponding new function by interchanging the input and the output; thus we would need to create a logarithmic model for this situation. By graphing the model, we can see the output (year) for any input (account balance). For instance, what if we wanted to know how many years it would take for our initial investment to double? [link] shows this point on the logarithmic graph.
{: #CNX_Precalc_Figure_04_04_001}
In this section we will discuss the values for which a logarithmic function is defined, and then turn our attention to graphing the family of logarithmic functions.
Before working with graphs, we will take a look at the domain (the set of input values) for which the logarithmic function is defined.
Recall that the exponential function is defined as y= b x
for any real number x
and constant b>0,
b≠1,
where
-
The domain of y
is ( −∞,∞ ).
-
The range of y
is ( 0,∞ ).
In the last section we learned that the logarithmic function y= log b ( x )
is the inverse of the exponential function y= b x .
So, as inverse functions:
-
The domain of y= log b ( x )
is the range of y= b x :
( 0,∞ ).
-
The range of y= log b ( x )
is the domain of y= b x :
( −∞,∞ ).
Transformations of the parent function y= log b ( x )
behave similarly to those of other functions. Just as with other parent functions, we can apply the four types of transformations—shifts, stretches, compressions, and reflections—to the parent function without loss of shape.
In Graphs of Exponential Functions{: .target-chapter} we saw that certain transformations can change the range of y= b x .
Similarly, applying transformations to the parent function y= log b ( x )
can change the domain. When finding the domain of a logarithmic function, therefore, it is important to remember that the domain consists only of positive real numbers. That is, the argument of the logarithmic function must be greater than zero.
For example, consider f(x)= log 4 ( 2x−3 ).
This function is defined for any values of x
such that the argument, in this case 2x−3,
is greater than zero. To find the domain, we set up an inequality and solve for x:
In interval notation, the domain of f(x)= log 4 ( 2x−3 )
is ( 1.5,∞ ).
-
Set up an inequality showing the argument greater than zero.
-
Solve for x.
-
Write the domain in interval notation. {: type="1"}
Solving this inequality,
is ( −3,∞ ).
Solving this inequality,
is ( –∞, 5 2 ).
Now that we have a feel for the set of values for which a logarithmic function is defined, we move on to graphing logarithmic functions. The family of logarithmic functions includes the parent function y= log b ( x )
along with all its transformations: shifts, stretches, compressions, and reflections.
We begin with the parent function y= log b ( x ).
Because every logarithmic function of this form is the inverse of an exponential function with the form y= b x ,
their graphs will be reflections of each other across the line y=x.
To illustrate this, we can observe the relationship between the input and output values of y= 2 x
and its equivalent x= log 2 (y)
in [link].
| x | −3
| −2
| −1
| 0
| 1
| 2
| 3
| | 2 x =y | 1 8
| 1 4
| 1 2
| 1
| 2
| 4
| 8
| | log 2 ( y )=x | −3
| −2
| −1
| 0
| 1
| 2
| 3
| {: #Table_04_04_01 summary="Three rows and eight columns. The first row is labeled, “x”, the second row is labeled, “y=2^x”, and the third row is labeled, “log_2(y)=x”. Reading the columns as ordered pairs, we have the following values for the second row: (-3, 1/8), (-2, 1/4), (-1, 1/2), (0, 1), (1, 2), (2, 4), and (3, 8). For the third row: (1/8, -3), (1/4, -2), (1/2, -1), (1, 0), (2, 1), (4, 2), and (8, 3)."}
Using the inputs and outputs from [link], we can build another table to observe the relationship between points on the graphs of the inverse functions f(x)= 2 x
and g(x)= log 2 (x).
See [link].
| f(x)= 2 x
| ( −3, 1 8 )| ( −2, 1 4 )
| ( −1, 1 2 )
| ( 0,1 )
| ( 1,2 )
| ( 2,4 )
| ( 3,8 )
| | g(x)= log 2 ( x ) | ( 1 8 ,−3 )
| ( 1 4 ,−2 )
| ( 1 2 ,−1 )
| ( 1,0 )
| ( 2,1 )
| ( 4,2 )
| ( 8,3 )
| {: #Table_04_04_02 summary="Two rows and eight columns. The first row is labeled, “f(x)=2^x”, with the following values: (-3, 1/8), (-2, 1/4), (-1, 1/2), (0, 1), (1, 2), (2, 4), and (3, 8). The second row is labeled, “g(x)=log_2(x)”, with the following values: (1/8, -3), (1/4, -2), (1/2, -1), (1, 0), (2, 1), (4, 2), and (8, 3)."}
As we’d expect, the x- and y-coordinates are reversed for the inverse functions. [link] shows the graph of f
and g.
{: #CNX_Precalc_Figure_04_04_002}
Observe the following from the graph:
-
f(x)= 2 x
has a y-intercept at (0,1)
and g(x)= log 2 ( x )
has an x- intercept at (1,0).
-
The domain of f(x)= 2 x ,
( −∞,∞ ),
is the same as the range of g(x)= log 2 ( x ).
-
The range of f(x)= 2 x ,
( 0,∞ ),
is the same as the domain of g(x)= log 2 ( x ).
and constant b>0,
b≠1,
we can see the following characteristics in the graph of f(x)= log b ( x ):
-
one-to-one function
-
vertical asymptote: x=0
-
domain: (0,∞)
-
range: ( −∞,∞ )
-
*x-*intercept: (1,0)
and key point (b,1)
-
y-intercept: none
-
increasing if b>1
-
decreasing if 0<b<1
See [link].
{: #CNX_Precalc_Figure_04_04_003}
[link] shows how changing the base b
in f(x)= log b ( x )
can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function ln( x )
has base e≈2.718.)
graph the function.**
-
Draw and label the vertical asymptote, x=0.
-
Plot the *x-*intercept, ( 1,0 ).
-
Plot the key point ( b,1 ).
-
Draw a smooth curve through the points.
-
State the domain, ( 0,∞ ),
the range, ( −∞,∞ ),
and the vertical asymptote, x=0. {: type="1"}
State the domain, range, and asymptote.
-
Since b=5
is greater than one, we know the function is increasing. The left tail of the graph will approach the vertical asymptote x=0,
and the right tail will increase slowly without bound.
-
The x-intercept is ( 1,0 ).
-
The key point ( 5,1 )
is on the graph.
-
We draw and label the asymptote, plot and label the points, and draw a smooth curve through the points (see [link]).
{: #CNX_Precalc_Figure_04_04_005}
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
State the domain, range, and asymptote.
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
As we mentioned in the beginning of the section, transformations of logarithmic graphs behave similarly to those of other parent functions. We can shift, stretch, compress, and reflect the parent function{: data-type="term" .no-emphasis} y= log b ( x )
without loss of shape.
When a constant c
is added to the input of the parent function f(x)=lo g b (x),
the result is a horizontal shift{: data-type="term" .no-emphasis} c
units in the opposite direction of the sign on c.
To visualize horizontal shifts, we can observe the general graph of the parent function f(x)= log b ( x )
and for c>0
alongside the shift left, g(x)= log b ( x+c ),
and the shift right, h(x)= log b ( x−c ).
See [link].
the function f(x)= log b ( x+c )
-
shifts the parent function y= log b ( x )
left c
units if c>0.
-
shifts the parent function y= log b ( x )
right c
units if c<0.
-
has the vertical asymptote x=−c.
-
has domain ( −c,∞ ).
-
has range ( −∞,∞ ).
graph the translation.**
-
Identify the horizontal shift:
-
If c>0,
shift the graph of f(x)= log b ( x )
left c
units.
-
If c<0,
shift the graph of f(x)= log b ( x )
right c
units. {: type="a"}
-
-
Draw the vertical asymptote x=−c.
-
Identify three key points from the parent function. Find new coordinates for the shifted functions by subtracting c
from the x
coordinate.
-
Label the three points.
-
The Domain is ( −c,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=−c. {: type="1"}
alongside its parent function. Include the key points and asymptotes on the graph. State the domain, range, and asymptote.
we notice x+( −2 )=x–2.
Thus c=−2,
so c<0.
This means we will shift the function f(x)= log 3 (x)
right 2 units.
The vertical asymptote is x=−(−2)
or x=2.
Consider the three key points from the parent function, ( 1 3 ,−1 ),
( 1,0 ),
and ( 3,1 ).
The new coordinates are found by adding 2 to the x
coordinates.
Label the points ( 7 3 ,−1 ),
( 3,0 ),
and ( 5,1 ).
The domain is ( 2,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=2.
alongside its parent function. Include the key points and asymptotes on the graph. State the domain, range, and asymptote.
the range ( −∞,∞ ),
and the asymptote x=–4.
When a constant d
is added to the parent function f(x)= log b ( x ),
the result is a vertical shift{: data-type="term" .no-emphasis} d
units in the direction of the sign on d.
To visualize vertical shifts, we can observe the general graph of the parent function f(x)= log b ( x )
alongside the shift up, g(x)= log b ( x )+d
and the shift down, h(x)= log b ( x )−d.
See [link].
the function f(x)= log b ( x )+d
-
shifts the parent function y= log b ( x )
up d
units if d>0.
-
shifts the parent function y= log b ( x )
down d
units if d<0.
-
has the vertical asymptote x=0.
-
has domain ( 0,∞ ).
-
has range ( −∞,∞ ).
graph the translation.**
-
Identify the vertical shift:
-
If d>0,
shift the graph of f(x)= log b ( x )
up d
units.
-
If d<0,
shift the graph of f(x)= log b ( x )
down d
units.
-
-
Draw the vertical asymptote x=0.
-
Identify three key points from the parent function. Find new coordinates for the shifted functions by adding d
to the y
coordinate.
-
Label the three points.
-
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0. {: type="1"}
alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
we will notice d=–2.
Thus d<0.
This means we will shift the function f(x)= log 3 (x)
down 2 units.
The vertical asymptote is x=0.
Consider the three key points from the parent function, ( 1 3 ,−1 ),
( 1,0 ),
and ( 3,1 ).
The new coordinates are found by subtracting 2 from the y coordinates.
Label the points ( 1 3 ,−3 ),
( 1,−2 ),
and ( 3,−1 ).
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
{: #CNX_Precalc_Figure_04_04_011}
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
When the parent function f(x)= log b ( x )
is multiplied by a constant a>0,
the result is a vertical stretch{: data-type="term" .no-emphasis} or compression{: data-type="term" .no-emphasis} of the original graph. To visualize stretches and compressions, we set a>1
and observe the general graph of the parent function f(x)= log b ( x )
alongside the vertical stretch, g(x)=a log b ( x )
and the vertical compression, h(x)= 1 a log b ( x ).
See [link].
the function f(x)=a log b ( x )
-
stretches the parent function y= log b ( x )
vertically by a factor of a
if a>1.
-
compresses the parent function y= log b ( x )
vertically by a factor of a
if 0<a<1.
-
has the vertical asymptote x=0.
-
has the x-intercept ( 1,0 ).
-
has domain ( 0,∞ ).
-
has range ( −∞,∞ ).
a>0,
graph the translation.**
-
Identify the vertical stretch or compressions:
-
If |a|>1,
the graph of f(x)= log b ( x )
is stretched by a factor of a
units.
-
If |a|<1,
the graph of f(x)= log b ( x )
is compressed by a factor of a
units.
-
-
Draw the vertical asymptote x=0.
-
Identify three key points from the parent function. Find new coordinates for the shifted functions by multiplying the y
coordinates by a.
-
Label the three points.
-
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0. {: type="1"}
alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
we will notice a=2.
This means we will stretch the function f(x)= log 4 (x)
by a factor of 2.
The vertical asymptote is x=0.
Consider the three key points from the parent function, ( 1 4 ,−1 ),
( 1,0 ),
and ( 4,1 ).
The new coordinates are found by multiplying the y
coordinates by 2.
Label the points ( 1 4 ,−2 ),
( 1,0 ) ,
and ( 4,2 ).
The domain is ( 0, ∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
See [link].
{: #CNX_Precalc_Figure_04_04_014}
The domain is ( 0,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
State the domain, range, and asymptote.
The x-intercept will be (−1,0).
The domain will be ( −2,∞ ).
Two points will help give the shape of the graph: (−1,0)
and (8,5).
We chose x=8
as the x-coordinate of one point to graph because when x=8,
x+2=10,
the base of the common logarithm.
{: #CNX_Precalc_Figure_04_04_016}
The domain is ( −2,∞ ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=−2.
State the domain, range, and asymptote.
the range is ( −∞,∞ ),
and the vertical asymptote is x=2.
When the parent function f(x)= log b ( x )
is multiplied by −1,
the result is a reflection{: data-type="term" .no-emphasis} about the x-axis. When the input is multiplied by −1,
the result is a reflection about the y-axis. To visualize reflections, we restrict b>1,
and observe the general graph of the parent function f(x)= log b ( x )
alongside the reflection about the x-axis, g(x)= −log b ( x )
and the reflection about the y-axis, h(x)= log b ( −x ).
-
reflects the parent function y= log b ( x )
about the x-axis.
-
has domain, ( 0,∞ ),
range, ( −∞,∞ ),
and vertical asymptote, x=0,
which are unchanged from the parent function.
{: data-type="newline" data-count="1"}
The function f(x)= log b ( −x )
-
reflects the parent function y= log b ( x )
about the y-axis.
-
has domain ( −∞,0 ).
-
has range, ( −∞,∞ ),
and vertical asymptote, x=0,
which are unchanged from the parent function.
graph a translation.**
If f(x)=− log b (x) | If f(x)= log b (−x) |
---|---|
|
|
|
|
|
|
|
|
|
|
alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
identify the behavior and key points for the graph.
-
Since b=10
is greater than one, we know that the parent function is increasing. Since the input value is multiplied by −1,
f
is a reflection of the parent graph about the *y-*axis. Thus, f(x)=log(−x)
will be decreasing as x
moves from negative infinity to zero, and the right tail of the graph will approach the vertical asymptote x=0.
-
The x-intercept is ( −1,0 ).
-
We draw and label the asymptote, plot and label the points, and draw a smooth curve through the points.
{: #CNX_Precalc_Figure_04_04_019}
The domain is ( −∞,0 ),
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
State the domain, range, and asymptote.
the range is ( −∞,∞ ),
and the vertical asymptote is x=0.
-
Press [Y=]. Enter the given logarithm equation or equations as Y1= and, if needed, Y2=.
-
Press [GRAPH] to observe the graphs of the curves and use [WINDOW] to find an appropriate view of the graphs, including their point(s) of intersection.
-
To find the value of x,
we compute the point of intersection. Press [2ND] then [CALC]. Select “intersect” and press [ENTER] three times. The point of intersection gives the value of x,
for the point(s) of intersection. {: type="1"}
graphically. Round to the nearest thousandth.
next to Y1=. Then enter −2ln( x−1 )
next to Y2=. For a window, use the values 0 to 5 for x
and –10 to 10 for y.
Press [GRAPH]. The graphs should intersect somewhere a little to right of x=1.
For a better approximation, press [2ND] then [CALC]. Select [5: intersect] and press [ENTER] three times. The x-coordinate of the point of intersection is displayed as 1.3385297. (Your answer may be different if you use a different window or use a different value for Guess?) So, to the nearest thousandth, x≈1.339.
graphically. Round to the nearest thousandth.
Now that we have worked with each type of translation for the logarithmic function, we can summarize each in [link] to arrive at the general equation for translating exponential functions.
Translations of the Parent Function y= log b ( x ) | |
---|---|
Translation | Form |
Shift
|
y= log b ( x+c )+d |
Stretch and Compress
|
y=a log b ( x ) |
Reflect about the x-axis | y=− log b ( x ) |
Reflect about the y-axis | y= log b ( −x ) |
General equation for all translations | y=a log b (x+c)+d |
have the form
is
-
shifted vertically up d
units.
-
shifted horizontally to the left c
units.
-
stretched vertically by a factor of | a |
if | a |>0.
-
compressed vertically by a factor of | a |
if 0<| a |<1.
-
reflected about the *x-*axis when a<0.
For f( x )=log( −x ),
the graph of the parent function is reflected about the y-axis.
and has been vertically reflected. We do not know yet the vertical shift or the vertical stretch. We know so far that the equation will have form:
and ( 2,–1 ).
Substituting ( –1,1 ),
,
x | −1 | 0 | 1 | 2 | 3 |
f(x) | 1 | 0 | −0.58496 | −1 | −1.3219 |
x | 4 | 5 | 6 | 7 | 8 |
f(x) | −1.5850 | −1.8074 | −2 | −2.1699 | −2.3219 |
Yes, if we know the function is a general logarithmic function. For example, look at the graph in [link]. The graph approaches x=−3 (or thereabouts) more and more closely, so x=−3 is, or is very close to, the vertical asymptote. It approaches from the right, so the domain is all points to the right, {x | x>−3}. The range, as with all general logarithmic functions, is all real numbers. And we can see the end behavior because the graph goes down as it goes left and up as it goes right. The end behavior is that as x→− 3 + ,f(x)→−∞ and as x→∞,f(x)→∞.
| General Form for the Translation of the Parent Logarithmic Function f(x)= log b ( x )
| f(x)=a log b ( x+c )+d
| {: summary="..."}
-
To find the domain of a logarithmic function, set up an inequality showing the argument greater than zero, and solve for x.
-
The graph of the parent function f(x)= log b ( x )
has an *x-*intercept at ( 1,0 ),
domain ( 0,∞ ),
range ( −∞,∞ ),
vertical asymptote x=0,
and
-
if b>1,
the function is increasing.
-
if 0<b<1,
the function is decreasing.
See [link].
-
-
The equation f(x)= log b ( x+c )
shifts the parent function y= log b ( x )
horizontally
-
left c
units if c>0.
-
right c
units if c<0.
See [link].
-
-
The equation f(x)= log b ( x )+d
shifts the parent function y= log b ( x )
vertically
-
up d
units if d>0.
-
down d
units if d<0.
See [link].
-
-
For any constant a>0,
the equation f(x)=a log b ( x )
-
stretches the parent function y= log b ( x )
vertically by a factor of a
if |a|>1.
-
compresses the parent function y= log b ( x )
vertically by a factor of a
if |a|<1.
-
-
When the parent function y= log b ( x )
is multiplied by −1,
the result is a reflection about the x-axis. When the input is multiplied by −1,
the result is a reflection about the y-axis.
-
The equation f(x)=− log b ( x )
represents a reflection of the parent function about the *x-*axis.
-
The equation f(x)= log b ( −x )
represents a reflection of the parent function about the *y-*axis.
See [link].
- A graphing calculator may be used to approximate solutions to some logarithmic equations See [link].
-
-
All translations of the logarithmic function can be summarized by the general equation f(x)=a log b ( x+c )+d.
See [link].
-
Given an equation with the general form f(x)=a log b ( x+c )+d,
we can identify the vertical asymptote x=−c
for the transformation. See [link].
-
Using the general equation f(x)=a log b ( x+c )+d,
we can write the equation of a logarithmic function given its graph. See [link].
So for every point (a,b)
on the graph of a logarithmic function, there is a corresponding point (b,a)
on the graph of its inverse exponential function.
Why can’t x
be zero?
For the following exercises, state the domain and range of the function.
Range: ( −∞,∞ )
Range: ( −∞,∞ )
For the following exercises, state the domain and the vertical asymptote of the function.
Vertical asymptote: x=5
Vertical asymptote: x=− 1 3
Vertical asymptote: x=−3
For the following exercises, state the domain, vertical asymptote, and end behavior of the function.
; * * * {: data-type="newline"}
Vertical asymptote: x= 3 7
; End behavior: as x→ ( 3 7 ) + ,f(x)→−∞
and as x→∞,f(x)→∞
; Vertical asymptote: x=−3
; * * * {: data-type="newline"}
End behavior: as x→− 3 +
, f(x)→−∞
and as x→∞
, f(x)→∞
For the following exercises, state the domain, range, and x- and y-intercepts, if they exist. If they do not exist, write DNE.
Range: ( −∞,∞ );
Vertical asymptote: x=1;
x-intercept: ( 5 4 ,0 );
y-intercept: DNE
Range: ( −∞,∞ );
Vertical asymptote: x=0;
x-intercept: ( − e 2 ,0 );
y-intercept: DNE
Range: ( −∞,∞ );
Vertical asymptote: x=0;
x-intercept: ( e 3 ,0 );
y-intercept: DNE
For the following exercises, match each function in [link] with the letter corresponding to its graph.
{: #CNX_Precalc_Figure_04_04_201}
For the following exercises, match each function in [link] with the letter corresponding to its graph.
{: #CNX_Precalc_Figure_04_04_202}
For the following exercises, sketch the graphs of each pair of functions on the same axis.
and g(x)= 10 x
and g(x)= log 1 2 (x)
and g(x)=ln(x)
and g(x)=ln(x)
For the following exercises, match each function in [link] with the letter corresponding to its graph.
{: #CNX_Precalc_Figure_04_04_207}
For the following exercises, sketch the graph of the indicated function.
For the following exercises, write a logarithmic equation corresponding to the graph shown.
For the following exercises, use a graphing calculator to find approximate solutions to each equation.
be any positive real number such that b≠1.
What must log b 1
be equal to? Verify the result.
and g(x)=− log 2 ( x ).
Make a conjecture based on the result.
and g(x)=− log 2 ( x )
appear to be the same; Conjecture: for any positive base b≠1,
log b ( x )=− log 1 b ( x ).
Discuss the result.
. From the graph of the function f( x )= x+2 x−4 ,
note that the graph lies above the x-axis on the interval ( −∞,−2 )
and again to the right of the vertical asymptote, that is ( 4,∞ ).
Therefore, the domain is ( −∞,−2 )∪( 4,∞ ).
algebraically. Show the steps for solving, and then verify the result by graphing the function.