Logarithmic functions are used to model various real life situations and being able to graph them is invaluable as it allows us to visualize the function in order to analyze and predict trends.
The domain of an exponential function of the form y=bx for any real number x where b>0 and b=1 is (−∞,∞). The range of this function is (0,∞). Now, given that logarithmic functions are inverses of exponential functions, the domain of a logarithmic function in the form of y=logb(x) is (0,∞) and the range is (−∞,∞).
When we applied certain transformations like vertical shift to the parent exponential function, the range of y=bx changed. Similarly, applying certain transformations to the parent function y=logb(x) can change the domain. The domain of a logarithmic function consists only of positive real numbers and so, given a logarithmic function, we can identify the domain by setting up an inequality showing the argument of log greater than zero. We can then solve for x and write the resulting domain in interval notation.
Example
What is the domain of f(x)=log(x−5)+2?
The argument of log is x−5, we ignore the 2 as it is outside the log. This gives us the inequality x−5>0.
We can solve for x by adding 5 to both sides of x−5>0 giving us x>5.
Rewriting the domain in interval notation gives us (5,∞).
For any real number x and constant b>0 where b=1, we get the following characteristics in the graph of f(x)=logb(x)...
It is a one-to-one function.
The domain is (0,∞) and the range is (−∞,∞).
The x-intercept is (1,0) and there is no $$y-intercept.
A key point is (b,1).
The graph is increasing if b>1 and decreasing if 0<b<1.
Fig. 1 - Parent Logarithmic Function
Given a logarithmic function with the form f(x)=logb(x), we can graph the function using the following steps...
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.
Example
Graph f(x)=log51(x). State the domain, range, and asymptote.
We can plot the points (1,0) and (51,1) and draw a smooth curve through those points. When drawing the curve, we will make sure to get close to x=0 but never have our curve touch or cross it.
Fig. 2 - Graph of Example
The domain is (0,∞), the range is (−∞,∞) and there is a vertical asymptote at x=0.
We can shift the parent function c units horizontally using the function f(x)=logb(x+c). If c>0 then we shift c units to the left and if c<0, we shift c units to the right. When we apply a horizontal shift, the vertical asymptote becomes x=−c, the domain becomes (−c,∞) and the range stays the same as (−∞,∞).
We can shift the parent function d units vertically using the function f(x)=logb(x)+d. If d>0 then we shift d units up and if d<0, we shift d units down. When we apply a vertical shift, the vertical asymptote, domain, and range stay the same. This means the vertical asymptote is x=0, the domain is (0,∞) and the range is (−∞,∞).
Given a positive constant a where a=1, we can stretch and compress the function using f(x)=alogb(x). If a>1 then we are stretching the parent function vertically by a factor of a and if 0<a<1 then we are compressing the parent function vertically by a factor of a. Doing this transformation does not change any of the properties of the parent function.
When the parent function is multiplied by −1 meaning −f(x) or f(x)=−logb(x), then the result is a reflection about the x-axis. The reflected function's vertical asymptote, domain, and range remains the same which means the vertical asymptote is x=0, the domain is (0,∞) and the range is (−∞,∞). However, the key point does change to (b−1,1) and the reflected function changes directions as x approaches ∞.
On the other hand, when the input of the parent function is multiplied by −1 meaning f(−x) or f(x)=logb(−x), then the result is a reflection about the y-axis. In this case, the vertical asymptote remains the same as x=0 and the range remains the same as (−∞,∞). The new x-intercept is (−1,0), the key point is now (−b,1) and the domain is now (−∞,0).
Fig. 6 - Reflection
note
Due to the fact that exponential functions and logarithm functions are inverse functions, the parent functions are reflections of each other about y=x.
All translations of the parent logarithmic function, y=logb(x), has the form f(x)=alogb(x+c)+d where b>1. The constant a denotes stretching or compressing, c denotes the horizontal shift, and d denotes the vertical shift. If a<0 then there is a reflection about the x-axis and if f(x)=log(−x) then there is a reflection about the y-axis.
We can graph any logarithmic function by graphing the parent function and then translating it based on the constants found in the function. After this we can state the domain, range, and asymptote based on how they were altered through the translations.
Example
Graph the function of f(x)=−2log3(x+4)+5. State the domain, range, and vertical asymptote.
The parent function is f(x)=log3(x) because the base is 3. The graph has additional constants which are a=−2, c=4, and d=5. Through these constants we can denote that we are stretching the parent function by a scale of 2, shifting it to the left 4 units and down 5 units. Finally, due to the fact that a<0, we are reflecting about the x-axis.
Fig. 7 - Example Function
Due to the fact that we shifted 4 units to the left, our new vertical asymptote is x=−4 and the new domain is (−4,∞). The range stays the same as (−∞,∞).