 In section 4.4 in our lecture series math 12-10 calculus one, we're gonna start talking, well not star, we've talked about it before, but we're gonna talk some more about so-called indeterminate forms. These were things of the form zero over zero or infinity over infinity. There's a few other ones, but these are the ones we're gonna talk about in this video. We call them indeterminate forms because this form itself is insufficient to determine what is the limit. Because we've seen examples where we get zero over zero and that could be one, it could be infinity, it could be negative infinity, it could be zero, it could be pi, it could be undefined. We need some more information. And the thing is indeterminate forms show up all the time in calculus. In fact, every derivative is an indeterminate form. When you take the limit of a difference quotient, they always have the form zero over zero. So maybe it comes as no surprise that we can use derivatives to help alleviate indeterminate forms we come across, right? We began this lecture series talking about limits, essentially. We use limits to define derivatives, again, as limits of difference quotients. So the study of derivatives will eternally be grateful to the study of limits. But Lopital's rule is a way of derivatives to kind of pay back our debt to limits. Using derivatives can help us calculate limits. And let me give you some examples of why that is. Suppose we wanna evaluate the limit as x approaches one of the natural log of one over x minus one. The natural log of x is a continuous function on its domain. x minus one is a continuous function. It's a linear function. If we just naively plug in x equals one, we're gonna get the natural log of one over one minus one. The one minus one at the bottom is concerning because it gives us a zero, but the natural log of one is likewise zero. And so you get this indeterminate form zero over zero. What is this limit? Does the limit exist? What is it? In many situations when we got zero over zero, we were able to do some type of algebraic trick like rationalizing the numerator or clearing fractions or just foiling to help us simplify the difference quotient. But in this situation, what do you do with the natural log to cancel out the x minus one of the denominator? It seems a little bit too difficult. This would be a situation where we have to, you start using squeeze theorem arguments. We'd have to find functions that bound the natural log of x over one. And that can be a difficult process as we've seen previously in this lecture series. It turns out L'Hopital's rule provides a very simple way of dealing with this limit calculation. The same also is true as you take limits as x goes to infinity. Again, if we just plug in x equals infinity, we're gonna get the natural log of infinity over infinity minus one, which if you play with that dark magic of arithmetic and infinity, we're gonna get the denominator's infinity, right? It's subtracting one from the infinite is nothing. But the natural log also, as x goes to infinity, the natural log of x will go towards infinity. It grows at a much slower rate, mind you, than just as x minus one, but still you get infinity over infinity. What do you do with such a thing like this? Again, with L'Hopital's rule, we'd probably have to do some type of squeeze theorem argument because algebraic methods are insufficient to help a transcendental function like the natural log of x. But hey, let's look at some limits as x went to infinity that we've seen before. Let's consider the limit as x approaches infinity of x squared minus one over two x squared plus one. This we've learned is equal to one half, okay? But if we just plug in infinity, we end up with infinity squared minus one over two infinity squared plus one. It simplifies to be infinity over infinity. So we've seen that indeterminate forms can be equal to exact values like one half and the process to avoid this indeterminate form is some type of algebraic maneuver. So we've seen situations where algebra allowed us to evaluate indeterminate forms, but that algebra can be tedious. Then there's examples like we saw above, which are these transcendental functions which algebra is insufficient because by the name a function is transcendental if its methodology transcends what algebra can do for us. In which case you have to take some powerful tools like the squeeze theorem to help you out here. Well, that's no longer gonna be the case for us because of L'Hopital's rule. L'Hopital's rule named after the French mathematician, L'Hopital, who popularized this technique in what essentially was the first calculus textbook, at least the first Western calculus textbook. It's not that L'Hopital first came up with this technique but oftentimes the person who gets the credit is the one who popularizes. And the first again, essential calculus textbook we can in the West is due to L'Hopital here. And so L'Hopital's rule says the following. If let f and g be functions and let a be a real number or it could be an infinite number, a is plus or minus infinity here. If the limit as x approaches a of f is zero and the limit as x approaches a of g of x is zero or the limit as x approaches a of f of x is infinite plus or minus infinity don't care and the limit as x approaches a of g of x is infinite. Then, so there's sort of two options. One option is that the limits of f and g are both zero. The other option is that the limits of f and g are both infinity. That's okay. So we have those two options. If those two assumptions are satisfied, let f, then also if f and g are differentiable functions then the limit as x approaches a of f prime of x over g prime of x is equal to L. That'll be the same limit as x approaching a of f of x over g of x equals L as well. And likewise, if this limit where you take the ratio of their derivatives, if that limit doesn't exist then it means this limit doesn't exist as well. And so if this function, excuse me, if this limit has an indeterminate form, basically saying if f of x over g of x has the indeterminate form zero over zero or infinity over infinity you can take the derivative of the top and the bottom. You kind of simplify the fraction by taking derivatives of the top and bottom. Kind of like what we hoped the quotient rule of derivatives would be f prime divided by g prime but it's not. You can take the derivative of the top and the bottom and then that limit will be the limit of the original expression. Let me show you some examples here. It's an awesome technique. You love L'Hopital's rule very, very quickly if you feel at all in love with derivative calculations. Let's consider the limit as x approaches one of the natural log of x over x minus one. This has the indeterminate form, right? Like we saw before, you get the natural log of one over one minus one. This gives you zero over zero. Because you have this indeterminate form we can apply L'Hopital's rule. Now one thing I'm often gonna do is that whenever I'm using L'Hopital's rule I always put a L'H on top so that you see that these limits are equal to each other because of L'Hopital's rule. We're gonna take the limit as x approaches one that value stays the same. We're gonna take the derivative of the natural log over the derivative of x minus one with respect to x. Which the derivative of the natural log doesn't be one over x. The derivative of x minus one is just gonna be a one for which then when you simplify this thing, this expression, you're just gonna get one over x. Now you'll notice in this situation if you plug in x equals one, you end up with one over one which then gives you the limit is equal to one. And so that's a really nice calculation. We didn't have to worry about any squeeze theorem arguments which are usually much more technical. And we can just use our skills and derivatives to help us calculate this limit. The limit here as x approaches one is itself one. All right, let's look at the other example we did earlier, right? The limit as x approaches infinity of the natural log of x over x minus one, right? In that case, we end up with the natural log of infinity over infinity minus one. We already observed this is infinity over infinity. This is a necessary step to take here. This is important because L'Hopital's rule only applies if you have infinity over infinity or zero over zero. So we have to check to make sure we have the indeterminate form zero over zero or infinity or infinity. Otherwise we can't apply L'Hopital's rule. So since we have that indeterminate form, we can apply L'Hopital's rule, take the derivative top and bottom. It's the exact same function as we saw before. So we see that the derivative of the natural log is one over x, derivative of x minus one is one. You end up with one over x taking the limit as x approaches infinity. And therefore we end up with this being zero. As the denominator goes to infinity, one over infinity is gonna be zero. So we'll be approaching zero from above. So it's pretty nice calculation. L'Hopital's rule is awesome. Let's consider this one. Take the limit as x approaches two of the ratio three x minus six over the square root of two plus x minus two. If you've been following along with this lecture series back in chapter two when we were doing limits as x approaches infinity or vertical asymptotes, these ratios involving square roots can be a pain. They really can. The algebra required to simplify it can be very, very tedious. In this case, it would involve rationalizing the numerator. But before I get too ahead of myself, notice if I just plug in x equals two, that's the first approach we should take. We'll get three times two minus six over two plus two minus two. In the numerator, we get six minus six, which we can see is gonna be zero. In the denominator, we get the square root of four minus two, which is two minus two. We get zero over zero. So since we get zero over zero, L'Hopital's rule applies. We see that the limit as x approaches two here, we can take the derivative on top and bottom. We still have the limit as x approaches two. If we take the derivative of three x minus six, we're just gonna get a three. If we take the derivative of the square root of two plus x minus two, well, the derivative of the constant will disappear. We take the derivative of the square root of two plus x, you're gonna get one over two times the square root of two plus x by the usual chain rule. Since you're dividing by a fraction, this actually can be simplified to become three times two times the square root of two plus x. This all sits above one, so I don't even need the fraction anymore. You'll now notice that if I allow x to go towards two, we end up with three times two. Well, that's just a six, so I'll put that in there. Then you get the square root of two plus two, like we saw before, that's six times the square root of four, which the square root of four is two. So you get six times two and the limit turns out to be 12. This is a whole lot easier than the algebraic calculations we did earlier with like rationalizing denominators and numerators and such. So I hope you can see that this is a dramatic improvement on limit calculations we did before. The reason we couldn't do it early in our series is because we didn't have derivative calculations yet. Now we do and we can use that tool because it's in our toolbox. Let's do a few more examples. Let's take the limit as x approaches one of the natural log of x over x minus one. You might remember from our previous examples what's gonna happen here. You get the natural log of one over one minus one squared. You end up with zero over zero squared, which is still zero over zero. You have an intermittent form, so use L'Hopital's rule. If you take the derivative on top, you're gonna get one over x. The derivative on the bottom is gonna be a little bit different this time. You're gonna get two times x minus one, taking the limit as x approaches one. Simplifying that fraction, this looks like one over two x times x minus one. If we take the limit this time as x approaches one, you get one over two times one times one minus one. So this is gonna become one over two times zero, which is one over zero. This indicates to us that the limit does not exist. Maybe we're investigating this because we're looking to see if there's like a vertical asymptote or something, and that's exactly what happened. Our function has a vertical asymptote at x equals one because you'll see that as we try to compute this, we got this form right here. One over zero is not an indeterminate form. One over zero basically means plus or minus infinity. It depends on whether we're approaching from the left or the right or anything like that. We didn't choose one sided. So we do stick with it. The limit doesn't exist right here, but our function has a vertical asymptote because after we took the derivatives, the limit didn't exist. That implies that the original limit didn't exist either. So that's our answer, D and E, right here. Another example, let's take the limit as x approaches infinity of x squared over e to the x. Well, if you just plug in infinity, you get infinity squared over e to the infinity that looks like infinity over infinity. Okay, I can use L'Hopital's rule. So by L'Hopital's rule, we'll take the derivative on the top. You're gonna get 2x over e to the x. Well, the derivative of e to the x is itself. And which case then when you plug in infinity, you get two times infinity over e to the infinity. You get infinity over infinity again. Yikes, what happens there? We got an indeterminate form again. What does that mean? It just means you can do L'Hopital's rule again because what we know is that whatever this limit turns out to be, that's the same as this limit right here. But this limit is it has an indeterminate form. In which case then we do L'Hopital's rule again, we'll take the derivative of 2x, which is a two. You take the derivative of e to the x, which is e to the x. And now in this situation, as we allow x to go to infinity, we'll get two over e to the infinity. That is two over infinity. This is gonna turn out to be zero. Two over infinity is not an indeterminate form. That is just gonna be zero. So this implies, so since this limit is zero, that implies that this limit is zero. But this limit being zero implies that this limit is zero. And so you can do a chain of L'Hopital calculations. You can do as many as you need. It doesn't matter. Just keep on going and going and going until eventually you figure out what the limit is or you figure out the limit doesn't exist like we've seen with previous examples. You can do L'Hopital's rule over and over and over again as much as you would like to. That as long as we have this indeterminate form here. This example kind of illustrates a very important concept. When you look at this function x squared over e to the x, why did the limit approach zero? It basically comes to the fact that e to the x is a faster growing function than x squared. e to the x and x squared are both going towards infinity but e to the x goes to infinity much, much faster. And that's kind of the idea behind L'Hopital's rule. The derivative, if these were position functions, the derivative measures the velocity. So if we have two functions racing towards infinity, then who's the winner? Well, who's ever going faster, right? It's like, oh, both x squared and e to the x finish the race. They both ran 100 meters. Okay, well, who won? Well, who ran faster, right? We look to their velocity functions. Now in this situation, their velocity functions were too close. So what do we do? We then look at their acceleration functions who accelerated faster, right? Because their terminal velocities might have ended up to be the same. And so we can continue to take derivatives over and over again. And so this right here is like a boxing match between, you know, take like a famous boxer like Mike Tyson or something and have him box against Superman, right? No matter how powerful you think this boxer is, every time he punches Superman, nothing. Superman just takes it. The derivative doesn't face e to the x at all. But on the other hand, Superman gives e to the x a punch. Or excuse me, gives x squared a punch. The derivative, boom, boom, right? He's a good boxer, sure. But the thing is eventually your power function x squared will decay eventually to a constant where e to the x will never ever. You know, taking the derivative of e to the x is like fighting Superman. No matter how many times you punch him, it doesn't make any difference whatsoever. In this last example, let's do this one. Wait, let's take the limit as x approaches pi right here. If we were just to jump into this naively, I'm gonna write this question in red because red will indicate to you blood. We're doing it wrong. If I were to take, you know, if I was to apply Lopital's rule right here, you're gonna get the limit as x approaches pi from the left. The derivative of sine is cosine of x. And then derivative of one is a constant. The derivative of negative cosine is a positive sine. So actually you get cotangent right now. If you plug in pi into this situation, you end up with cosine of pi over sine of pi. Like so, cosine of pi, as we hopefully remember, is a negative one. Sine of pi is gonna be zero. We're approaching from the left. So this is actually gonna be from above. And so this will end up giving you negative infinity. But on the other hand, if we were just to plug in pi from the very beginning, you end up with sine of pi over one minus cosine of pi. You end up with sine of pi, like we said, is zero over one minus cosine of pi as a negative one. So you end up with zero over two. That looks sloppy. Zero over two, which equals zero. So which one is it? Is the limit zero or negative infinity? Well, the limit is in fact zero. Continuity just allows you to plug in pi into both of these. But why did Lopital's rule give you something different here? Why did you get negative infinity instead of zero? Well, the point is Lopital's rule, this was all wrong. I said, this is all wrong. Please ignore it. Don't do it, don't do it. Lopital's rule only applies if you have an indeterminate form, zero over zero or infinity over infinity. If your function does not have an indeterminate form, then you cannot use Lopital's rule because it actually will give you the wrong answer like we saw in this example right here. So be very cautious about that. Lopital's rule is a very powerful technique for computing limits, but it only applies if you have an indeterminate form. So you must always check whether you have an indeterminate form first before you apply Lopital's rule.