If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

L'Hôpital's rule introduction

AP.CALC:
LIM‑4 (EU)
,
LIM‑4.A (LO)
,
LIM‑4.A.1 (EK)
,
LIM‑4.A.2 (EK)
When you are solving a limit, and get 0/0 or ∞/∞, L'Hôpital's rule is the tool you need. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user tecker
    Quick question: Can we mix cases? Like f(x) = 0 and g(x) = +-Inf?
    (31 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user np.complete.breakfast
      No, but you don't need to. In your example, the limit is not indeterminate; it's 0. In the reverse case of lim f(x) = ±∞ and lim g(x) = 0, the one-sided limits will be +±∞, and the limit will exist if they are equal.

      Other indeterminate forms such as ∞ - ∞ or ∞^0 can sometimes be rewritten into a form such that L'Hôpital's rule works. (See the video "L'Hopital's Rule Example 3".)
      (45 votes)
  • male robot hal style avatar for user Matthew Dai
    Isn't infinity over infinity just equal to 1, or negative infinity over infinity equal to -1? My brain thinks of it like infinity is a value and dividing it by itself gets 1.
    (7 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ArDeeJ
      But infinity isn't a number or a value.

      Consider what x^2 / x is as x goes to infinity: you get ∞/∞. However, x^2 / x can be simplified to x, and as x goes to infinity you get ∞. So, ∞/∞ is equal to ∞?

      Now consider x / x^2 as x goes to infinity: you get ∞/∞ again. But x / x^2 can also be simplified to 1/x, and as x goes to infinity you get 0. So now ∞/∞ is equal to 0?

      ∞/∞ is very much undefined, because ∞ is not a value or a number.
      (48 votes)
  • female robot ada style avatar for user rhyth shah
    even after applying the l'hopital's rule, if it remains in 0/0 or other indefined form then?
    (12 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user mpeterson
    Who is L'Hopital
    (10 votes)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user Thor
    At , Sal says there are indeterminate forms like 0/0 and infinity/infinity. Are there any other types?
    Also, what makes another form indeterminate, i.e., what is the rationale?

    Thanks!
    (13 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user LHS
      A form is indeterminate if we can't tell what the limit is just by looking at the form. For example, a form that looks like 0/0 or infinity/infinity could end up having limit 0, infinity, -100, 0.5, undefined, or any real number.
      Examples of 0/0 cases:
      1. limit_{x->0} (sin x)/x = 1
      2. limit_{x->0} (1- cos x)/x = 0
      3. limit_{x->0} x/(x^2) = limit_{x->0} 1/x which does not exist.
      As you can see, just having the form 0/0 doesn't tell us anything about the value of the limit.

      Some other indeterminate forms are infinity - infinity, 1^infinity, 0*infinity.
      But note that things like infinity+infinity and 0^infinity are NOT indeterminate forms.
      (6 votes)
  • male robot hal style avatar for user Conor McKenzie
    Okay, so I know how about L'Hopital's rule and what it is, maybe a bit about how to use it. But why does it work? Can anyone prove L'Hopital's rule?
    (10 votes)
    Default Khan Academy avatar avatar for user
  • leafers ultimate style avatar for user Gavin Yu
    If lim f(x) is defined and lim g(x) is defined, we wouldn't need L'Hopital's rule to find lim f(x)/g(x), but would it still apply?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • old spice man blue style avatar for user Conrad Buck
      L'Hôpital's rule can only be applied in the case where direct substitution yields an indeterminate form, meaning 0/0 or ±∞/±∞. So if f and g are defined, L'Hôpital would be applicable only if the value of both f and g is 0.

      Think about the limit of (x+1)/(x+2) as x approaches 0. Direct substitution tells us that the answer is 1/2. However, if we tried to apply L'Hôpital's rule, we would get 1 as our answer, which would be incorrect.
      (8 votes)
  • blobby green style avatar for user alec.garcia95
    What do you do if you get infinity times zero when plugging in as a test for l'hopital?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Just Keith
      That is not a correct form for l'Hôpital's rule, so it is still indeterminate. You need to convert it to something that is a l'Hôpital's form.
      Specifically,
      If g(x) → 0
      And f(x)→ ∞
      Then: g(x) f(x) is the form you mentioned.
      but f(x) = 1 / [ 1/f(x) ]
      And 1/f(x) is a 0 form.
      Thus,
      g(x) f(x) = g(x) / [1/f(x)]
      and g(x) / [1 / f(x) ] is a 0/0 form and subject to l'Hôpital's rule
      (5 votes)
  • blobby blue style avatar for user mehrin farjana
    Does this only apply to fractions
    (3 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Akshat Sanghvi
    Hello! This is Akshat of Grade 10! I havea small doubt - So can we say that 0/0 = 1.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ( ͡° ͜ʖ ͡°)
      Say you have a real number c, and you say that x = c/0. Multiplying both sides by 0, you get c = 0*x. If c is any number other than zero, the laws of mathematics are broken (as 0*any number can never equal anything but zero), which is why we call c/0 undefined . However, if c equals 0, then when you multiply both sides by 0, you get 0 = 0*x. Any number satisfies that equation, so we call that indeterminate form, a slight nuance that means something different than 'undefined.' Indeterminate form essentially means that a solution wouldn't technically break laws of mathematics, but we don't give it a value because there are conflicting answers - unless it's useful in some way (for example, 0^0 is indeterminate, but we give it different values depending on the type of math you're doing).

      With L'Hopital's rule, we go from a limit that would be 0/0 (indeterminate form) if you plugged the limit bound directly in to something completely different. With some manipulation, you end up with something in a form that allows you to get a defined number as your limit. If the number you end up with is 1, that means that at the limit bound, on a small scale, the numerator and the divisor approach the same value (another word for this is "equivalent infinitesimal," got that from Wikipedia). However, you can get many other values, depending on what limit you're trying to evaluate.
      (3 votes)

Video transcript

Most of what we do early on when we first learn about calculus is to use limits. We use limits to figure out derivatives of functions. In fact, the definition of a derivative uses the notion of a limit. It's a slope around the point as we take the limit of points closer and closer to the point in question. And you've seen that many, many, many times over. In this video I guess we're going to do it in the opposite direction. We're going to use derivatives to figure out limits. And in particular, limits that end up in indeterminate form. And when I say by indeterminate form I mean that when we just take the limit as it is, we end up with something like 0/0, or infinity over infinity, or negative infinity over infinity, or maybe negative infinity over negative infinity, or positive infinity over negative infinity. All of these are indeterminate, undefined forms. And to do that we're going to use l'Hopital's rule. And in this video I'm just going to show you what l'Hoptial's rule says and how to apply it because it's fairly straightforward, and it's actually a very useful tool sometimes if you're in some type of a math competition and they ask you to find a difficult limit that when you just plug the numbers in you get something like this. L'Hopital's rule is normally what they are testing you for. And in a future video I might prove it, but that gets a little bit more involved. The application is actually reasonably straightforward. So what l'Hopital's rule tells us that if we have-- and I'll do it in abstract form first, but I think when I show you the example it will all be made clear. That if the limit as x approaches c of f of x is equal to 0, and the limit as x approaches c of g of x is equal to 0, and-- and this is another and-- and the limit as x approaches c of f prime of x over g prime of x exists and it equals L. then-- so all of these conditions have to be met. This is the indeterminate form of 0/0, so this is the first case. Then we can say that the limit as x approaches c of f of x over g of x is also going to be equal to L. So this might seem a little bit bizarre to you right now, and I'm actually going to write the other case, and then I'll do an example. We'll do multiple examples and the examples are going to make it all clear. So this is the first case and the example we're going to do is actually going to be an example of this case. Now the other case is if the limit as x approaches c of f of x is equal to positive or negative infinity, and the limit as x approaches c of g of x is equal to positive or negative infinity, and the limit of I guess you could say the quotient of the derivatives exists, and the limit as x approaches c of f prime of x over g prime of x is equal to L. Then we can make this same statement again. Let me just copy that out. Edit, copy, and then let me paste it. So in either of these two situations just to kind of make sure you understand what you're looking at, this is the situation where if you just tried to evaluate this limit right here you're going to get f of c, which is 0. Or the limit as x approaches c of f of x over the limit as x approaches c of g of x. That's going to give you 0/0. And so you say, hey, I don't know what that limit is? But this says, well, look. If this limit exists, I could take the derivative of each of these functions and then try to evaluate that limit. And if I get a number, if that exists, then they're going to be the same limit. This is a situation where when we take the limit we get infinity over infinity, or negative infinity or positive infinity over positive or negative infinity. So these are the two indeterminate forms. And to make it all clear let me just show you an example because I think this will make things a lot more clear. So let's say we are trying to find the limit-- I'll do this in a new color. Let me do it in this purplish color. Let's say we wanted to find the limit as x approaches 0 of sine of x over x. Now if we just view this, if we just try to evaluate it at 0 or take the limit as we approach 0 in each of these functions, we're going to get something that looks like 0/0. Sine of 0 is 0. Or the limit as x approaches 0 of sine of x is 0. And obviously, as x approaches 0 of x, that's also going to be 0. So this is our indeterminate form. And if you want to think about it, this is our f of x, that f of x right there is the sine of x. And our g of x, this g of x right there for this first case, is the x. g of x is equal to x and f of x is equal to sine of x. And notice, well, we definitely know that this meets the first two constraints. The limit as x, and in this case, c is 0. The limit as x approaches 0 of sine of sine of x is 0, and the limit as x approaches 0 of x is also equal to 0. So we get our indeterminate form. So let's see, at least, whether this limit even exists. If we take the derivative of f of x and we put that over the derivative of g of x, and take the limit as x approaches 0 in this case, that's our c. Let's see if this limit exists. So I'll do that in the blue. So let me write the derivatives of the two functions. So f prime of x. If f of x is sine of x, what's f prime of x? Well, it's just cosine of x. You've learned that many times. And if g of x is x, what is g prime of x? That's super easy. The derivative of x is just 1. Let's try to take the limit as x approaches 0 of f prime of x over g prime of x-- over their derivatives. So that's going to be the limit as x approaches 0 of cosine of x over 1. I wrote that 1 a little strange. And this is pretty straightforward. What is this going to be? Well, as x approaches 0 of cosine of x, that's going to be equal to 1. And obviously, the limit as x approaches 0 of 1, that's also going to be equal to 1. So in this situation we just saw that the limit as x approaches-- our c in this case is 0. As x approaches 0 of f prime of x over g prime of x is equal to 1. This limit exists and it equals 1, so we've met all of the conditions. This is the case we're dealing with. Limit as x approaches 0 of sine of x is equal to 0. Limit as z approaches 0 of x is also equal to 0. The limit of the derivative of sine of x over the derivative of x, which is cosine of x over 1-- we found this to be equal to 1. All of these top conditions are met, so then we know this must be the case. That the limit as x approaches 0 of sine of x over x must be equal to 1. It must be the same limit as this value right here where we take the derivative of the f of x and of the g of x. I'll do more examples in the next few videos and I think it'll make it a lot more concrete.