# Graphs of Logarithmic Functions

Graphing and sketching logarithmic functions: a step by step tutorial. The properties such as domain, range, vertical asymptotes and intercepts of the graphs of these functions are also examined in details. Free graph paper is available.

## Review Properties of Logarithmic Functions

We first start with the properties of the graph of the basic logarithmic function of base a,
f (x) = log a (x) , a > 0 and a not equal to 1.
The domain of function f is the interval (0 , + ∞). The range of f is given by the interval (- ∞ , + ∞).
Function f has a vertical asymptote given by the vertical line x = 0. This function has an x intercept at (1 , 0) and f increases as x increases.
You may want to review all the above properties of the logarithmic function
interactively .

### Example 1

f is a function given by
f (x) = log2(x + 2)
1. Find the domain and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

Solution to Example 1
a - The
domain of f is the set of all x values such that x + 2 > 0
Solve the above inequality to obtain the domain: x > - 2
The
range of f is given by the interval (- ∞ , + ∞).

b - The
vertical asymptote is obtained by solving the equation: x + 2 = 0
which gives x = - 2
As x approaches -2 from the right (x > -2) , f(x) decreases without bound because there is a vertical asymptote. How do we know this?
Let us take calculate values of f as x approaches - 2 from the right (x > - 2).
f(-1) = log
2 (-1 + 2) = log2(1) = 0
f(-1.5) = log
2 (-1.5 + 2) = log2(1/2) = -1
f(-1.99) = log
2 (-1.99 + 2) = log2(0.01) which is approximately equal to  -6.64
f(-1.999999) = log
2 (-1.999999 + 2) = log2 (0.000001) which is approximately equal to  -19.93.
As we continue with values of x closer to -2, f(x) decreases without bound.

c - To find the
x - intercept we need to solve the equation f(x) = 0 or log2 (x + 2) = 0
Rewrite the above equation in exponential form
x + 2 = 2
0
Then simplify and solve for x.
x + 2 = 1
x = - 1
The x intercept is at the point (-1 , 0)
The
y intercept is at the point (0 , f(0)) = (0 , log2 (0 + 2)) = (0 , 1).

d - So far we have the domain, range, x and y intercepts and the vertical asymptote. We need more points.
Let us consider a point at x = -3/2 (half way between the x intercept and the vertical asymptote) and another point at x = 2.
f(-3/2) = log
2 (-3/2 + 2) = log2(1/2) = log2 (2-1) = -1.
f(2) = log
2 (2 + 2) = log2 (22) = 2.
We now have more information on how to graph f. The graph increases as x increases. Close to the vertical asymptote x = -2, the graph of f decreases without bound as x approaches -2 from the right. The graph never cuts the vertical asymptote. We now join the different points by a smooth curve.

Matched Problem to Example 1
f is a function given by
f (x) = log2 (x + 3)

1. Find the domain of f and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

### Example 2

f is a function given by
f (x) = - 3 ln(x - 4)

1. Find the domain of f and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

Solution to Example 2
a - The
domain of f is
the set of all x values such that x - 4 > 0
Solve the above inequality to obtain the domain
x > 4
The
range of f is given by the interval (- ∞ , + ∞).

b - The vertical asymptote is obtained by solving the equation
x - 4 = 0
Simplify and solve
x = 4
As x approaches 4 from the right (x > 4) , f(x) increases without bound. How do we know this?
Let us take some values:
f(5) = ln(5-4) = -3ln(1) = 0
f(4.001) = -3 ln(0.001) which is approximately equal to  20.72
f(4.000001) = - 3 ln(0.000001) which is approximately equal to  41.45

c - To find the x intercept we need to solve the equation f(x) = 0 or - 3 ln (x - 4) = 0
Divide both sides by -3 to obtain
ln(x - 4) = 0
Rewrite the above equation in exponential form
ln(x - 4) = e
0
Then simplify
x - 4 = 1
x = 5
The
x intercept is at the point (5 , 0)
The
y intercept is given by (0 , f(0)). f(0) is undefined since x = 0 is not a value in the domain of f.
There is no y intercept.

d - So far we have the domain, range, x intercept and the vertical asymptote. We need extra points to be able to graph f.
f(4.5) = -3ln(4.5 - 4) approximately equal to 2.08
f(8) = -3ln(8 - 4) approximately equal to - 4.16
f(14) = -3 ln(14 - 4) approximately equal to - 6.91
Let us now sketch all the points and the vertical asymptote. Join the points by a smooth curve and f increases as x approaches 4 from the right.

Matched Problem to Example 2
f is a function given by

f (x) = 2ln(x + 5)

1. Find the domain of f and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

### Example 3

f is a function given by
f (x) = 2ln(| x |)

1. Find the domain of f and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

Solution to Example 3
a - The
domain of f is the set of all x values such that | x | > 0.
Hence, the domain is the set of all real numbers except 0.
The
range of f is the interval (- ∞ , + ∞).

b - The vertical asymptote is obtained by solving |x | = 0
which gives
x = 0
As x approaches 0 from the right (x > 0) , f(x) decreases  without bound. How do we know this?
Let us take some values:
f(1) =2 ln(| 1 |) = 0
f(0.1) = 2 ln(0.1)  which is approximately equal to  -4.61.
f(0.0001) = 2 ln(0.0001) which is approximately equal to -18.42.
f(0.0000001) = 2 ln(0.0000001) which is approximately equal to -32.24.
As x approaches 0 from the left (x < 0) , f(x) decreases without bound. How do we know this?
Let us take some values:
f(-1) =2 ln(| -1 |) = 0
f(-0.1) = 2 ln(| -0.1 |) which is approximately equal to -4.61
f(-0.0001) = 2 ln(| -0.0001 |) which is approximately equal to -18.42
f(-0.0000001) = 2 ln(| -0.0000001 |) which is approximately equal to -32.24

c - To find the
x intercept we need to solve the equation f(x) = 0 or 2 ln(| x |) = 0
Divide both sides by 2 to obtain
ln(| x |) = 0
Rewrite the above equation in exponential form
| x | = e
0
Then simplify
| x | = 1
The solutions to the above equation are x = - 1 and x = 1. Hence two x intercepts at (1 , 0) and (-1 , 0)
The
y intercept is given by (0 , f(0)). f(0) is undefined since x = 0 is not a value in the domain of f. There is no y intercept.

d - So far we have the domain, range, x intercept and the vertical asymptote.
By examining function f, it is easy to show that this is an even function and its graph is symmetric with respect to the y axis. Why?
f(- x) = 2 ln(| -x |) = 2 ln(| x |) = f(x)
We now find extra points.
f(4) = 2ln(| 4 |) approximately equal to 2.77
f(0.5) = 2ln(| 0.5 |) approximately equal to - 1.39
Since f is even f(-4) = f(4) and f(-0.5) = f(0.5)
Let us now plot all the points, the vertical asymptote and Join the points by a smooth curve.

Matched Problem to Example 3
f is a function given by
f (x) = -2ln(x2)

1. Find the domain of f and range of f.
2. Find the vertical asymptote of the graph of f.
3. Find the x and y intercepts of the graph of f if there are any.
4. Sketch the graph of f.

## More References and Links to Logarithmic Functions and Graphing

Graphing Functions
Logarithmic Functions.
Graphs of Basic Functions.