### Why logarithms? Two motivations

#### 1. Solving for a variable in the exponent

Suppose we try to solve this problem: How long will it take for the balance in a bank account bearing 5% annual interest to double in value?

We set problems like that up in the section on exponential functions. It looks like this:

Now substituting what we know, and setting Ao= 1 and A(t) = 2 to represent a doubling of value, we get:

\begin{align} 2 &= 1 \cdot (1 + 0.05)^t \\ 2 &= 1.05^t \end{align}

. . . but now we're stuck. The variable for which we're trying to solve is in the exponent and we don't yet have a way to get it out. The answer is logarithms, which are the inverse functions to exponential functions.

#### 2. Original motivation: multiplying large numbers

Around the turn of the 1600s, astronomers and other scientists were beginning to make strides in searching large data sets for mathematical patterns that would eventually lead to important discoveries about many physical phenomena like gravity and planetary orbits.

What held back the pace of that work was the need to multiply large numbers. Do you remember how to multiply two six-digit numbers?

John Napier (1550-1617) found a solution to this time problem by noticing that if two numbers represented aspowers of the same base were multiplied, the act of multiplying is really just reduced to addition:

$$x^m \cdot x^n = x^{m + n}$$

Here's a crude example of what Napier did. Imagine that we pick some base, say three, and make a table of powers of three:

Now let's say we want to multiply 729 x 2187. The table makes it easy, and we do it in three steps:

1. Look up the exponents of 729 and 2187; they're 6 and 7, respectively.
2. Add the exponents: 6 + 7 = 13
3. Look up the resulting exponent in the table and copy down the number, a power of our base, that goes with it: 729 x 2187 = 1,594,323

The table of logarithms, just a list of powers of a common base, allowed us to do this multiplication very quickly. At a time still about 250 years from the invention of the computer, Napier's table was immensely valuable.

Now Napier went much farther than our little table. He wrote tables that included decimal exponents so that a great many numbers could be multiplied. He called the exponents of his common base (a little larger than 1) logarithms.

So those are two motivations for using logarithms or "logs" and logarithmic functions. Logs are no longer needed to do multiplication because we have computers for that, but they are still necessary for our first purpose above. Now let's define them a little better.

### Writing and understanding logarithm expressions

We write a logarithm (or just "log") expression like this:

We read a log expression like this in a kind of roundabout way, something that we're stuck with, a longstanding convention. You should memorize how to read a log expression. It will help you to solve simple log equations, like the ones below, in your head.

Make sure you understand all of these equations and their solutions. The last one is tricky, right? Don't forget your negative and fractional exponents!

### Log functions and exponential functions are inverses.

Now let's look at the logarithm of an exponential function, making sure the the logarithm has the same base as the exponential.

Notice that the end effect of taking logb(f(a)) is like taking f-1(f(a)). We just get the input to the function, a, back, untouched.

If we buy that log and exponential functions (of the same base) are inverses of each other, then it's also true that:

Now that's a little more difficult to wrap your brain around, I get it. Yet this is a very important property of logs, so get used to it.

### Logarithms are exponents

Notice that in our equation

A is the power of the base b that gives the result C, so a logarithm is actually just an exponent. That means we can create a series of laws of logarithms that mirror the laws of exponents.

This will lead us to the laws of logarithms in the table below.

#### Properties of logs

Study the table closely and you'll see how the properties of logs mirror the properties of exponents. These will be crucial for solving all kinds of problems in exponential and logarithmic functions.

### The most common bases:   10   &   e

The two most commonly-used bases in math and science are 10, the base of the common logs, and  e, the base of the natural logs.

Common logs, say the common log of x, are written as log(x), omitting the base, like

Omitting the base of 10 is just a way to save time when writing common logs. When you see a log written with the base omitted, like log(7), you should assume that the base is 10.

The base of the natural logs is the transcendental number, e. Instead of writing natural logs as loge(x), we write ln(x). This is sometimes pronounced "LON x" or "LINE x" or "L-N-X" or L-N of x," but "natural log of x" is fine.

Finally, just as we do in trigonometry, where we often omit the parenthesis in "sin(x)" and just write "sin x," we often write "log x" and "ln x" instead of "log(x)" and "ln(x)." It's just a common time saver. Just remember: You need to be clear about what's being put into the log function and what is not.

#### Bases of logs

The base of the common logs is 10. The common log of x is written as log(x)
or just log x.

The base of the natural logs is e. The natural log of x is written as ln(x) or just ln x.

### Solving problems with logs

For these two examples, you might want to review the exponential functions section.

### Example 1

At an annual interest rate of 8%, how long will it take an initial deposit, left untouched in an account, to double in value?

Solution: We use the formula for simple interest, A(t) = Ao (1 + r)t. If we set A(t) = 2 and Ao = 1, that's a fine representation of doubling in value ($1 to$2). Notice that it wouldn't matter if we set A(t) = $10,000 and Ao =$5,000; one is double the other and that's all that matters – so why not use the simpler numbers?

The rate is r = 0.08, so we get

$$2 = 2((1 + 0.08)^t \; \; \text{ or } \; \; 2 = 1.08^t$$

Now our variable is in the exponent, so we need logs to "release" it. We can take a log of any flavor we like, as long as we do it on both sides. Let's use the natural log:

$$ln(2) = ln(1.08)^t$$

Now by the laws of logs that's

$$ln(2) = t \, ln(1.08)$$

Now it's easy to solve for t by plugging logs into a calculator:

$$t = \frac{ln(2)}{ln(1.08)} = 9 \; years$$

So at an interest rate of 8% per year, it will take about 9 years for your money (if you don't add any more or withdraw any) to double in value.

### Example 2

At what rate of continuous growth will a population grow by 10% in 5 years?

Solution: We begin with the formula for continuous growth: P(t) = Po ert, where P(t) and Po are the population at time t and time t = 0, respectively, r is the growth rate and t is the time in years.

Now let P(t) = 1.1 and Po = 1 to represent growth by 10% with simple numbers. The time is 5 years, so we need to find the rate r in the equation

$$1.1 = e^{5r}$$

We use the properties of logs, making sure to use the natural log here because of the presence of e:

$$ln(1.1) = ln(e^{5r})$$

to get

$$ln(1.1) = 5r \, ln(e)$$

(That last step is tricky – look back at the laws of logs above, especially the third one) Now we recognize that ln e = 1. In other words, e1 = e,

$$ln(1.1) = 5r$$

and finally, we can solve for the rate:

$$r = \frac{ln(1.1)}{5} = 1.9%$$

So at a population growth rate of 1.9% per year, a population will grow 10% larger in 5 years.

### Practice problems 1

 1 If a population grows continuously at a rate of 2.5% per year, how long will it take that population to double in size? 2 A bank account that has interest compounded quarterly increases in value by 10% in 3 years. Calculate the interest rate on the account. 3 It takes 24,100 years for a sample of 239Pu to decay to ½ its original mass. Assuming a continuous model of decay (e-based), calculate the annual rate of decay of this dangerous radioactive isotope.

### Logs in science: pH, pK and log scales

"p"

In the sciences, especially chemistry, we use logs frequently to reduce numbers with large exponents to manageable numbers. For example, when we discuss acids and bases, we often work with concentrations between 1 and 10-10 moles per liter. That's a broad range, 10 orders of magnitude, in fact. (An order of magnitude is a power of 10).

Here's how we simplify the numbers. The concentration of an acid is measured by the number of moles of H+ ions per liter of solution. Let's say that concentration is 1 x 10-5 moles per liter. We take the negative base-10 log of the concentration,

-log (10-5) = 5

to find a small number that represents that concentration and therefore how acidic the solution is.

We call that number the pH, and in chemistry, the letter "p" simply stands for "take the negative base-ten log of."

In chemistry, the pH scale is a sliding scale between 0 and 14:

We also use p for equilibrium constants, where pK's (like pKa & pKb) are more convenient to use.

#### Log-scale graphs

We also often employ log scales to represent data that cover a broad range of values.

Here are two graphs of the same data. The top graph has the usual x-y axes, but in the bottom graph, the log of each y value is plotted against its x-value.

The result is a simpler-looking graph that's easy to understand, and it reveals some behavior that was hidden in the non-log graph. We just have to remember that we're looking at a log graph, where the y-axis range can cover several orders of magnitude.

### Example 1

log2 (x) = 5

To solve a problem like this, just read the log statement as shown above. Here we read the statement as "2 raised to the power of 5 gives x." Clearly the answer is 32. In other words, 5 is the exponent of 2 that gives 32.

### Example 2

log3 81 = x

The answer is 4: 34 = 81

### Example 3

log3 82 = x

OK, now this one is trickier because 82 is not a nice even power of 3. Here we resort to the calculator. On fancy calculators you can do base-3 logs, but on many, there is no such feature — because you don't need it. We can use natural or common logs to solve such problems using the change of base formula, but we'll have to derive it first:

#### Change of base formula

Let's take a log equation: loga C = x and say that a is not 10 and not e, but some other base. If we raise both sides of that equation as a power of a (remember that loga x and ax are inverses!), we get

then using the inverse property of logs, this is really c = ax. If we take the common log of both sides, like this:

,

we convert the right side (laws of logs again) to

Now isolate x

and recall that x = loga C from the first line of this derivation, which gives us the change of base formula:

So if we have a log in an odd base, we can just use a calculator and take the log of the argument (C) and divide it by the log of the "old" base. It works just as well, of course, with natural logs.

... so back to our example. Now it's simple, just divide log(82) by log(3) OR divide ln(82) by ln(3). Try it. They both give 4.01.

### Example 4

Express   $f(x) = log(4x - 3) - log(3x^2)$   as a single log.

This kind of problem relies on the laws of logs, in this case the log of a quotient. When you see one log subtracted from another, you should think quotient, and vice versa.

This function translates to

\begin{align} f(x) &= log(4x - 3) - log(3x^2) \\ \\ &= log \left( \frac{4x - 3}{3x^2} \right) \end{align}

### Example 5

Solve for x:   $ln(x^2 ) + ln(x^5) + ln(x^3) = 10$

This is an interesting example that makes use of the exponentiation property of logs. We apply that rule to each of the log terms to get

$$2 ln(x) + 5 ln(x) + 3 ln(x) = 0$$

Then we just add up all of the ln(x)'s and solve to get

$$10 \ln(x) = 10 \; \rightarrow \; ln(x) = 1 \; \rightarrow \; x = 0$$

### Example 6

Solve for x in:   $9^{x+10} + 3 = 84$

This problem is an opportunity to show you a very common pitfall in solving this kind of log and exponential problems. What's often done is something like this:

Here's the trouble. We can't just take a log of each term:

We always have to remember that functions do not distribute: f(a + b) ≠ f(a) + f(b).

The correct way to solve these problems is to shoot for having a single term on each side of the equal sign. In this case, just move the 3 to the right:

$$9^{x + 1} = 83 - 3$$

Then take a log on each side (remember that log( ) is s function) and use the exponential property of logs to get

\begin{align} log(9^{x + 1}) &= log(81)\\ \\ (x + 1) \cdot log(9) &= log(81) \end{align}

Finally, rearrange, using the subtraction/division property of logs to solve the problem:

\begin{align} x + 1 &= \frac{log(81)}{log(9)} \\ \\ x &= 0.954 - 1 = -0.046 \end{align}

### Example 7

Solve for x in   $log(x) + log (8) = 10$

Here's another good opportunity to point out a common pitfall, much like the one in example 5 above. The first instinct of a lot of students is to just raise both sides of the equation as a power of 10 to "cancel" the logs, like this:

Here's the trouble. We can't just raise every individual term as a power of any base:

Here again, f(x) = 10x or g(x) = bx are functions, and we have to remember that functions do not commute: f(a + b) ≠ f(a) + f(b).

One way to solve this problem is to recognize that a sum of logs is just the log of a product, and to rearrange like this:

\begin{align} log(x) + log(8) &= 10 \\ \\ log(8x) &= 10 \end{align}

Now we can raise each side (one term on each side) as a power of 10, the obvious choice for a common (base 10) log:

\begin{align} 10^{log(8x)} &= 10^{10}\\ \\ 8x &= 10^{10} \end{align}

Now the solution is easy, just divide both sides by 8, and the answer is ... some very large number:

$$x = \frac{10^{10}}{8}$$

### Practice problems 2

Solve the following expressions for x:

 1 $log_5(2x + 4) = 2$ 2 $log(x) = 1 - log(x - 3)$ 3 $2\,log_9(\sqrt{x}) - log_9(6x - 1) = 0$ 4 $log_2(x^2 - 6x) = 3 + log_2(1 - x)$ 5 $log(x) + log(x - 1) = log(3x + 12)$ 6 $log_4(x + 3) = 2$
 7 $ln(10) - ln(7 - x) = ln(x)$ 8 $log(x - 1) - log(x + 1) = 1$ 9 $ln(x) + ln(2x - 1) = 2$ 10 $5\cdot ln(x) = 12$ 11 $log(4x + 2x^2) = log(3x^2)$ 12 $log_2(3x) = 4.5$

Convert each of the following expressions to a single logarithm.   (w, x, y, z > 0)

 13 $ln(3x + 1) + 2ln(x)$ 14 $log(x) + 2log(y) - \frac{1}{2}log(z)$ 15 $\frac{1}{3} log(w) + 3log(x) - 5log(y)$
 16 $ln(10) - ln(7 - x) - ln(x)$ 17 $log(x - 1) - log(x + 1)$ 18 $ln(x) + ln(2x - 1)$

xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.