12.3 – Logarithmic Functions

Learning Objectives

  • (12.3.1) – Define logarithmic functions
    • Convert between logarithmic and exponential forms
  • (12.3.2) – Evaluate Logarithms
    • Evaluate logarithms without a calculator
    • Define and evaluate natural logarithm
    • Define and evaluate common logarithm
  • (12.3.3) – Graph logarithmic functions
    • Identify the domain of a logarithmic function
Photo of the aftermath of the earthquake in Japan with a focus on the Japanese flag.

Figure 1. Devastation of March 11, 2011 earthquake in Honshu, Japan. (credit: Daniel Pierce)

In 2010, a major earthquake struck Haiti, destroying or damaging over 285,000 homes.[1] One year later, another, stronger earthquake devastated Honshu, Japan, destroying or damaging over 332,000 buildings,[2] like those shown in the picture above. Even though both caused substantial damage, the earthquake in 2011 was 100 times stronger than the earthquake in Haiti. How do we know? The magnitudes of earthquakes are measured on a scale known as the Richter Scale. The Haitian earthquake registered a 7.0 on the Richter Scale[3] whereas the Japanese earthquake registered a 9.0.[4]

The Richter Scale is a base-ten logarithmic scale. In other words, an earthquake of magnitude 8 is not twice as great as an earthquake of magnitude 4. It is 1084=104=10,0001084=104=10,000 times as great! In this lesson, we will investigate the nature of the Richter Scale and the base-ten function upon which it depends.

In the last section, we defined inverse functions, logarithmic functions are the inverse of an exponential functions, and sometimes understanding this helps us make sense of what a logarithm is.

(12.3.1) – Define Logarithmic Functions

In order to analyze the magnitude of earthquakes or compare the magnitudes of two different earthquakes, we need to be able to convert between logarithmic and exponential form. For example, suppose the amount of energy released from one earthquake were 500 times greater than the amount of energy released from another. We want to calculate the difference in magnitude. The equation that represents this problem is 10x=50010x=500, where xx represents the difference in magnitudes on the Richter Scale. How would we solve for xx?

We have not yet learned a method for solving exponential equations. None of the algebraic tools discussed so far is sufficient to solve 10x=50010x=500. We know that 102=100102=100 and 103=1000103=1000, so it is clear that xx must be some value between 2 and 3, since y=10xy=10x is increasing. We can examine a graph to better estimate the solution.

Graph of the intersections of the equations y=10^x and y=500.

Figure 2

Estimating from a graph, however, is imprecise. To find an algebraic solution, we must introduce a new function. Observe that the graph above passes the horizontal line test. The exponential function y=bxy=bx is one-to-one, so its inverse, x=byx=by is also a function. As is the case with all inverse functions, we simply interchange xx and yy and solve for yy to find the inverse function. To represent yy as a function of xx, we use a logarithmic function of the form y=logb(x)y=logb(x). The base bb logarithm of a number is the exponent by which we must raise bb to get that number.

We read a logarithmic expression as, “The logarithm with base bb of xx is equal to yy,” or, simplified, “log base bb of xx is yy.” We can also say, “bb raised to the power of yy is xx,” because logs are exponents. For example, the base 2 logarithm of 32 is 5, because 5 is the exponent we must apply to 2 to get 32. Since 25=3225=32, we can write log232=5log232=5. We read this as “log base 2 of 32 is 5.”

We can express the relationship between logarithmic form and its corresponding exponential form as follows:

logb(x)=yby=x,b>0,b1logb(x)=yby=x,b>0,b1

Note that the base bb is always positive.
Think b to the y equals x.

Because logarithm is a function, it is most correctly written as logb(x)logb(x), using parentheses to denote function evaluation, just as we would with f(x)f(x). However, when the input is a single variable or number, it is common to see the parentheses dropped and the expression written without parentheses, as logbxlogbx. Note that many calculators require parentheses around the xx.

We can illustrate the notation of logarithms as follows:
logb (c) = a means b to the A power equals C.

Notice that, comparing the logarithm function and the exponential function, the input and the output are switched. This means y=logb(x)y=logb(x) and y=bxy=bx are inverse functions.

Definition of the Logarithmic Function

A logarithm base bb of a positive number xx satisfies the following definition.

For x>0,b>0,b1x>0,b>0,b1,

y=logb(x) is equivalent to by=xy=logb(x) is equivalent to by=x

where,

  • we read logb(x)logb(x) as, “the logarithm with base bb of xx” or the “log base bb of xx.”
  • the logarithm yy is the exponent to which bb must be raised to get xx.

Also, since the logarithmic and exponential functions switch the xx and yy values, the domain and range of the exponential function are interchanged for the logarithmic function. Therefore,

  • the domain of the logarithm function with base b is(0,)b is(0,).
  • the range of the logarithm function with base b is(,)b is(,).

Convert between logarithmic and exponential forms

In our first example we will convert logarithmic equations into exponential equations.

Example

Write the following logarithmic equations in exponential form.

  1. log6(6)=12log6(6)=12
  2. log3(9)=2log3(9)=2

In the following video we present more examples of rewriting logarithmic equations as exponential equations.

How To: Given an equation in logarithmic form logb(x)=ylogb(x)=y, convert it to exponential form.

  1. Examine the equation y=logbxy=logbx and identify bb, yy, and xx.
  2. Rewrite logbx=ylogbx=y as by=xby=x.

Think About It

Can we take the logarithm of a negative number? Re-read the definition of a logarithm and formulate an answer.  Think about the behavior of exponents.  You can use the textbox below to formulate your ideas before you look at an answer.

Convert from exponential to logarithmic form

To convert from exponents to logarithms, we follow the same steps in reverse. We identify the base bb, exponent xx, and output yy. Then we write x=logb(y)x=logb(y).

Example

Write the following exponential equations in logarithmic form.

  1. 23=823=8
  2. 52=2552=25
  3. 104=110,000104=110,000

In the next video we show more examples of writing logarithmic equations as exponential equations.

(12.3.2) – Evaluate Logarithms

Knowing the squares, cubes, and roots of numbers allows us to evaluate many logarithms mentally. For example, consider log28log28. We ask, “To what exponent must 2 be raised in order to get 8?” Because we already know 23=823=8, it follows that log28=3log28=3.

Now consider solving log749log749 and log327log327 mentally.

  • We ask, “To what exponent must 7 be raised in order to get 49?” We know 72=4972=49. Therefore, log749=2log749=2
  • We ask, “To what exponent must 3 be raised in order to get 27?” We know 33=2733=27. Therefore, log327=3log327=3

Even some seemingly more complicated logarithms can be evaluated without a calculator. For example, let’s evaluate log2349log2349 mentally.

  • We ask, “To what exponent must 2323 be raised in order to get 4949? ” We know 22=422=4 and 32=932=9, so (23)2=49(23)2=49. Therefore, log23(49)=2log23(49)=2.

In our first example we will evaluate logarithms mentally (without a calculator).

Example

Solve y=log4(64)y=log4(64) without using a calculator.

In our first video we will show more examples of evaluating logarithms mentally, this helps you get familiar with what a logarithm represents.

In our next example we will evaluate the logarithm of a reciprocal.

Example

Evaluate y=log3(127)y=log3(127) without using a calculator.

How To: Given a logarithm of the form y=logb(x)y=logb(x), evaluate it without a calculator.

  1. Rewrite the argument xx as a power of bb: by=xby=x.
  2. Use previous knowledge of powers of bb identify yy by asking, “To what exponent should bb be raised in order to get xx?”

Define and evaluate natural logarithm

The most frequently used base for logarithms is [latex]e[/latex]. Base [latex]e[/latex] logarithms are important in calculus and some scientific applications; they are called natural logarithms. The base e logarithm, loge(x)loge(x), has its own notation, ln(x)ln(x).

Most values of ln(x)ln(x) can be found only using a calculator. The major exception is that, because the logarithm of 1 is always 0 in any base, ln1=0ln1=0. For other natural logarithms, we can use the lnln key that can be found on most scientific calculators. We can also find the natural logarithm of any power of e using the inverse property of logarithms.

A General Note: Definition of the Natural Logarithm

A natural logarithm is a logarithm with base e. We write loge(x)loge(x) simply as ln(x)ln(x). The natural logarithm of a positive number xx satisfies the following definition.

For x>0x>0,

y=ln(x) is equivalent to ey=xy=ln(x) is equivalent to ey=x

We read ln(x)ln(x) as, “the logarithm with base ee of xx” or “the natural logarithm of xx.”

The logarithm yy is the exponent to which ee must be raised to get xx.

Since the functions y=exy=ex and y=ln(x)y=ln(x) are inverse functions, ln(ex)=xln(ex)=x for all xx and eln(x)=xeln(x)=x for x>0x>0.

In the next example, we will evaluate a natural logarithm using a calculator.

Example

Evaluate y=ln(500)y=ln(500) to four decimal places using a calculator.

In our next video, we show more examples of how to evaluate natural logarithms using a calculator.

Define and evaluate common logarithm

Sometimes we may see a logarithm written without a base. In this case, we assume that the base is 10. In other words, the expression loglog means log10log10  We call a base-10 logarithm a common logarithm. Common logarithms are used to measure the Richter Scale mentioned at the beginning of the section. Scales for measuring the brightness of stars and the pH of acids and bases also use common logarithms.

Definition of Common Logarithm: Log is an exponent

A common logarithm is a logarithm with base 10.  We write log10(x)log10(x) simplify as log(x)log(x).  The common logarithm of a positive number, xx, satisfies the following definition:

For x>0x>0

y=log(x)y=log(x) is equivalent to 10y=x10y=x

We read log(x)log(x) as ” the logarithm with base 10 of xx” or “log base 10 of xx“.

The logarithm y is the exponent to which 10 must be raised to get xx.

Example

Evaluate log(1000)log(1000) without using a calculator.

Example

Evaluate y=log(321)y=log(321) to four decimal places using a calculator.

In our last example we will use a logarithm to find the difference in magnitude of two different earthquakes.

Example

The amount of energy released from one earthquake was 500 times greater than the amount of energy released from another. The equation 10x=50010x=500 represents this situation, where xx is the difference in magnitudes on the Richter Scale. To the nearest thousandth, what was the difference in magnitudes?

(12.3.3) – Graph 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=bxy=bx for any real number x and constant b>0b>0, b1b1, where

  • The domain of xx is (,)(,).
  • The range of yy is (0,)(0,).

In the last section we learned that the logarithmic function y=logb(x)y=logb(x) is the inverse of the exponential function y=bxy=bx. So, as inverse functions:

  • The domain of y=logb(x)y=logb(x) is the range of y=bxy=bx:(0,)(0,).
  • The range of y=logb(x) is the domain of y=bxy=bx: (,)(,).

How To: Given a logarithmic function, identify the domain.

  1. Set up an inequality showing the argument greater than zero.
  2. Solve for xx.
  3. Write the domain in interval notation.

In our first example we will show how to identify the domain of a logarithmic function.

Example

What is the domain of f(x)=log2(x+3)f(x)=log2(x+3) ?

Here is another example of how to identify the domain of a logarithmic function.

Example

What is the domain of f(x)=log(52x)f(x)=log(52x)?

Creating a graphical representation of most functions 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=2500e0.05tA=2500e0.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? Figure 1 shows this point on the logarithmic graph.

A graph titled,

Figure 1

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=logb(x)y=logb(x) along with all its transformations: shifts, stretches, compressions, and reflections.

We begin with the parent function y=logb(x)y=logb(x). Because every logarithmic function of this form is the inverse of an exponential function with the form y=bxy=bx, their graphs will be reflections of each other across the line y=xy=x. To illustrate this, we can observe the relationship between the input and output values of y=2xy=2x and its equivalent x=log2(y)x=log2(y) in the table below.

x –3 –2 –1 0 1 2 3
2x=y2x=y 1818 1414 1212 1 2 4 8
log2(y)=x –3 –2 –1 0 1 2 3

Using the inputs and outputs from the table above, we can build another table to observe the relationship between points on the graphs of the inverse functions f(x)=2x and g(x)=log2(x).

f(x)=2x (3,18) (2,14) (1,12) (0,1) (1,2) (2,4) (3,8)
g(x)=log2(x) (18,3) (14,2) (12,1) (1,0) (2,1) (4,2) (8,3)

As we’d expect, the x– and y-coordinates are reversed for the inverse functions. The figure below shows the graph of f and g.

Graph of two functions, f(x)=2^x and g(x)=log_2(x), with the line y=x denoting the axis of symmetry.

 Notice that the graphs of f(x)=2x and g(x)=log2(x) are reflections about the line y=x.

Observe the following from the graph:

  • f(x)=2x has a y-intercept at (0,1) and g(x)=log2(x) has an x-intercept at (1,0).
  • The domain of f(x)=2x, (,), is the same as the range of g(x)=log2(x).
  • The range of f(x)=2x, (0,), is the same as the domain of g(x)=log2(x).

A General Note: Characteristics of the Graph f(x)=logb(x)

For any real number x and constant b>0, b1, we can see the following characteristics in the graph of f(x)=logb(x):

  • domain: (0,)
  • range: (,)
  • x-intercept: (1,0) and key point (b,1)
  • y-intercept: none
  • increasing if b>1
  • decreasing if [latex]0
Two graphs of the function f(x)=log_b(x) with points (1,0) and (b, 1). The first graph shows the line when b>1, and the second graph shows the line when 0<b<1.

Figure 3

Figure 3 shows how changing the base b in f(x)=logb(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 e2.718.)

 

Graph of three equations: y=log_2(x) in blue, y=ln(x) in orange, and y=log(x) in red. The y-axis is the asymptote.

Figure 4. The graphs of three logarithmic functions with different bases, all greater than 1.

In our first example we will graph a logarithmic function of the form f(x)=logb(x).

Example

Graph f(x)=log5(x). State the domain, range.

How To: Given a logarithmic function with the form f(x)=logb(x), graph the function.

  1. Plot the x-intercept, (1,0).
  2. Plot the key point (b,1).
  3. Draw a smooth curve through the points.
  4. State the domain, (0,), the range, (,).

Summary

The base b logarithm of a number is the exponent by which we must raise b to get that number. Logarithmic functions are the inverse of Exponential functions, and it is often easier to understand them through this lens. We can never take the logarithm of a negative number, therefore logb(x)=y is defined for b>0.

Knowing the squares, cubes, and roots of numbers allows us to evaluate many logarithms mentally because the logarithm is an exponent.  Logarithms most commonly sue base 10, and often use base e. Logarithms can also be evaluated with most kinds of calculator.

To define the domain of a logarithmic function algebraically, set the argument greater than zero and solve. To plot a logarithmic function, it is easiest to find and plot the x-intercept, and the key point(b,1).