Many limits in engineering math come out as 0/0 or ∞/∞ when you simply plug the value in. Those results are not answers. They are called indeterminate forms, and they only tell you that the numerator and the denominator go to the same kind of value. L'Hopital's rule resolves such a limit. It replaces the ratio of the two functions with the ratio of their derivatives, and that ratio is often much easier to evaluate. The general idea of a limit is on the Limit page.
Let's start with the statement of the rule and its conditions. Then we'll work through two examples, one for each indeterminate form. Finally, we'll look at the cases where the rule does not apply, or where it applies but does not help.
- What does L'Hopital's rule say ?
- Example 1 - How does the rule resolve an infinity over infinity form ?
- Example 2 - How does the rule resolve a zero over zero form ?
- When does the rule fail or mislead ?
What does L'Hopital's rule say ?
The rule compares two functions that both go to 0, or both grow without bound, at the same point. In that situation the plain quotient tells you nothing. But the rates of change of the two functions still carry the information, and the rule reads the limit from them.
The diagram below shows the rule in three parts. The top line is the rule itself. The bracket in the middle gives the two starting conditions, and the arrow shows what they mean for the plain quotient. The line at the bottom is the last condition: the limit of the derivative ratio must exist.

Figure 1. L'Hopital's rule and its conditions. The derivative ratio may replace the function ratio only when the function ratio is 0/0 or ∞/∞ and the derivative ratio has a limit.
The rule works on two separate derivatives : f'(x) and g'(x) are the derivatives of the numerator and the denominator, each taken on its own. You do not apply the quotient rule to f(x)/g(x).The first condition is an indeterminate form : both functions go to 0, or both go to +/-∞. If the plain quotient already has a finite value, that value is the limit, and the rule must not be used.The second condition is on the derivative ratio : the limit of f'(x)/g'(x) must exist, either as a number or as +/-∞. The rule also assumes that f and g are differentiable near c, and that g'(x) is not 0 near c, except possibly at c itself.The split at the bottom of the diagram needs care : the diagram writes the derivative limit as lim f'(x) divided by lim g'(x). That split is valid only when lim g'(x) is not 0, which is true in both examples below. When f'(x) and g'(x) again give 0/0, you apply the rule a second time instead.c can be a number or infinity : the rule holds for x → c, for one-sided limits such as x → c+, and for x → +/-∞. Example 1 below uses x → ∞.
Why does the derivative ratio give the answer ? Let's look at the simplest 0/0 case. Suppose f(c) = g(c) = 0, both functions are differentiable at c, and g'(c) is not 0. Because f(c) and g(c) are 0, you can subtract them without changing anything:
f(x)/g(x) = [f(x) - f(c)] / [g(x) - g(c)] = {[f(x) - f(c)]/(x - c)} / {[g(x) - g(c)]/(x - c)}
Both braces are difference quotients. As x → c, the top one goes to f'(c) and the bottom one goes to g'(c). So the ratio goes to f'(c)/g'(c). Near c, both functions look like straight lines through the same zero, and the ratio of two such lines is the ratio of their slopes. The general proof, which also covers ∞/∞ and g'(c) = 0, uses the Cauchy mean value theorem.
Check the form before you differentiate : plug the value in first. Only 0/0 and ∞/∞ allow the rule.Near the limit point, only the slopes matter : this is why the derivative ratio can replace the function ratio.
Example 1 - How does the rule resolve an infinity over infinity form ?
The first example is a ratio of two straight lines. Both lines grow without bound as x goes to ∞, so the real question is which one grows faster. The expression below is the limit we want to find.

Figure 2. The limit for Example 1. Numerator and denominator are both first degree in x.
The first step is always to plug the value in and look at the form. The diagram below does this with x = ∞.

Figure 3. Substituting x = ∞ gives ∞/∞. This is an indeterminate form, so the first condition of the rule holds.
Writing 2∞ - 2 is only a shorthand. Infinity is not a number, and the diagram uses it to show that both lines grow without bound. The diagram below applies the rule. Each line is differentiated on its own, and the constants -2 and +1 disappear because their derivative is 0.

Figure 4. The derivatives are the constants 2 and 3, so the limit is 2/3. The derivative ratio does not depend on x any more, so its limit clearly exists.
You can check the result without the rule. Divide the numerator and the denominator by x. This gives (2 - 2/x)/(3 + 1/x), and both 2/x and 1/x go to 0 as x → ∞. So the limit is 2/3, the same answer.
Equal degrees give the ratio of the leading coefficients : for two polynomials of the same degree, the limit at infinity is the ratio of their leading coefficients. Here that is 2/3.The rule removes the terms that do not grow : the constants -2 and +1 vanish on differentiation, and they also have no effect on the limit.
Example 2 - How does the rule resolve a zero over zero form ?
The second example has a finite limit point, x = 3. Both the numerator and the denominator are 0 there, so plain substitution gives 0/0. The expression below is the limit we want to find.

Figure 5. The limit for Example 2. Both polynomials have a root at x = 3.
Again, plug the value in first. The diagram below substitutes x = 3. The numerator gives 9 + 3 - 12 = 0, and the denominator gives 9 - 9 = 0.

Figure 6. Substituting x = 3 gives 0/0. This is an indeterminate form, so the rule may be applied.
The diagram below differentiates the numerator and the denominator separately. The derivative of x2 + x - 12 is 2x + 1, and the derivative of x2 - 9 is 2x. At x = 3 these are 7 and 6.

Figure 7. The derivative ratio (2x + 1)/(2x) is 7/6 at x = 3, so the limit is 7/6.
Factoring gives the same answer and shows where the 0/0 came from. The numerator is (x - 3)(x + 4), and the denominator is (x - 3)(x + 3). The common factor (x - 3) produces the zero on both sides. Once you cancel it, the ratio is (x + 4)/(x + 3), and at x = 3 this is 7/6.
A 0/0 form from two polynomials means a shared root : both polynomials contain the factor (x - c). You can cancel it, or use the rule. Both give 7/6 here.The rule is faster when factoring is hard : functions such as sin x, ex or ln x have no factor to cancel, but the rule still works on them.
When does the rule fail or mislead ?
The rule looks mechanical, and most mistakes come from applying it mechanically. Let's check four situations. In the first, the rule gives a wrong answer. In the second, one application is not enough. In the third, the rule gives no answer at all. In the fourth, the limit must be rewritten before the rule can be used.
The first situation is a limit that is not indeterminate. Take limx→0 (x + 1)/(x + 2). Substitution gives 1/2, and that is the limit. If you apply the rule anyway, you get 1/1 = 1, which is wrong. So the form check is not optional.
The second situation is a derivative ratio that is still indeterminate. Take limx→∞ x2/ex. The first application gives 2x/ex, which is still ∞/∞. The second gives 2/ex, and this goes to 0. Another case is limx→0 (1 - cos x)/x2. It goes from sin x/(2x) to cos x/2, and the limit is 1/2. You apply the rule as many times as the form stays indeterminate.
The third situation is a derivative ratio with no limit. Take limx→∞ (x + sin x)/x. The derivative ratio is (1 + cos x)/1, and it keeps oscillating between 0 and 2. So the rule gives no answer. But the original limit exists. It is 1, because sin x/x goes to 0. When the derivative ratio has no limit, the rule gives no result. It does not prove that the original limit fails to exist.
The fourth situation is a limit in another indeterminate form. The rule only takes 0/0 and ∞/∞, so the other forms are rewritten into one of these first. A product becomes a quotient by moving one factor into the denominator. A power becomes a product by taking the logarithm, and you take e to the result at the end. The table below gives one example of each form, and every limit in it was checked by computation.
Form |
Example |
Rewrite |
Limit |
0 * ∞ |
x ln x, x → 0+ |
ln x / (1/x), then -x |
0 |
∞ - ∞ |
1/x - 1/sin x, x → 0 |
(sin x - x) / (x sin x) |
0 |
1∞ |
(1 + 1/x)x, x → ∞ |
ln = ln(1 + 1/x) / (1/x), which goes to 1 |
e |
00 |
xx, x → 0+ |
ln = x ln x, which goes to 0 |
1 |
∞0 |
x1/x, x → ∞ |
ln = ln x / x, which goes to 0 |
1 |
The rows with a power follow the same steps. The logarithm turns the power into a product, the product becomes a quotient, and the rule finds the limit of the logarithm. Then e raised to that limit is the answer. For 1∞, the logarithm goes to 1, so the limit is e1 = e.
Check the form every time : the rule applied to a determinate limit gives a wrong number, and nothing warns you.Repeat while the form stays indeterminate : x2/ex needs two applications, and each one lowers the power of x by one.No limit of f'/g' means no conclusion : (x + sin x)/x still has the limit 1, even though the derivative ratio oscillates.Rewrite the other five forms first : products become quotients, and powers become products through the logarithm.