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

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 ,
+inf). The range of f is the interval (-inf , +inf).

The symbol inf means infinity.

Function f has a vertical asymptote given by
x = 0. This function has an x intercept at (1 , 0). 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)

Find the domain of f and range of f.

Find the vertical asymptote of the graph of f.

Find the x and y intercepts of the graph of f if there are any.

Sketch the graph of f.

Answer to Example 1

a - The domain of f is
the set of all x values such that

x + 2 > 0

or x > -2

The range of f is the
interval (-inf , +inf).

b - The vertical
asymptote is obtained by solving

x + 2 = 0

which gives

x = -2

As x approaches -2 from the
right (x > -2) , f(x) decreases without bound. How do we know this?

Use properties of logarithmic
and exponential functions to write the above equation as

2log2 (x + 2) = 20

Then simplify

x + 2 = 1

x = -1

The x intercept is at
(-1 , 0).

The y intercept is
given by (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) = log2 (-3/2 + 2) = log2
(1/2) = log2 (2-1) = -1.

f(2) = log2 (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)

Find the domain of f and range of f.

Find the vertical asymptote of the graph of f.

Find the x and y intercepts of the graph of f if there are any.

Sketch the graph of f.

Example 2: f is a function given by

f (x) = -3ln(x - 4)

Find the domain of f and range of f.

Find the vertical asymptote of the graph of f.

Find the x and y intercepts of the graph of f if there are any.

Sketch the graph of f.

Answer to Example 2

a - The domain of f is
the set of all x values such that

x - 4 > 0

or x > 4

The range of f is the
interval (-inf , +inf).

b - The vertical
asymptote is obtained by solving

x - 4 = 0

or 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) = -3ln(0.001) which is approximately
equal to 20.72.

f(4.000001) = -3ln(0.000001) which is
approximately equal to 41.45.

c - To find the x
intercept we need to solve the equation f(x) = 0

-3ln(x - 4) = 0

Divide both sides by -3 to
obtain

ln(x - 4) = 0

Use properties of logarithmic
and exponential functions to write the above equation as

eln(x - 4) = e0

Then simplify

x - 4 = 1

x = 5

The x intercept is at
(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) = -3ln(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)

Find the domain of f and range of f.

Find the vertical asymptote of the graph of f.

Find the x and y intercepts of the graph of f if there are any.

Sketch the graph of f.

Example 3: f is a function given by

f (x) = 2ln(| x |)

Find the domain of f and range of f.

Find the vertical asymptote of the graph of f.

Find the x and y intercepts of the graph of f if there are any.

Sketch the graph of f.

Answer to Example 3

a - The domain of f is
the set of all x values such that

| x | > 0

The domain is the set of all
real numbers except 0.

The range of f is the
interval (-inf , +inf).

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) = 2ln(0.1) which is
approximately equal to -4.61.

f(0.0001) = 2ln(0.0001) which is
approximately equal to -18.42.

f(0.0000001) = 2ln(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) = 2ln(| -0.1 |) which is
approximately equal to -4.61.

f(-0.0001) = 2ln(| -0.0001 |) which is
approximately equal to -18.42.

f(-0.0000001) = 2ln(| -0.0000001 |) which is
approximately equal to -32.24.

c - To find the x
intercept we need to solve the equation f(x) = 0

2ln(| x |) = 0

Divide both sides by 2 to
obtain

ln(| x |) = 0

Use properties of logarithmic
and exponential functions to write the above equation as

eln(| x |) = e0

Then simplify

| x | = 1

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.

f( -x) = 2 ln(| -x |)

but

| -x | = | x |

and therefore

f( -x) = 2 ln(| x |) = f( x ),
this shows that f is an even function.

Let us 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 sketch all the
points, the vertical asymptote and Join the points by a smooth curve.