1.5: Logarithms and Exponential Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
In this section, we will discuss logarithmic functions and exponential functions. The exponent rules we learned last section also apply to the exponents we see in exponential functions, so here we will focus on the relationship between exponential and logarithmic functions. As we mentioned previously, these functions are inverses of each other, in the same sense that square roots and squaring are inverses of each other.
Logarithmic functions and exponential functions are both used to describe many applications such as population growth and value of investments over time. Logarithmic are very prevalent in later courses like differential equations, so a solid understanding of their properties now will help you prepare for these later courses.
1.5.1: The Relationship Between Logarithmic and Exponential Functions
We saw earlier that an exponential function is any function of the form f(x)=bx, where b>0 and b≠1. A logarithmic function is any function of the form g(x)=logb(x), where b>0 and b≠1. It is no coincidence that both forms have the same restrictions on b because they are inverses of each other. This means that, for the same value of b, blogb(x)=x for x>0 and logbbx=x.
We also discussed two commonly used logarithmic functions that have special notation. The logarithmic function f(x)=log(x) is a special way of writing f(x)=log10(x) and g(x)=lnx is a special way of writing g(x)=loge(x). These also have special names; log(x) is called the common logarithm and ln(x) is called the natural logarithm. Note that e is just a number: e≈2.71828; e is an irrational number, just like π, meaning it can’t be written as a fraction of whole numbers.
Let’s look at some concrete examples to help illustrate this relationship. Let’s look at b=2. For b=2, f(x)=2x. Then, we can see that f(3)=23=8. Since they are inverse functions, g(8)=log2(8)=3. In general this is explained as:
If a=bc, then c=logb(a).
Another way of thinking about it is to use the question “y is b raised to what power?” when you see logb(y). For example, when we see log2(16), we ask “16 is 2 raised to what power?” Through a bit of guess and check we get 21=2, 22=4, 23=8, and 24=16. This tells us that 2 raised to the 4th power gives us 16, so log2(16)=4. Let’s look at a few more examples.
Example 1.5.1: Evaluating Logarithmic Functions
Evaluate each of the following statements:
1. log3(9)4. log2(2)2. log3(19)5. log2(12)3. log9(3)6. log21
Solution
We’ll work on these one at a time.
- For this statement, we are answering the question “9 is 3 raised to what power?” We can see through a little bit of trial and error that 32=9, so we get that
log3(9)=2 - For this statement, we are answering the question “19 is 3 raised to what power?” We saw in the previous question that log3(9)=2 which gives us a hint that our answer is related to 2, but that we need 32 to be in the denominator. Since 3−2=19, we get that
log3(19)=−2 - For this statement, we have a different base. Here our base is 9, so we are answering the question “3 is 9 raised to what power?” You may recognize that √9=3; we saw in our last section that another way of writing √9 is 91/2. This tells us that
log9(3)=12 - For this statement, we are answering the question “2 is 2 raised to what power?” We can quickly see that 21=2, so we get that
log2(2)=1 - For this statement, we are answering the question “12 is 2 raised to what power?” This one is a bit tricky, but we’ve seen something similar in question 2. In question 2, we saw that because we had a fraction with a power of 3 (the base we were working with) in the denominator, that our final answer was negative. Here if we try 2−1, we get 12. This tells us that
log2(12)=−1 - For this statement, we are answering the question “1 is 2 raised to what power?” We know our answer can’t be a positive integer because 2 raised to a positive integer gets bigger, and we know it can’t be a negative integer since 2 raised to a negative integer gives numbers less than 1. Let’s see what happens if we try zero: 20=1, so we have that
log2(1)=0
We recommend looking through these questions and identifying patterns. When did we get a positive answer? When did we get a negative answer? When did we get a fractional answer? Can you try out some similar problems and see if your answers fit the patterns you identified? We didn’t have any answers that were negative fractions; can you come up with such a problem? Notice that all of our questions had positive inputs; it is not possible to find an answer with a negative input. Why? Let’s think back to the question we asked for each problem above. If we try to evaluate log2(−2) we would ask “-2 is 2 raised to what power?” Is there an exponent, say x, where 2x=−2? No! We can’t take a positive number and raise it to a power and end up with a negative number.
1.5.2: Logarithm Rules
We have five main rules that we will need to use when working with logarithms. These rules are all based off of the rules we have for exponents. Be sure to be careful of the details in each of these rules; in some of them all of the logarithms have the same base, but in others the base changes to show the relationship between different logarithmic functions. As we have already seen, the base plays a big role in the specific meaning of the function, so be aware of the rules that have the same base everywhere and the rules where the base changes. Additionally, remember that every base must be positive and not equal to one; also, all inputs must be positive.
-
logb(xa)=alogb(x)
-
logb(xy)=logb(x)+logb(y)
-
logb(xy)=logb(x)−logb(y)
-
loga(b)=1logb(a)
-
logb(x)=logc(x)logc(b)
All of these rules can be used in either direction; you can start with the form on the left and rewrite as the form on the right or you can start with the form on the right and rewrite as the form on the left. We won’t explain all of these in detail, but we will illustrate examples for the first two.
With the first rule, we can get insight from the question we used earlier to evaluate our logarithms. We’ll look at a concrete example rather than a general case. Suppose we want to evaluate log2(84). Before we get to our question, let’s rewrite this a bit. We can write log2(84)=log2((23)4) since 8=23. Next, we can use our exponent rules to get log2((23)4)=log2(212). Now, answering our question “ 212 is 2 raised to what power?,” we get 12. So, overall, we have log2(84)=12. Now, working on the other side, we have 12=4×3=4log2(8)
The second rule also follows from exponent rules. Let’s take a look:
log2(23)+log2(24)=3+4 from the definition of log base 2=7=log2(27)=log2(23×24) from our exponent rules
We illustrated each of these rules using some easy to work with values, but they are true for all values, as long as we have a positive base that is not one and avoid negative inputs. The other rules can all be illustrated in similar ways. (Note: you may want to try to come up with your own examples for these rules to help you understand why these rules are true.) Let’s look at an example where we put these rules to use.
Example 1.5.2: Combining Logarithms
Write 5log2(x)+3log2(2y) as a single logarithm.
Solution
Currently, this term is the sum of two logarithms, both with the same base, and we want to write it as a single logarithm. It looks like we may want to start with the second rule, logb(xy)=logb(x)+logb(y). It looks like we are already in the form on the right side. However, there is one issue. Currently, both of our logarithms are multiplied by a constant, and the second rule doesn’t have coefficients on the logarithms. We’ll need to use the first rule to move these coefficients inside of the logarithms before we use the second rule. We get
5log2(x)+3log2(2y)=log2(x5)+log2((2y)3)=log2(x5)+log2(8y3)=log2[(x5)(8y3)]=log2(8x5y3)
5log2(x)+3log2(2y)=log2(8x5y3)
Sometimes we will want to go in the opposite direction and split a single logarithm into the sum or different of many logarithms. Let’s take a look at an example.
Example 1.5.3: Splitting Logarithms
Expand ln(2x3y3wz5) into the sum and/or difference of multiple logarithms.
Solution
Here, we want to rewrite as many simpler logarithms. First, we see that the logarithms has a quotient inside, so we can use the third rule to split it:
ln(2x3y3wz5)=ln(2x3y3)−ln(wz5)
Now, we have products inside of both terms, so we can use the second rule to split these:
ln(2x3y3)−ln(wz5)=ln(2)+ln(x3y3)−ln(wz5)=ln(2)+ln(x3)+ln(y3)−ln(wz5)=ln(2)+ln(x3)+ln(y3)−[ln(w)+ln(z5)]=ln(2)+ln(x3)+ln(y3)−ln(w)−ln(z5)
Now, for the last step, we can bring the exponents to the outside of each term, giving us
=ln(2)+3ln(x)+3ln(y)−ln(w)−5ln(z)
Notice that we were careful to use parentheses around ln(wz5) when we split it because of the negative sign. In the original form we are dividing by w and by z3 so we need to make sure both of these terms are subtracted when we split the logarithms. Also, we did not evaluate ln(2). Since ln(2) is really loge(2) and 2 is not made by raising e to an integer or fraction, ln(2) is a non-repeating decimal. This means it is better to leave ln(2) in our answer than to use a calculator to evaluate it because this form is more precise. This means that our final answer is
ln(2x3y3wz5)=ln(2)+3ln(x)+3ln(y)−ln(w)−5ln(z)
1.5.3: Solving Exponential Statements
Logarithms are also used to solve exponential statements, statements where the variable is part of an exponent. When solving an exponential statement, we first need to isolate the exponential term. Once we have isolated the exponential term, we can take a logarithm of both sides. We don’t want to take just any logarithm, we want to use a logarithm that has the same base as the exponent so that we can easily simplify our final answer. After we have taken a logarithm of both sides, we can use our logarithm rules to bring the exponent (which has the variable) outside of the logarithm so that we can solve for the variable. Let’s take a look.
Example 1.5.4: Solving an Exponential Statement
Solve 53x−1−2=0 for x.
Solution
First, we will need to isolate the exponential term, 53x−1. Then, we will take log base 5 of both sides since the exponent has 5 as its base.
53x−1−2=053x−1=2log5(53x−1)=log5(2)
Now, we will use our logarithm rules to bring x outside of the logarithm. This gives
(3x−1)log5(5)=log5(2)(3x−1)(1)=log5(2)3x−1=log5(2)3x=log5(2)+1x=log5(2)+13
Notice that when we brought the exponent outside of the logarithm, we kept the entire exponent inside of parentheses. This is to make sure that we do not incorrectly distribute terms. Additionally, notice that our final answer still includes a logarithm term. This is because log5(2) does not evaluate to a “nice” number, so it is more precise to write our final answer this way rather than using a calculator or computer to evaluate that term. Our final answer is
53x−1−2=0 solves to give x=log5(2)+13
Notice that in this example, we end up with log5(5) as part of our work. We know that this simply evaluates to 1. This is why we used log base 5, and not a different logarithm. Any logarithm would allow us to solve for x, but using log base 5 makes it easier to simplify our final answer.
Sometimes you will need to solve for a statement that has two exponential terms. When this happens, you may be able to employ a useful technique to solve. Let’s take a look at an example.
Example 1.5.5: Solving an Exponential Statement
Solve 42y+1=2y−1 for y.
Solution
With these types of problems, we want to look at both bases and see if they are related in any way. Here, we have a base of 2 on the right and a base of 4 on the left. You’ll probably notice that 4=22; we can use this to our advantage when solving. Let’s start by rewriting our statement using this fact.
42y+1=2y−1(22)2y+1=2y−122(2y+1)=2y−124y+2=2y−1
Notice that we are using our exponent rules here, specifically the rule (xa)b=xab. This allows us to rewrite the statement so that both terms have the same base. Since the two terms have the same base and are equal to each other, we know that they must have equal exponents. This gives us
4y+2=y−13y=−3y=−1
42y+1=2y−1 solves to give y=−1
We could solve this problem without using this technique. We would want to take either log base 2 of both side or log base 4 of both sides. Then, we would need to use logarithm rules to simplify and bring the y terms outside of the logarithm before we solve. Both methods result in the same answer; you can practice your logarithm skills by using this alternative method and comparing your final answer to the one above; they should be identical.
1.5.4: Solving Logarithmic Statements
A logarithmic statement is a statement in which the variable of interest is an input to a logarithm. As we know, logarithms and exponential functions are closely related, so it’s no surprise that we will use exponential functions to help solve logarithmic statements. Here, we will again use the fact that they are inverse functions, as shown by our definition of a logarithm. Let’s look at an example.
Example 1.5.6: Solving a Logarithmic Statement
Solve log5(2x+3)=2 for x.
Solution
Here, the logarithm is already isolated on one side, so we can start off by using the definition of logarithms shown in equation (???) to remove the logarithm from our equation.
log5(2x+3)=2, then, from our definition,2x+3=522x+3=252x=22x=11
log5(2x+3)=2 solves to give x=11
Remember when working with either logarithms or exponential functions that they are strongly tied together: when solving a logarithmic statement we need to use exponents and when solving exponential statements we need to use logarithms.