ma008 ยป

# Notes for Lesson 31: Logarithmic Functions

Contents

## Bacteria Dying Off

In the last lesson, we saw that some things can grow and decay exponentially. We explored things like this with functions of the form y equals a to the x and y equals a to the negative x. But, exponential functions can also be multiplied by constants, just like we saw with different forms of interest. For a continuously compounded interest for example, we looked at the equation a A equals P times e to the rt. Where P is the amount of money invested, the principal, r is the rate of interest per year written as a decimal, and t is the time in years that the money's been invested for. Another example of a function that fits this form is the way that bacteria die off when a drug is administered. In this case, P represents the initial amount of what we're starting with, which this time is the number of bacteria, r this time is the decay rate of how quickly the bacteria die off, and t here is the time period we're considering measured in hours. So for example, if the starting number of bacteria is 1,000 and the rate at which they decay or die off is negative 0.5. What is the function B of t for the number of bacteria alive after t hours? Please write it in here.

## Bacteria Dying Off

We know that B of t is in the form P times e to the rt. In the problem, we found out that P equals 1,000, and r equals negative one half, or negative 0.5. Let's plug those numbers in. That gives us the equation B of t equals 1,000 e to the negative 0.5t. Let's take a look at what this graph looks like for this function. The graph for this function looks like this. The horizontal axis represents t, the number of hours that have passed. And the vertical axis represents B of t, the number of bacteria that are remaining. We can see we have a nice exponential decay curve.

## Bacteria Declining

Now let's see how many bacteria are alive after some hours of treatment. Please find B of 0, B of 1, the number of bacteria left after 1 hour, and B of 2, the number left after yet another hour has passed. You can use a calculator to work these out and please round to the nearest integer since we are calculating bacteria after all.

## Bacteria Declining

For B of 0, I just plug 0 for t into our function. Since e to the 0 is 1, you just have 1000 times 1 or a 1000. This is what we would expect, since this is a starting value of the number bacteria. And, as we just calculated, it's the value when t equals 0. We're off to great start. Plugging in 1 for t, we end up with 1000 times e to the negative point 5. My calculator tells me 606.53, and I'll round that to 607. So after 1 hour has passed, almost 400 bacteria have died. Plugging in 2 for t gives us an exponent of negative 1. My calculator tells me that's about 367.87, rounding a bit already. Which if we round to the nearest integer gives us 368. After another hour only 220 more bacteria have died. But that makes sense when we look at the graph over here. We can tell that as we move further to the right the graph is getting less steep. So it's less steep between the values of t 1 and 2 than it is between 0 and 1.

## Fewer than 5 Bacteria

You've seen how many bacteria are left after one hour and after two hours but now I would like you to work out how many hours it will be before there are fewer than 5 bacteria left. Now, we haven't directly covered this but think about different things you could do to get an approximate answer. This zoomed in version of our graph might help you or maybe you could try another method. Also, please round your answer to the nearest hour.

## Fewer than 5 Bacteria

One way to solve this problem is to look at the graph and see that it's between there are fewer than 5 bacteria remaining. Now, if you wanted to get a more accurate answer, you could use the method like we used when we were finding zeros using the intermediate value theorem. You could plug in two values of t into the function that you can tell on either side of the point we're looking for. So maybe like, t equals 15 and t equals 5. Then you could zoom in closer and closer to the point by considering smaller and smaller intervals in time. But this is really time-consuming. If only there were a quicker method.

## Switch the Input and Output

In the previous video, you saw that you could use this graph by checking the y values and reading off the corresponding x values to find different points. But wouldn't it be easier if the value that we've been using for y were actually the input and the value we were reading off was the output instead? We actually already know about this sort of thing. Which of these terms down here best describes what we're looking for? Is it the composition of B of t, the inverse of B of t, the reflection of B of t in the y-axis, the reflection of B of t in the x-axis, or the y-intercept of B of t? Please consider this the x-axis and this the y-axis for the purposes of this question.

## Switch the Input and Output

We are looking for reflection but it's not in the x-axis or in the y-axis. It's in the line y equals x. That means that we're looking for the inverse of B of t.

## Logarithms

We know that we want to find the inverse of B of t equals 1,000 e to the -.5t. Which we know is going to be the reflection of that graph line y equals x. So, that means we're looking for the equation this graph right here. This is B of t and this is B inverse of t. Well let's think about how we might want to do this. While we could divide both sides by 1000, and then maybe we could take the t root, of both sides. That will get rid of the t on the right hand side, in the exponent. But we would still have an exponent of t over here. since we know that the t root is the same as taking this to the one over the t power. So that's not going to help without that at all. We actually need a totally new idea to solve this problem. And that ideas named by a Scottish mathematician named John Napier discovered in 1614. His discovery was something called a logarithm or just a log. We'll look at some simpler examples first log and then come back to this example about bacteria once we have all the tools we need to deal with it.

## The Inverse of an Exponential Function

Let's try to build up some intuition about the inverses of exponential functions. Let's use f of x equals 2 to the x as an example to play with. We're going to think about how the input and outputs of this function, and its inverse, are related. So, here's the graph of f of x equals 2 to the x. Just like you've seen many times before. And then reflected in the line y equals x, we see its inverse, which for now we're just calling f inverse of x. We know that if we input 3 to the function f, we'll get the output 8, and that means that if we input 8 into the function f inverse, We'll get an output of 3. We know this, because we know that x and y has switched position in our inverse functions. To find out more about our functions, f and f inverse, I'd like you to fill out this table. For each value over here, fill in the corresponding value over here. These are inputs of f, and these are outputs of f. Which means these are outputs of f inverse, and these should be inputs of f inverse.

## The Inverse of an Exponential Function

The outputs of f for each of these inputs are each of these numbers, 1, 2, 4, values for x in 2 to the x. That means that on our function f of x equals 2 to the x, we have the points 0,1, 1,2, 2,4 and so on. And that also means that for the function f inverse, we have the opposite points, 1,0, 2,1, 4,2 and so on. We're definitely learning a lot about these two functions and how they're related.

## Relating Output to Input

So what does this tell us about the inverse f of x equals 2 to the x? Well, let's just pick one of these pairs of values down here to examine a little bit closer. From the table, we knew that f inverse of 8 equals 3. So for this inverse function, which of these statements is true? The output is half the input, the output is the square root of the input, the output is the base when the exponent is 2, or the output is the exponent when the base is 2.

## Relating Output to Input

This last choice is correct. The output is the exponent when the base is 2. If we have input 8, then we can write 8 equals 2 to the 3. And the output is 3.

## Cycling Function Machines

We mentioned logs before, so let's actually use them now. Just like exponents have a base, so do logs. If, for example, like in this function we have here, our exponent has a base of 2, then so does the log that is its inverse. Let's plug a number in and try something out. We know that for this function, f of 3 is equal to 2 to the 3rd, or just 8. Using logs, this means that log base 2 of unfamiliar, that's not a big deal at all. Don't worry. We'll keep working with these, and you'll come to understand them very well in a short period of time. Now, we can see more clearly what's going on here if we rewrite this 8. We can instead put 2 to the 3rd there, and this shows what's really happening. We know that log base 2 is the inverse of what's happening here. And we can see here that it really is undoing what happened to the original 3, that input. With a function f, we input 3 and it output 8. When we input that number, the output, into the log function, in other words, when we took log base 2 of 8, the output was the original input. This inverse function, this log function, undid to the When we input 3 into our exponential function, it spits out 2 to the 3rd. Then when we use 2 to the 3rd as the input for the logarithmic function, that's the inverse of the exponential one The output is three again. Similarly if we use three as the input for a logarithmic function the exponential function undoes what the log does. In other words two to the power of log base two of three. Is equal to 3. This is just confirmed, that these two inverse functions behave just like other inverse functions. F of F inverse of X, gives us X and F inverse of F of X, gives us X. So, here's a couple for you to try, on your own. What is Log base 2 of 16? And what is log base two of 64. Giving you a little hint for how to think about these, try to rewrite 16 as two, two some power. What power belongs here? And how does that effect what number goes over here? Maybe you can think about this one in the same way.

## Cycling Function Machines

undoing to the 4 what this exponential function, 2 to the 4th, did to it. So that means taking it out of the exponent. That gives us 4. Log base 2 of 64 can also be written as log base 2 of 2 to the 6th, which means that this is just 6.

## Simplify the Logs

I have a couple more problems that I'd like you to try out. What is log based 2 of 2 and what is log based 2 of 1?

## Simplify the Logs

We can rewrite 2 in exponential form as 2 to the 1st power, which means that log base 2 of 2 to the 1 is just 1. Interesting. If we want to rewrite 1 as 2 to some power, it's 2 to the 0. So it looks like log base 2 of 2 to the 0 should be 0. These are definitely some special values.

## Log of a Fraction

Now, here's a bit of a trickier one. How can you write 1 half as a power of 2? Try to think about that and then see what answer that gives you for log base 2 of 1 half.

## Log of a Fraction

Back at the beginning of the course, we worked a lot with exponents. So, if you remember that well, then great. But if not, let's look at a certain pattern. We know that 2 to the 2nd power is four, and we know that 2 to the 1st power is 2, the numbers over here. So, if we need to halve 1, to get 1 half, which is what we're looking for, then we need to decrease this exponent one more time. So that means that 1 half should be equal to 2 to the negative 1. That means we can write log base 2 of 1 half as log base 2 of 2 to the negative 1. That just gives us negative 1.

## Logs of Base 4

I think it's time to try a new base. How about 4? What do you think log base 4 of 16 is? Think first about how you can rewrite 16 as 4 to some power. Thinking along those same lines, what is log base 4 of 4 and what is log base 4 of 2?

## Logs of Base 4

To get 16, we need to square 4. So log base 4 of 4 to the 2 should be 2. 4 to the 1 is equal to 4, so this should be 1. And the way we get 2 is by taking 4 to the one half power. That definitely is a little bit tricky. So this should be one half. Remember, taking the square root of something is the same as taking it to the one half power.

## Logs on a Calculator

I think it's time to switch things up a bit and see some numbers that can't be written as rational powers of the base. We're also going to pick a new base to work with, log base 10, which is one of the most convenient bases to use because there's a button on calculators for it. In fact, I'd like you to use your calculator to do these problems. You'll probably be able to figure out a few of them on your own without the calculator, but it makes sense to use it just to make sure that the buttons work the way you think they do. In fact, on many calculators and sometimes in textbooks and other places, instead of seeing log base 10. You'll just see the word log without a base written, this usually means log base 10. In fact, let's look and see what my calculator has on it. Sure enough, there's just a button that says log with no base. This is log base favorite number as you know, so let's try that. You can see I press log, and then enter the number that I'm looking for. Close the parentheses for good measure and press equals and there we go, a long decimal. I'm going to try another just to humor myself. How about log base 10 of 2,314? Why not? There we go. So here are a bunch of log base 10 problems for you to figure out. I'll demo one on the calculator just to make sure that it's working like we think it's going to. To find log base 10 of 1 if I didn't want to use the calculator, I'd rewrite 1 as 10 to the 0. So that means this should give us 0. Let's make sure our calculator's working the way we think it is. So to find log base 10 of Great. Now you get plenty of chances to try this out on your own.

## Logs on a Calculator

I could figure these first three out on my own without a calculator, just by using the method we've been using. I rewrote each of the numbers we wanted to take the log base 10 of as 10 to some power. 1 is 10 to the 0, so that gave us of 100 equals 2. However, I don't know how to write the number 2 or the number calculator, let's try one of them out. How about the first one? So, log base 10 of 2 equals this long decimal. I'm going to round to the fifth decimal place. Entering the last two problems on the calculator, gives me long decimals as well. Log base 10 of 20 is 1.30103, about. And log base 10 of 200 is about

## Patterns of Logs

Lets reflect for a second on the problems that you just solved. Look closely at the answers here, can you see any similarities between different answers? What's the relationship between 2 and 200 and the what's the relationship between the log of these 2 numbers? Do you see a pattern anywhere? I'd like you to think about this for a moment and we'll look into it further in a later lesson. There is something pretty cool going on though.

## Log of 0

Now you've had some time to play around with logs. So, let's get back to thinking about how to graph them. We're going to need to think about their domain and range and any special points on the graph. So to get closer to doing that, I have a question for you, and that question is. What do you think will happen if we try to find log base 10 of 0? I'll give you some choices. Your options are, it's 0. It's 1. Are you trying to trick me? 0 isn't in the domain of f of x, equals 10 to the x, so it can't be in the domain of log base 10 of x. Or finally, are you trying to trick me? 0 isn't in the range of f of x equals 10 to the x, so it can't be in the domain of log base 10 of x.

## Log of 0

This last choice is correct. There's no value of x that lets 10 to the x equal base 10 of x is the inverse of this function f, it can't be in the domain of log base 10 of x. That means that we can't find log base 10 of 0. This value is just undefined.

## Domain and Range

Since we've been talking about points on these curves, let's graph them. Here's the graph of f of x equals 10 to the x and here's the curve of g of x equals log base 10 of x. Since these two functions are inverses, there's a link between their domains and their ranges. Using interval notation, I'd like you to find the domain of f and the range of g and the range of f and the domain of g.

## Domain and Range

We know we can plug any number for x into an exponential function, like 10 to the x. So that means that the domain of f is negative infinity to infinity or all the real numbers. This also, then, is the range of g. We know that no matter what number we plug in for x, in 10 to the x, this function cannot reach none inclusive. This is also the domain of g. This brings up something really important to know about logs. The input to a log must be greater than 0. It is not possible to find the log of a negative number. This is a super important point and we definitely need to keep it in mind as we keep working with logs in the future.

## Common Point

Since we are on the topic of graphs, let's just look at a bunch of different graphs of log functions. Here we have f of x equals log based 2 of x, f of x equals log based 4 of x, f of x equals log based 10 of x, and finally, f of x equals log based e of x. Here, the base is that special number e that we mentioned before. What I would like to know right now is what point all of these paths go through?

## Common Point

The all go through the point 1,0, as we can see right here. Each of them has the same x intercept. It doesn't matter what base we use, whether it's 2, 4, gives us the point, 1,0. This corresponds to the point 0,1 on the exponential function graph, since as we saw before, a to the 0 is always equal to 1 regardless of what a is, unless it's 0, since 0 to the 0 is not defined. Just a note, whenever the base is e, we don't usually write log base e. Instead, we usually write the letters ln. You should have a button that says this on your calculator.

## Base Values

Since the base of a log corresponds to the base of an exponential function, what values is it allowed to take on? Let's say that the base of a log is a. Could a be all real numbers? All positive real numbers? All positive real numbers except 1? All non-negative real numbers? Or all non-negative real numbers except 1?

## Base Values

For an exponential function of the form f of x equals a to the x, we know that a must be greater than 0 and not equal to 1. We know that log functions are the inverses of exponential functions. So the same must be true for the base a of a log. That means this last answer is correct. We can check that 0 and 1 don't work though for a. If we plug in 1 here, remember we end up with. F of x equals doesn't have an inverse. The same will be true if a equaled 0.

## Vertical Asymptote

Let's talk more about the general shape of a logarithmic function. Now, it's a bit hard to tell, but none of these graphs here have a horizontal asymptote. This is similar to how it was hard to tell if that exponential function didn't have a vertical asymptote. It was just growing so fast and getting steeper and steeper. In the same way, since logs are the inverses of exponential functions, they start to grow more and more slowly as x increases. f of x equals log base a of x does however have a vertical asymptote and it's the same for all of these graphs. What is it?

## Vertical Asymptote

As we can tell from each of the graphs over here, the vertical asymptote of all functions of this form, is the y-axis. X equals 0. That's why this value, x equals 0, is not part of the domain of this function.

## Log Function Behavior

Let's put together a bunch of the information we've just been talking about. To do that, I'd like you to complete this sentence properly, or rather, these two sentences. The graph of any function of the form f of x equals log base a of x is continuously either increasing or decreasing, on the either domain or range zero to infinity, and has either domain or range negative infinity to infinity. It has a vertical or horizontal asymptote of what and passes through which point?

## Log Function Behavior

The graph of any function of the form f of x equals log base a of x is continually increasing on the domain 0 to infinity. And it has a range from negative infinity to infinity. It has a vertical asymptote of x equals 0, the y axis. And it passes through the point 1,0.

## Inverses of Logs

And finally, let's find the inverse of a couple of logarithmic functions. What is the inverse of f of x equals log base 2 of x? And what is the inverse of f of x equals log base 10 of x?

## Inverses of Logs

The inverse of f of x equals log base 2 of x is f inverse of x equals 2 to the x. The base of the logarithmic function becomes the base of the exponential one. If we have f of x equals log based 10 of x, then that means that f inverse of x equals 10 to the x. Again, they have the same base.

## Natural Log

Because the number e is so common in nature, such as with population growth and decay for example. Log base e, as I mentioned earlier, gets a special notation. Instead of writing log base e of x, we would write this. This is called the natural log of x. Thinking about this definition of natural log or ln, what is its inverse?

## Natural Log

If f of x, equals ln x, or a natural log of x, then f inverse of x, equals, e to the x. Remember, natural log is log base e. So e must be the base of the inverse's exponent.

## Composing Logs and Exponents

Let's say we have f of x equals log based 10 of x and f inverse of x equals 10 to the x. But what happens if we take the composition of these functions? What does f inverse of f of x look like? Now, since these functions are inverses, you should already know what goes in this final box.

## Composing Logs and Exponents

If you're looking for f inverse of f of x, then in the place of x in the function 10 to the x, we need to plug in log base 10 of x. That's going to give us 10 to the power of log base 10 of x. We know that since these are inverses, that will just equal x. Putting this in the exponent undoes what the log did to x.

## e to the Natural Log

What is e to the natural log of x equal to?

## e to the Natural Log

Since e taken to a power and natural log are inverses, e to the natural log of x should just give us x. We can visualize this again like we did earlier. We plug in x to natural log, we end up with natural log of x. If we make the exponent of e natural log of x, then we get x again. This also works if we reverse the cycle.

## Find the Exponent

We're going to look at how to solve an equation involving exponents by using logs. And then, we'll apply that knowledge later to the bacteria example we were working with at the beginning of this lesson. But first by thinking about how exponents work, what is x in this equation? We have 10 to the x equals 1 million. This might not seem super difficult but it's always good to know beforehand what we're expecting, when we try out a new method as sort of a sanity check for ourselves.

## Find the Exponent

Since 1 million equals 10 to the 6th, we actually have 10 to the x equals 10 to the 6th. That means that x must equal 6. Okay, so now, we know this answer, so we'll know what we're looking for when we use our new method. Great.

## Inverse of an Exponential

Now, that we've solved this equation one way. Let's try and solve it using logs. Now, using a log as an operator is a little bit different from the way other operators work. We still have to do the same thing to both sides of the equation, but we're not multiplying by log. What we're doing is we're using each side of the equation as the input to the log function. And because it is a function, when the inputs are the same, their outputs will be the same as well. Now, since on the left side here, we have the function 10 to the x and we want to get x by itself. We want to find the inverse of f of x equals 10 to the x. So what base log do you think we'll need to use?

## Inverse of an Exponential

We need to use a log of base 10. That's log base 10 or just log, as it might look in your calculator.

## Take the Log of Both Sides

So let's actually use our log base 10 as an operator now. We know we have to apply it to both sides, so please fill in each side of the equation we had before, as the input to the log functions.

## Take the Log of Both Sides

Since we're applying log base 10 to both sides, we'll just have log base 10 of

## Simplify Both Sides

Now because log is the inverse of the exponentional, what do you think the left-hand side here is equal to? To figure out how to simplify the right-hand side, use the log button on your calculator.

## Simplify Both Sides

On the left hand side we just get x. Since log base 10 is undoing 10 to the x. My calculator gives me 6 for the right hand side. So great, we go exactly what we did before, x equals 6.

## Five Bacteria

Now we'll finally return to our bacteria example which you remember was about how many bacteria will still be alive after a time t since a drug was administrated. In order to solve an equation we can only have one variable but right now we have two. B and t. We want the number of bacteria to be 5. So, if we set the number of bacteria equal to 5, what does this equation become? Remember, that means we need to substitute in 5, in place of the variable that represents the number of bacteria.

## Five Bacteria

B is the number of bacteria, so we need to substitute in b equals 5. That will give is the equation 5 equals 1,000 times e to the negative 0.5 t.

## Solve for x

So that it's easier to see what you're doing, let's place e to the negative you to solve for x. What is it equal to?

## Solve for x

To isolate x, we need to divide both sides of our equation by 1,000. So x equals 5 over 1,000.

## Inverse of e

Now that we have something that x is equal to, let's substitute back in for x. Remember, x equals e to the negative point five t. So, that means that e to the negative point five t equals five over 1,000. Now, the log, which is the inverse of e has a special notation. Do you remember what it is? If you need to, you can check your calculator for a hint about what it might be.

## Inverse of e

The inverse of e is natural log which we write as ln, This is really just log base e.

## Natural Log of Both Sides

We can use the natural log function, ln, just like we've used other logs before. We substitute each side of the equation into it. Please write what belongs in each of these sets of parentheses and then simplify the left hand side to remove the natural log.

## Natural Log of Both Sides

The first thing we need to do is just substitute each side of the equation into our log operators or our natural log operators rather. Taking the natural log of each side gives us natural log of e to the negative 0.5t equals natural log of 5 over 1000. We can simplify the left hand side by remembering that natural log and e taken to an exponent are inverse operations. Or inverse functions. That means that all that's left on the left hand side is negative 0.5t. For now, let's just keep the right hand side the same.

## Solve for t

We are so close to solving this equation. By doing the same thing to each side of the equation, and using a calculator, please solve this equation for t.

## Solve for t

The first thing that we need to do to isolate t is to divide both sides by negative 0.5. When we do that we get t equals the natural log of 5 over 1000 divided by negative 0.5. Now it's time to bring back my calculator. And here it is. Let's plug this right hand side in to see what number we get. So, first you'll take the natural log, using this ln key of 5 divided by 1000. Then I want you to divide that by negative 0.5. I press equals and, voila. We have there only to be 5 bacteria left.

## Transforming a Log Function

We can also transform our logarithmic functions in the same way that we have moved other functions around. How about we start with this function f of x equals log base 2 of x. First try graphing the transformed function f of x equals log base 2 of x plus 2. Take a second to do this right now. After you've taken a second to do that, please fill in the words in the sentence. To properly describe the transformation that happened was the shift of vertical or horizontal one, in which direction did it happen and by how many units.

## Transforming a Log Function

To get from function f of x equals log base 2 of x, to the function f of x equals log base 2 of x plus 2. We need to shift the original function up, which is a vertical shift, by 2 units. So here's a different look at the graph of f of x equals log base 2 of x and just above it. The graph of the transformed function, f of x equals log base 2 of x plus 2. And sure enough, we can tell that for every x value the graph up here, the transformed one, is 2 units above the original.

## Shifting Logs

To round things out, let's have one last quiz on transforming logarithmic functions. So here's a graph you've seen before, f of x equals log base 4 of x. Starting with this function, what function will we get if we did a reflection in the y axis? And second, what function will we get if we shifted f of x three units to the left?

## Shifting Logs

To reflect the function F of X in the Y axis, we need to replace X in the original funtion with negative X. This gives us G of X equals log base 4 of negative X. Note that we need parentheses around negative X to show that both the negative sine and the x have the log operator applied to them. To shift f of x three units to the left, we need to replace x with x plus 3. That gives us h of x equals log base four of x plus 3. Once again, our parentheses are super important here. Think about what would happen if they weren't there. That would mean that the plus 3 was outside of the log part of the function. What would the graph look like then?