Graphing Logarithmic Functions
Graphing the Parent Function
Graph $y = \log_2 x$ and state its domain, range and asymptote.
Choose x-values that are powers of 2: $x = \frac{1}{4}, \frac{1}{2}, 1, 2, 4, 8$, because $\log_2$ of a power of 2 is easy to find = Six easy x-values
Find each y-value: $\log_2 \frac{1}{4} = -2$, $\log_2 \frac{1}{2} = -1$, $\log_2 1 = 0$, $\log_2 2 = 1$, $\log_2 4 = 2$, $\log_2 8 = 3$ = $y = -2, -1, 0, 1, 2, 3$
Plot the points and draw the asymptote: Plot $\left(\frac{1}{4}, -2\right)$, $\left(\frac{1}{2}, -1\right)$, $(1, 0)$, $(2, 1)$, $(4, 2)$, $(8, 3)$ and draw the dashed line $x = 0$ = Points and asymptote $x = 0$
Connect with a smooth curve: The curve falls steeply near the $y$-axis without touching it and rises slowly to the right = Increasing curve through $(1, 0)$
Answer: Domain $x > 0$, range all real numbers, vertical asymptote $x = 0$, $x$-intercept $(1, 0)$.
A Base Between 0 and 1
Graph $y = \log_{1/2} x$ and compare it with $y = \log_2 x$.
Use the key points: $\left(\frac{1}{b}, -1\right) = (2, -1)$, $(1, 0)$, $(b, 1) = \left(\frac{1}{2}, 1\right)$ = $(2, -1)$, $(1, 0)$, $\left(\frac{1}{2}, 1\right)$
Add one more point: $\left(\frac{1}{2}\right)^{-2} = 4$, so $\log_{1/2} 4 = -2$ = $(4, -2)$
Describe the direction: As $x$ grows, $y$ goes down: $1, 0, -1, -2$ = The graph decreases
Compare with base 2: At $x = 2$: $\log_2 2 = 1$ but $\log_{1/2} 2 = -1$. Every y-value has the opposite sign = $\log_{1/2} x = -\log_2 x$
Answer: The graph of $y = \log_{1/2} x$ decreases, passes through $(1, 0)$, has the asymptote $x = 0$ and is the reflection of $y = \log_2 x$ across the $x$-axis.
Reflecting an Exponential Graph
Use points of $y = 3^x$ to find points of $y = \log_3 x$.
List points of the exponential function: $3^{-1} = \frac{1}{3}$, $3^0 = 1$, $3^1 = 3$, $3^2 = 9$ = $\left(-1, \frac{1}{3}\right)$, $(0, 1)$, $(1, 3)$, $(2, 9)$
Swap x and y in each point: Reflection across $y = x$ turns $(p, q)$ into $(q, p)$ = $\left(\frac{1}{3}, -1\right)$, $(1, 0)$, $(3, 1)$, $(9, 2)$
Swap the asymptotes too: $y = 3^x$ has the horizontal asymptote $y = 0$; after the swap it becomes $x = 0$ = Vertical asymptote $x = 0$
Swap domain and range: $y = 3^x$: domain all reals, range $y > 0$. $y = \log_3 x$: domain $x > 0$, range all reals = Domain $x > 0$
Answer: $y = \log_3 x$ passes through $\left(\frac{1}{3}, -1\right)$, $(1, 0)$, $(3, 1)$, $(9, 2)$ with asymptote $x = 0$.
Shifting the Graph
Graph $y = \log_2(x - 3) + 1$. Give the asymptote, domain, range and $x$-intercept.
Read h and k: Compare with $y = \log_b(x - h) + k$: $b = 2$, $h = 3$, $k = 1$ = Right 3, up 1
Move the asymptote: $x = 0$ moves 3 units right = Asymptote $x = 3$, domain $x > 3$
Move the key points: $(1, 0) \to (1 + 3, 0 + 1)$ and $(2, 1) \to (2 + 3, 1 + 1)$ = $(4, 1)$ and $(5, 2)$
Find the x-intercept: $\log_2(x - 3) + 1 = 0 \Rightarrow \log_2(x - 3) = -1 \Rightarrow x - 3 = \frac{1}{2}$ = $x = 3.5$
Answer: Asymptote $x = 3$, domain $x > 3$, range all real numbers, $x$-intercept $(3.5, 0)$, key points $(4, 1)$ and $(5, 2)$.
Finding the Equation from a Graph
A graph of the form $y = \log_b(x - h) + k$ has the vertical asymptote $x = -1$ and passes through $(0, 2)$ and $(1, 3)$. Find $b$, $h$ and $k$.
Use the asymptote: The asymptote is $x = h$, so $h = -1$ = $h = -1$
Use the key point (1 + h, k): $1 + h = 1 + (-1) = 0$, so the point $(0, 2)$ gives $k = 2$ = $k = 2$
Use the key point (b + h, 1 + k): $1 + k = 3$ matches the point $(1, 3)$, so $b + h = 1$ and $b = 1 - (-1)$ = $b = 2$
Write and check the equation: $y = \log_2(x + 1) + 2$. Check: $x = 1$ gives $\log_2 2 + 2 = 3$ = $y = \log_2(x + 1) + 2$
Answer: $y = \log_2(x + 1) + 2$, so $b = 2$, $h = -1$, $k = 2$.
Mistake: Shifting $y = \log_2(x - 3)$ three units to the left
Why: The minus sign looks like a move to the left, but the argument $x - 3$ must be positive, which means $x > 3$: the whole graph lies to the right of $x = 3$.
Correct: $y = \log_b(x - h)$ moves the graph $h$ units to the right. $y = \log_2(x - 3)$ has the asymptote $x = 3$.
Mistake: Letting the graph touch or cross the $y$-axis
Why: $\log_b 0$ and $\log_b$ of a negative number do not exist, because $b^y$ is always positive.
Correct: The graph of $y = \log_b x$ comes closer and closer to $x = 0$ but never reaches it. The domain is $x > 0$.
Mistake: Thinking the graph levels off at some height
Why: The curve rises slowly, so it looks flat, but it never stops rising: $\log_2 1024 = 10$ and $\log_2 1048576 = 20$.
Correct: A logarithmic graph has no horizontal asymptote. The range is all real numbers.
Mistake: Keeping the domain $x > 0$ after a horizontal shift
Why: The domain comes from the argument, not from $x$ itself.
Correct: For $y = \log_3(x + 5)$ the argument $x + 5$ must be positive, so the domain is $x > -5$.
Sound Level in Decibels
A sound level meter shows $L = 10 \log\left(\frac{I}{I_0}\right)$ decibels, where $\frac{I}{I_0}$ tells how many times stronger the sound is than the quietest sound we can hear. The graph is a stretched log curve: very flat for large intensities.
A sound $100$ times stronger than $I_0$ gives $L = 10 \log 100 = 20$ dB. A sound $10$ times stronger again gives only $30$ dB.
Binary Search in Computer Science
Binary search finds a name in a sorted list by halving the list again and again. For $n$ names it needs about $\log_2 n$ halvings, so the graph of the number of steps is the graph of $y = \log_2 x$.
A list of $8$ names needs $\log_2 8 = 3$ halvings: $8 \to 4 \to 2 \to 1$.
The pH Scale in Chemistry
Acidity is measured with $\text{pH} = -\log[H^+]$, where $[H^+]$ is the hydrogen ion concentration. The minus sign reflects the log graph across the $x$-axis, so the pH goes down when the concentration goes up.
Lemon juice has $[H^+] = 0.01 = 10^{-2}$, so $\text{pH} = -\log(10^{-2}) = 2$.
$y = \log_b x$ is the inverse of $y = b^x$: its graph is the reflection of $y = b^x$ across the line $y = x$
Key points of $y = \log_b x$: $\left(\frac{1}{b}, -1\right)$, $(1, 0)$ and $(b, 1)$
Domain $x > 0$, range all real numbers, vertical asymptote $x = 0$, no $y$-intercept
For $b > 1$ the graph increases; for $0 < b < 1$ it decreases
$y = \log_b(x - h) + k$ moves the graph $h$ right and $k$ up: asymptote $x = h$, domain $x > h$
A minus sign in front of the log reflects the graph across the $x$-axis; $\log_b(-x)$ reflects it across the $y$-axis
Q: Why does the graph never touch the $y$-axis?
A: On the $y$-axis $x = 0$, and $\log_b 0$ would need $b^y = 0$. A positive base raised to any power is positive, so no $y$ works. Near $x = 0$ the values get very large negative numbers (for $b > 1$), which is why the curve dives along the asymptote.
Q: Does the log graph have a horizontal asymptote like the exponential graph?
A: No. The exponential graph has the horizontal asymptote $y = 0$; after the reflection across $y = x$ it becomes the vertical asymptote $x = 0$. The log graph keeps rising (for $b > 1$), only very slowly.
Q: What do the graphs of $\log x$ and $\ln x$ look like?
A: Both have a base greater than 1 ($10$ and $e \approx 2.718$), so both increase, pass through $(1, 0)$ and have the asymptote $x = 0$. $\ln x$ passes through $(e, 1)$ and $\log x$ through $(10, 1)$, so $\ln x$ rises faster.
Q: How can I tell if a log graph increases or decreases?
A: Look at the base. If $b > 1$, the graph increases; if $0 < b < 1$, it decreases. A minus sign in front, as in $y = -\log_2 x$, also turns an increasing graph into a decreasing one.
Graphing Logarithmic Functions
1 / 14
Graphing Logarithmic Functions
Learn to graph logarithmic functions: key points, domain, range, the vertical asymptote, the mirror image of the exponential function and shifts.