L'Hôpital's Rule
Learning Objectives
- State L'Hôpital's Rule for and with all of its hypotheses, including the one that is most often forgotten: the limit of the derivative quotient must exist.
- Recognize limits where the rule does not apply, and limits where it applies but does not help.
- Rewrite the forms , , , , and so that the rule becomes usable.
- Prove that logarithms grow slower than any positive power, and powers slower than exponentials, and connect this to comparing algorithm running times.
Context & Motivation
The limit laws in limit-laws-and-indeterminate-forms say nothing when a quotient has the form or . Factoring and rationalizing work for algebraic expressions, but they are hopeless for something like as . L'Hôpital's Rule replaces the quotient of two functions by the quotient of their derivatives, which is often much simpler. The idea is that near the limit point a differentiable function behaves like its tangent line, so the ratio of the functions behaves like the ratio of the slopes.
The rule is also the standard tool for the dominance hierarchy in limits-at-infinity-and-asymptotic-growth, which is the calculus under big-o-and-asymptotic-complexity: it proves that grows more slowly than and that polynomials grow more slowly than exponentials. But the rule is a theorem with hypotheses, and treating it as a mechanical "differentiate top and bottom" habit is a reliable source of wrong answers. This lesson spends as much time on when it fails as on when it works.
Core Theory
The statement
L'Hôpital's Rule. Let and be differentiable on an open interval containing , except possibly at itself, with for in that interval. Suppose
- and , or both and tend to ; and
- exists, as a finite number or as .
Then
The same statement holds for one-sided limits and for . The proof is a refinement of the Mean Value Theorem (the Cauchy form, which compares two functions at the same intermediate point). A quick plausibility check for : if and both are differentiable at with , then , and dividing top and bottom by gives in the limit.
Notice the direction of the implication. If the derivative quotient has a limit, so does the original. The converse is false. Condition 1 says the rule is for indeterminate forms only. Condition 2 says that a derivative quotient that wanders tells you nothing.
Rewriting the other indeterminate forms
The rule needs a quotient. Other forms are converted first.
- : write as or , whichever has simpler derivatives.
- : combine into one fraction, or factor.
- , , : for with , take logarithms: is a form. If , then because the exponential is continuous. The positivity of is what makes the logarithm legal.
Worked Examples
Example 1: the rule at work
Evaluate . Both numerator and denominator tend to , so the form is . Differentiating gives , which is again . Differentiating once more gives , which tends to . The second application was legal only because the first result was still indeterminate. Stop the moment the form is no longer indeterminate: applying the rule to would be an error. A numerical check agrees: at the quotient is , , .
Example 2: three ways the rule fails
It does not apply: not an indeterminate form. Take . The numerator tends to and the denominator to , so continuity gives the limit . Differentiating anyway gives , a wrong answer.
It does not apply: the derivative quotient has no limit. Take . The form is and the functions are differentiable, but the derivative quotient is , which keeps oscillating between and and has no limit. Condition 2 fails, so the rule says nothing. The original limit exists anyway: and by the squeeze theorem, so the limit is . A second example of the same disease is . It is , but the derivative quotient oscillates near . Yet the original equals .
It applies but does not help. Take . It is and the hypotheses hold. The derivative quotient is , the reciprocal of what we started with. Apply the rule again and you get the original expression back, forever. The right tool is algebra: divide top and bottom by , giving . (For , ; for the same trick gives .)
Example 3: other indeterminate forms
. . Write it as , a form. The derivative quotient is , so the limit is . The other rewrite, , is legal but produces , another form that is harder than the one you started with. Choose the rewrite whose derivative simplifies.
. , which is . One application gives , still . A second gives . The values at are and , consistent with a limit of .
. . For , by the first part, so . The restriction to matters: is not defined for negative in general, so there is no two-sided limit.
. has , a form whose derivative quotient is . So the limit is .
Example 4: comparing growth rates
For any , is , and the derivative quotient is . So every positive power eventually beats the logarithm. Similarly becomes , then , and after applications , for any positive integer . For a real exponent and , , so . So eventually beats every power of .
Consequence for algorithms: , so grows more slowly than . For this pair there is no crossover to hunt for: peaks at with value and then falls, so for every . The convergence to is slow, though:
textn ln(n)/sqrt(n) 10 0.7281 100 0.4605 10^4 0.0921 10^6 0.0138 10^8 0.0018
The limit of a real variable gives the limit of the integer sequence by restricting. A far-off crossover does occur for other pairs, such as polynomial against exponential. is larger than for every from to (at : against ), and takes over from ( against ). The limit says who wins eventually, not where the crossover is.
Common Misconceptions & Pitfalls
- Differentiating the quotient instead of top and bottom. The rule uses , not .
- Applying it when the form is not indeterminate. Example 2 gives instead of . Substitute first.
- "No limit for means no limit for ." The oscillation examples refute this; the rule is silent, not negative.
- Stopping too late or too early. Re-check the form after every application and simplify before differentiating again.
- Using it on sequences directly. A sequence has no derivative. Extend to a function of a real variable , apply the rule, and conclude about the sequence from the function's limit.
- Circular reasoning. Using the rule to prove assumes the derivative of , which in the usual development is proved from that very limit.
- Reaching for it by reflex. When algebra works (dividing by the highest power, factoring) it is usually shorter and safer.
Summary
L'Hôpital's Rule says that if is of the form or near , the functions are differentiable with , and has a limit (finite or infinite), then has the same limit. The hypotheses are all load-bearing. A non-indeterminate form gives wrong answers, as in at . A wandering derivative quotient makes the rule silent, as in , whose limit is by squeezing. And a limit like cycles without progress and yields to algebra. Other indeterminate forms are rewritten as quotients, powers by taking logarithms of a positive base. Applied to growth rates, the rule shows that as , which is the calculus beneath comparing running times such as against . The limit says who wins in the end, not where a crossover falls, as against shows. The next lesson, antiderivatives-and-initial-value-problems, runs differentiation in reverse.