Graphing logarithmic functions (example 2) | Algebra 2 | Khan Academy
This is a screenshot from an exercise on Khan Academy. It says the interactive graph below contains the graph of y is equal to log base 2 of x as a dashed curve, and you can see it down there is that dashed curve with the points (1, 0) and (2, 1) highlighted. Adjust the movable graph to draw y is equal to 4 times log base 2 of x plus 6 minus 7.
So if you happen to have this exercise in front of you, I encourage you to do that. Or if you're just thinking about it in your head, think about how you would approach this. And I'll give you a hint: to go from our original y is equal to log base 2 of x to all of this, it's really going to be a series of transformations.
On this tool right over here, what we can do is we can move this vertical asymptote around, so that's one thing we can move. Then we can also move two of these points. So where we're starting is right over there, and so let's see, and that was just the graph of y is equal to log base 2 of x.
So let's just do these transformations one at a time. The first thing I am going to do instead of just doing log base 2 of x, let's do log base 2 of x plus 6. So if you replace your x with an x plus 6, what is it going to do? Well, it's going to shift everything six to the left. If that doesn't make intuitive sense to you, I encourage you to watch some of the introductory videos on shifting transformations.
So everything is going to shift 6 to the left. This vertical asymptote is going to shift 6 to the left. Instead of being at x equals 0, it's going to go all the way to x equals negative 6. This point right over here which was at (1, 0) is going to go 6 to the left: 1, 2, 3, 4, 5, 6. This point which was at (2, 1) is going to go 6 to the left: 1, 2, 3, 4, 5, 6.
So so far, what we have graphed is log base 2 of x plus 6. The next thing we might want to do is: what is 4 times log base 2 of x plus 6? One way to think about it is whatever y value we were getting before, we're now going to get 4 times that. So when x is equal to -5, we're getting a y value of 0, but 4 times 0 is still 0, so that point will stay the same.
But when x is equal to -4, we're getting a y value of 1. But now that's going to be four times higher because we're putting that four out front, so instead of being at one, it's going to be at four. So this right over here is the graph of y is equal to log base 2 of x plus 6.
Then the last thing we have to consider is: well, we're going to take all that and then we're going to subtract 7 to get to our target graph. So whatever points we are here, we are now going to subtract 7. This is at y equals 0, but now we're going to subtract 7. So we're going to go down one, two, three, four, five, six, seven.
I went off the screen a little bit, but let me see if I can scroll down a little bit so that you can see that. See? Almost there! There you go! Now you can see I moved this down from 0 to -7. Then this one has to move down seven: one, two, three, four, five, six, and seven.
And we're done! There you have it, that is the graph of y is equal to 4 times log base 2 of x plus 6 minus 7, and we are done.