Indeterminate Forms and L’Hôpital’s Rule

Updated 17 min read Intermediate Baca dalam Bahasa Indonesia

Calculus Proof Computing

Quick answer

L'Hôpital's Rule says that if (f(x))/(g(x)) has the indeterminate form \frac00 or \frac∞∞ at a, then \lim(f(x))/(g(x))=\lim(f'(x))/(g'(x)), provided the second limit exists or is infinite. Differentiate the numerator and the denominator separately, not the quotient, and repeat while the form stays indeterminate. Products, differences and powers are first rewritten as quotients, the powers through a logarithm.

Key takeaways

  • An indeterminate form such as \frac00 describes a limit of a quotient whose numerator and denominator both go to 0; it is not a number, and the limit can be anything: \fracx^3x→0, \frac xx^3→∞, \frac xx→1, \frac2xx→2.
  • L'Hôpital's Rule: if f and g are differentiable near a, g'\ne0 there, and f/g is \frac00 (or \frac∞∞) at a, then \lim\frac fg=\lim(f')/(g') when the right side exists; it holds for one-sided limits and for a=±∞.
  • Take (f')/(g'), not the derivative of \frac fg, and stop as soon as the quotient is no longer indeterminate: in \lim_x→0(1-\cos x)/(x+x^2) one round gives (\sin x)/(1+2x)→0, and a second round would wrongly give \frac12.
  • The forms 0·∞ and ∞-∞ are turned into a quotient by algebra, and the powers 1^∞, 0^0, ∞^0 by taking \ln: if \ln y→ L then y→ e^L.
  • The rule can fail: the quotient may be determinate (no rule needed), it can cycle ((√(9x+1))/(√ x+1)), or (f')/(g') may have no limit although \frac fg does (\fracx+\sin xx).
  • The proof rests on Cauchy's Mean Value Theorem, (f(b)-f(a))/(g(b)-g(a))=(f'(c))/(g'(c)) for some c in (a,b), which is the Mean Value Theorem for two functions.

What is an indeterminate form?

An indeterminate form is a way of summarizing the behavior of a limit when the behavior of the parts does not decide it. Take the four limits \lim_x→0(x^3)/(x)=0 \lim_x→0(x)/(x^3)=∞ \lim_x→0x/x=1 \lim_x→0(2x)/(x)=2. In each, the numerator and the denominator both approach 0, yet the results are 0, ∞, 1 and 2. We say a limit \lim_x→ a(f(x))/(g(x))\quadwith \lim_x→ af(x)=0 and \lim_x→ ag(x)=0 has the indeterminate form \frac00. The symbol "\frac00" looks like a number but is not one: it is not an instruction to divide 0 by 0, only a label for the limit of a ratio of two functions that each go to zero. Knowing that both go to zero is not enough to find the limit of the ratio; one has to look more closely, by algebra or by the rule of this article.

If both the numerator and the denominator go to +∞ or -∞, the form is \frac∞∞. The other forms are ∞·0, ∞-∞, 1^∞, 0^0 and ∞^0. Each is a label for a kind of limit whose value can come out in several ways: x\ln x and x·\frac1x are both of the form 0·∞ at 0^+ and ∞·0 at ∞, and they give 0 and 1.

Some forms are not indeterminate. A numerator that goes to 1 over a denominator that goes to 0 is \frac10, which is infinite (or does not exist if the sign differs on the two sides); \frac0∞ is 0; ∞+∞ is ∞; 0^∞ is 0. Only the forms above leave the limit open.

John (Johann) Bernoulli discovered a rule for using derivatives to calculate limits of fractions whose numerators and denominators both approach zero or ±∞. It is known as l'Hôpital's Rule after Guillaume de l'Hôpital, who wrote the first introductory differential calculus text, where the rule first appeared in print.

What does L’Hôpital’s Rule say?

L'Hôpital's Rule: suppose \lim_x→ af(x)=\lim_x→ ag(x)=0, that f and g are differentiable on an open interval I containing a, and that g'(x)\ne0 on I if x\ne a. Then \lim_x→ a(f(x))/(g(x))=\lim_x→ a(f'(x))/(g'(x)), assuming that the limit on the right side exists. The theorem also applies if x→±∞ or when f(x) and g(x) go to ±∞ (the form \frac∞∞), and to one-sided limits; the number a may be finite or infinite. The reason is that near a a function is close to its tangent line, so the ratio of two functions that vanish at a is the ratio of their slopes. Section 5 proves it.

Caution. To apply the rule to \frac fg, divide the derivative of f by the derivative of g. Do not take the derivative of the quotient: the quotient to use is (f')/(g') and not \left(\frac fg\right)'. For (x^2-1)/(x-1) at 1 the right number is \frac2x1→2, while the derivative of the quotient x+1 is 1.

Using the rule. To find \lim(f(x))/(g(x)), differentiate f and g, and keep differentiating as long as the quotient still has the form \frac00 (or \frac∞∞). As soon as one of the two derivatives no longer goes to zero, stop. The rule does not apply when the numerator or the denominator has a finite limit that is not zero (or, in the first round, when the form is not indeterminate at all).

Example 1. All of these are of the form \frac00, and some need the rule more than once. (a) \lim_x→0(3x-\sin x)/(x)=\lim_x→0(3-\cos x)=2. (b) \lim_x→0(√(1+x)-1)/(x)=\lim_x→0\frac\frac12√(1+x)1=\frac12. (c) \lim_x→0(√(1+x)-1-\frac x2)/(x^2)=\lim_x→0\frac\frac12√(1+x)-\frac122x, which is \frac00 again, so =\lim_x→0(-\frac14(1+x)^-3/2)/(2)=-\frac18. (d) \lim_x→0(x-\sin x)/(x^3)=\lim_x→0(1-\cos x)/(3x^2) =\lim_x→0(\sin x)/(6x)=\lim_x→0(\cos x)/(6)=\frac16.

Example 2: a careful use. \lim_x→0(1-\cos x)/(x+x^2)=\lim_x→0(\sin x)/(1+2x)=\frac01=0. It is tempting to apply the rule again to get \lim(\cos x)/(2)=\frac12, but that is wrong: (\sin x)/(1+2x) is \frac01, not indeterminate, and its value is 0.

Example 3: one-sided limits. (a) \lim_x→0^+(\sin x)/(x^2)=\lim_x→0^+(\cos x)/(2x)=+∞, since \cos x→1 and 2x→0^+. (b) \lim_x→0^-(\sin x)/(x^2)=\lim_x→0^-(\cos x)/(2x)=-∞, since 2x<0. The one-sided limits differ, so the two-sided limit does not exist.

Type a numerator, a denominator and a point below, or choose an example. The stepper applies the rule one round at a time, names the form at each step and stops when the quotient is no longer indeterminate.

Interactive: l’Hôpital’s Rule, round by round

Type a numerator, a denominator and the point (a number, inf or -inf), or pick a textbook example, and watch the rule applied round by round: the form at each step, the quotient of derivatives, and the limit where it stops.

How does the rule handle ∞/∞, and which grows faster?

L'Hôpital's Rule applies to \frac∞∞ exactly as to \frac00: if f(x)→±∞ and g(x)→±∞ as x→ a, then \lim(f(x))/(g(x))=\lim(f'(x))/(g'(x)), provided the limit on the right exists or is ±∞. Here a may be finite or infinite, and x→ a may be replaced by x→ a^+ or x→ a^-. The proof of this case is harder and is not given here; it is a 19th-century result.

Example 4. Find the limits of these \frac∞∞ forms. (a) \lim_x→π/2^-(\sec x)/(1+\tan x). Both parts go to +∞ from the left, so =\lim(\sec x\tan x)/(\sec^2x)=\lim\sin x=1 (a simplification, (\tan x)/(\sec x)=\sin x, is easier here than a second round). (b) \lim_x→∞(\ln x)/(2√ x)=\lim_x→∞(1/x)/(1/√ x) =\lim_x→∞\frac1√ x=0. (c) \lim_x→∞(e^x)/(x^2)=\lim(e^x)/(2x)=\lim(e^x)/(2)=∞.

The last two are the comparison of growth rates: a logarithm grows more slowly than any positive power of x, and an exponential grows faster than any power, so (\ln x)/(x^p)→0 and (e^x)/(x^p)→∞ for every p>0. Many limits in later chapters are settled by this ordering: \ln x≪ x^p≪ e^x as x→∞.

Leading terms. For a ratio of polynomials the rule gives the familiar answer: \lim_x→∞(5x^2-3x)/(7x^2+1)=\lim(10x-3)/(14x)=\lim(10)/(14)=\frac57, the ratio of the leading coefficients.

How do you handle 0·∞ and ∞−∞?

The forms ∞·0 and ∞-∞ are not quotients, so first algebra turns them into \frac00 or \frac∞∞, and then the rule applies. Neither ∞·0 nor ∞-∞ is a number; they only describe what the parts do.

Example 5: a product. (a) \lim_x→\inftyx\sin\frac1x is of the form ∞·0. Write it as \lim_x→∞(\sin(1/x))/(1/x), a \frac00 form, and apply the rule: =\lim_x→∞(\cos(1/x)·(-1/x^2))/(-1/x^2) =\lim_x→∞\cos\frac1x=1. (b) \lim_x→0^+x\ln x is of the form 0·∞. Write it as \lim_x→0^+(\ln x)/(1/x), an \frac∞∞ form, and apply the rule: =\lim_x→0^+(1/x)/(-1/x^2)=\lim_x→0^+(-x)=0.

The choice of which factor goes in the denominator matters: x\ln x=(x)/(1/\ln x) would lead to a worse quotient. Put in the denominator the factor whose reciprocal is simpler to differentiate.

Example 6: a difference. Find \lim_x→0\left(\frac1x-\frac1\sin x\right). As x→0^+, \frac1x→∞ and \frac1\sin x→∞, so the form is ∞-∞; as x→0^- it is -∞-(-∞). Neither shows the limit. Combine the fractions over a common denominator, \frac1x-\frac1\sin x=(\sin x-x)/(x\sin x), which is of the form \frac00, and apply the rule twice: \lim_x→0(\sin x-x)/(x\sin x)=\lim_x→0(\cos x-1)/(\sin x+x\cos x)=\lim_x→0(-\sin x)/(2\cos x-x\sin x)=\frac02=0.

Another difference: \lim_x→1^+\left(\frac1\ln x-\frac1x-1\right)=\lim(x-1-\ln x)/((x-1)\ln x)=\frac12, again a combined fraction of the form \frac00 and two rounds.

How do you handle 1^∞, 0^0 and ∞^0?

Limits that lead to 1^∞, 0^0 and ∞^0 are handled by first taking the logarithm of the function, the idea of logarithmic differentiation: find the limit L of \ln f(x) with the rule, then exponentiate. If \lim_x→ a\ln f(x)=L, then \lim_x→ af(x)=\lim_x→ ae^\ln f(x)=e^L, by the continuity of the exponential function. The formula is valid for one-sided limits and for a=±∞. If f(x)=u(x)^v(x) then \ln f=v\ln u, a product, which the previous section turns into the quotient (\ln u)/(1/v).

Example 7. Show that \lim_x→0^+(1+x)^1/x=e. The limit has the form 1^∞. Let f(x)=(1+x)^1/x, so \ln f(x)=(\ln(1+x))/(x), a \frac00 form. By the rule \lim_x→0^+\ln f(x)=\lim_x→0^+(\ln(1+x))/(x)=\lim_x→0^+(1/(1+x))/(1)=1. Therefore \lim_x→0^+(1+x)^1/x=e^1=e. This is the number e from the definition of the exponential, and it is the same as \lim_x→∞\left(1+\frac1x\right)^x=e.

Example 8. Find \lim_x→\inftyx^1/x. The form is ∞^0. With f(x)=x^1/x, \ln f(x)=(\ln x)/(x), an \frac∞∞ form, and \lim_x→∞(\ln x)/(x)=\lim(1/x)/(1)=0. So \lim_x→\inftyx^1/x=e^0=1.

Other examples. \lim_x→0^+x^x has the form 0^0: \ln x^x=x\ln x→0 by Example 5(b), so x^x→ e^0=1. And \lim_x→1^+x^1/(x-1) is 1^∞: (\ln x)/(x-1)→1, so the limit is e. In general \lim_x→∞\left(1+\frac px\right)^x=e^p.

The stepper below takes the form, shows the rewriting and runs the rule for every kind of indeterminate form: 0·∞, ∞-∞ and the powers.

Interactive: the other indeterminate forms

Products 0·∞, differences ∞−∞ and powers 1^∞, 0^0, ∞^0: see each one rewritten as a quotient (or through a logarithm) and the rule applied to it.

When does L’Hôpital’s Rule not help?

The rule is a tool with conditions, and three things can go wrong: the quotient is not indeterminate, the rule cycles, or the quotient of derivatives has no limit.

1. Not an indeterminate form. If the numerator has a finite limit that is not zero, or the quotient is already determinate, the rule must not be used. \lim_x→2(x^2+1)/(x+1)=\frac53 by substitution; differentiating would give \frac2x1→4, which is wrong. The same happens in the middle of a calculation, as in Example 2, once the quotient has stopped being \frac00.

2. The rule cycles. For \lim_x→∞(√(9x+1))/(√ x+1) the quotient of derivatives is (9√ x)/(√(9x+1)), again of the form \frac∞∞, and the next round brings back a quotient of the same kind: you just keep cycling. Algebra settles it: divide numerator and denominator by √ x to get (√(9+1/x))/(1+1/√ x)→3. Similarly (√(x^2+1))/(x) cycles between a quotient and its reciprocal, and the answer is 1.

3. The derivatives have no limit. The theorem says the limit of \frac fg equals the limit of (f')/(g') if the latter exists. For \lim_x→∞(x+\sin x)/(x) the quotient of derivatives is 1+\cos x, which has no limit, so the rule says nothing, and yet the original limit exists: (x+\sin x)/(x)=1+(\sin x)/(x)→1. In the same way \lim_x→0^+(x^2\sin(1/x))/(\sin x) has derivatives with \cos(1/x), which oscillates, while x\sin\frac1x·(x)/(\sin x)→0.

One-sided limits that differ. Example 3: (\sin x)/(x^2) goes to +∞ from the right and -∞ from the left; the two-sided limit does not exist, and the rule gives the one-sided values correctly.

In all these cases a limit read directly, or a little algebra such as dividing by the dominant term, does what the rule cannot. Try them below: the stepper reports the status, and for a cycle or a missing limit it also reads the original quotient directly.

Interactive: when the rule does not help

A quotient that is not indeterminate (where the rule gives a wrong number), one that cycles, one whose derivatives have no limit, and one-sided limits that differ: see what the stepper reports and what to do instead.

Why is L’Hôpital’s Rule true?

The rule comes from Cauchy's Mean Value Theorem, an extension of the Mean Value Theorem to two functions.

A picture first. Take f and g with continuous derivatives, f(a)=g(a)=0 and g'(a)\ne0. Near a they are close to their linearizations, f(x)=f'(a)(x-a)+\varepsilon_1(x-a) and g(x)=g'(a)(x-a)+\varepsilon_2(x-a), with \varepsilon_1,\varepsilon_2→0 as x→ a. Then (f(x))/(g(x))=(f'(a)+\varepsilon_1)/(g'(a)+\varepsilon_2)→(f'(a))/(g'(a))=\lim_x→ a(f'(x))/(g'(x)). The ratio of two functions that vanish at a is the ratio of their slopes there. The proof below needs neither g'(a)\ne0 nor continuous derivatives.

Cauchy's Mean Value Theorem. Suppose f and g are continuous on [a,b] and differentiable on (a,b), and g'(x)\ne0 throughout (a,b). Then there is a number c in (a,b) with (f'(c))/(g'(c))=(f(b)-f(a))/(g(b)-g(a)). When g(x)=x this is the Mean Value Theorem.

Proof. First, g(a)\ne g(b): otherwise the Mean Value Theorem would give g'(c)=(g(b)-g(a))/(b-a)=0 for some c, which is excluded. Then apply the Mean Value Theorem to F(x)=f(x)-f(a)-(f(b)-f(a))/(g(b)-g(a)) \big(g(x)-g(a)\big). F is continuous on [a,b] and differentiable on (a,b), and F(a)=F(b)=0. By Rolle's Theorem there is c with F'(c)=0, that is f'(c)-(f(b)-f(a))/(g(b)-g(a)) g'(c)=0, which rearranges to the claim. ∎ Geometrically, the curve (g(t),f(t)) has a tangent parallel to the secant through its ends, and the slope of that tangent is (f')/(g'). Draw a curve below and see the tangents.

Proof of l'Hôpital's Rule (the case x→ a^+, form \frac00). Since f(x)→0 and g(x)→0 and both are differentiable at a, they are continuous there and f(a)=g(a)=0. For x to the right of a apply Cauchy's theorem on [a,x]: there is c between a and x with (f'(c))/(g'(c))=(f(x)-f(a))/(g(x)-g(a))=(f(x))/(g(x)). As x→ a^+, c is squeezed between a and x, so c→ a^+, and therefore \lim_x→ a^+(f(x))/(g(x))=\lim_c→ a^+(f'(c))/(g'(c))=\lim_x→ a^+(f'(x))/(g'(x)). The case x→ a^- is the same on [x,a], and the two together give the two-sided rule. ∎

Interactive: Cauchy’s Mean Value Theorem

Two functions f and g on an interval give a curve (g(t), f(t)): see the secant through its ends and every tangent parallel to it, where f′(c)/g′(c) equals the secant slope, the fact behind l’Hôpital’s Rule.

How do you compute these limits in code?

In code, SymPy's sp.limit(expr, x, a, '+') finds limits exactly, and a few lines of sp.diff reproduce the rule round by round. Without a CAS, a table of the quotient at shrinking distances shows the limit, and the table of (f')/(g') next to it converges to the same number, which is the content of the rule. Numerical evaluation near a point has a trap that the rule does not: for (1+h)^1/h the computer rounds 1+h to 1 once h is below about 10^-16 and returns 1 instead of e, so a table must stop at moderate h.

Python and SymPy: the rule round by round
import sympy as sp

x = sp.symbols('x')


def lhopital(f, g, a, direction='+-', rounds=6):
    """Apply l'Hopital's Rule while the quotient is 0/0 or oo/oo; return the quotient at each round and the limit."""
    steps = []
    for _ in range(rounds):
        lf, lg = sp.limit(f, x, a, direction), sp.limit(g, x, a, direction)
        indeterminate = (lf == 0 and lg == 0) or (lf in (sp.oo, -sp.oo) and lg in (sp.oo, -sp.oo))
        steps.append((sp.simplify(f / g), 'rule' if indeterminate else 'stop'))
        if not indeterminate:
            break
        f, g = sp.diff(f, x), sp.diff(g, x)
    return steps, sp.limit(f / g, x, a, direction)


examples = (
    (3 * x - sp.sin(x), x, 0),                                        # Example 1a
    (x - sp.sin(x), x**3, 0),                                         # Example 1d: three rounds
    (1 - sp.cos(x), x + x**2, 0),                                     # Example 2: one round, then stop
    (sp.exp(x), x**2, sp.oo),                                         # Example 4c
    (sp.sin(x) - x, x * sp.sin(x), 0),                                # Example 6: 1/x - 1/sin x as one fraction
)
for f, g, a in examples:
    print(f, '/', g, 'at', a, '->', lhopital(f, g, a))
print(sp.limit((1 + x) ** (1 / x), x, 0, '+'), sp.limit(x ** (1 / x), x, sp.oo), sp.limit(x ** x, x, 0, '+'))
# 3*x - sin(x) / x at 0 -> ([(3 - sin(x)/x, 'rule'), (3 - cos(x), 'stop')], 2)
# x - sin(x) / x**3 at 0 -> ([((x - sin(x))/x**3, 'rule'), ((1 - cos(x))/(3*x**2), 'rule'), (sin(x)/(6*x), 'rule'), (cos(x)/6, 'stop')], 1/6)
# 1 - cos(x) / x**2 + x at 0 -> ([((1 - cos(x))/(x*(x + 1)), 'rule'), (sin(x)/(2*x + 1), 'stop')], 0)
# exp(x) / x**2 at oo -> ([(exp(x)/x**2, 'rule'), (exp(x)/(2*x), 'rule'), (exp(x)/2, 'stop')], oo)
# -x + sin(x) / x*sin(x) at 0 -> ([((-x/sin(x) + 1)/x, 'rule'), ((cos(x) - 1)/(x*cos(x) + sin(x)), 'rule'), (sin(x)/(x*sin(x) - 2*cos(x)), 'stop')], 0)
# E 1 1
JavaScript: the quotient and the quotient of derivatives
// the quotient f/g at shrinking distances from a: f/g and f'/g' (and the rounds after it) tend to the same number
const near = (f, g, a, hs = [0.1, 0.01, 0.001]) => hs.map((h) => +(f(a + h) / g(a + h)).toFixed(5))
const f = (x) => x - Math.sin(x)
const g = (x) => x ** 3                                              // Example 1d, whose limit is 1/6
near(f, g, 0)                                                        // [0.16658, 0.16667, 0.16667]   f/g
near((x) => 1 - Math.cos(x), (x) => 3 * x * x, 0)                    // [0.16653, 0.16667, 0.16667]   f'/g'
near((x) => Math.sin(x), (x) => 6 * x, 0)                            // [0.16639, 0.16666, 0.16667]   f''/g''
near((x) => Math.cos(x), () => 6, 0)                                 // [0.16583, 0.16666, 0.16667]   f'''/g''': no longer 0/0
// a power limit, and the trap of rounding: (1 + h)^(1/h) tends to e, until 1 + h is rounded to 1
;[1e-2, 1e-4, 1e-6].map((h) => (1 + h) ** (1 / h))                    // [2.7048138294215285, 2.7181459268249255, 2.7182804690957534]
;(1 + 1e-17) ** (1 / 1e-17)                                           // 1: 1 + 1e-17 is 1 in floating point
;[1e-2, 1e-4, 1e-8].map((h) => h * Math.log(h))                       // [-0.046, -0.00092, -1.84e-7]: x ln x -> 0
C++
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main() {
  double hs[3];
  hs[0] = 0.1; hs[1] = 0.01; hs[2] = 0.001;
  for (int i = 0; i < 3; i++) {                          // Example 1d: (x - sin x) / x^3, limit 1/6
    double h = hs[i];
    double q0 = (h - sin(h)) / (h * h * h);              // f / g
    double q1 = (1 - cos(h)) / (3 * h * h);              // f' / g'
    double q2 = sin(h) / (6 * h);                        // f'' / g''
    double q3 = cos(h) / 6;                              // f''' / g''', no longer 0/0
    printf("h=%.3f %.5f %.5f %.5f %.5f\n", h, q0, q1, q2, q3);
  }
  printf("%.5f\n", 1.0 / 6);
  printf("%.5f %.5f\n", pow(1.01, 100.0), pow(1.0001, 10000.0));    // (1 + h)^(1/h) tends to e = 2.71828
  return 0;
}

/* output:
h=0.100 0.16658 0.16653 0.16639 0.16583
h=0.010 0.16667 0.16667 0.16666 0.16666
h=0.001 0.16667 0.16667 0.16667 0.16667
0.16667
2.70481 2.71815
*/

Who discovered L’Hôpital’s Rule?

The rule carries the name of the man who published it, not of the man who found it.

  • Johann Bernoulli, 1691–92. The Swiss mathematician Johann Bernoulli, a young pupil of the new calculus of Leibniz, taught it in Paris to the French nobleman Guillaume de l'Hôpital, and in the lessons he gave the way of finding the value of a fraction whose numerator and denominator both vanish.
  • l'Hôpital, 1696. In his Analyse des infiniment petits pour l'intelligence des lignes courbes, the first textbook of the differential calculus, l'Hôpital printed the rule, saying that he owed much to Bernoulli and Leibniz. Under an agreement l'Hôpital paid Bernoulli for his discoveries and was free to use them.
  • A manuscript, 1921. Bernoulli's own lecture notes on the differential calculus were found in the 1920s, and they show that the rule, and much else in the textbook, is Bernoulli's. The name stayed.
  • Cauchy, 1823. Augustin-Louis Cauchy gave the general statement and the proof through the mean value theorem for two functions, which carries his name. The original rule dealt with the quotient of two expressions that vanish at a point; repeated use, one-sided limits and the form \frac∞∞ were settled in the 19th century.
  • Today. The rule is the first tool for indeterminate limits and the way that limits such as \frac\sin xx and (\ln x)/(x) are taught; computer algebra systems compute them with series, which is faster.

What mistakes do people make with L’Hôpital’s Rule?

The most common mistakes with indeterminate forms and l'Hôpital's Rule are the nine below, each with the correct statement.

MistakeCorrect
❌ Take the derivative of the quotient \left(\frac fg\right)'Divide the derivatives: (f')/(g'). For (x^2-1)/(x-1) at 1 the limit is (2x)/(1)→2, while \left(x+1\right)'=1.
❌ Use the rule on any limitOnly on \frac00 and \frac∞∞: \lim_x→2(x^2+1)/(x+1)=\frac53, and \frac2x1→4 is wrong.
❌ Keep differentiating after the form is gone(1-\cos x)/(x+x^2)→(\sin x)/(1+2x)→0; one more round gives the wrong \frac12.
❌ \frac00 is 1, or 0\frac xx→1, (x^3)/(x)→0, (x)/(x^3)→∞, (2x)/(x)→2: the label decides nothing.
❌ If (f')/(g') has no limit, neither has \frac fg\fracx+\sin xx→1 although 1+\cos x has no limit.
❌ 0·∞=0x\ln x→0, but x·\frac1x=1 and x·\frac1x^2→∞: rewrite as a quotient.
❌ 1^∞=1(1+x)^1/x→ e: take the logarithm and use e^L.
❌ ∞-∞=0x^2-x→∞ and x-x=0: combine into one fraction first.
❌ The one-sided result is the two-sided one(\sin x)/(x^2)→+∞ from the right and -∞ from the left: no two-sided limit.

Practice: test your understanding

These questions mix everything above. A wrong answer costs nothing here: read the hint and try again.

True or false?

Decide whether each statement is True or False.

  • L'Hôpital's Rule applies to the forms \frac00 and \frac∞∞.
  • To use it, differentiate the quotient with the quotient rule.
  • The rule may be applied again if the new quotient is still \frac00.
  • In \lim_x→0(1-\cos x)/(x+x^2) the rule should be applied a second time.
  • If (f')/(g') has no limit, then \frac fg has no limit.
  • A product of the form 0·∞ can be rewritten as a quotient.

Select all that apply

Choose all the indeterminate forms.

  • \frac00
  • \frac∞∞
  • \frac10
  • ∞-∞
  • 0·∞
  • 0^∞

Two rounds

Find \lim_x→0(e^x-1-x)/(x^2).

A sine over a line

Find \lim_x→0(\sin5x)/(x).

Leading coefficients

Find \lim_x→∞(3x^2+1)/(5x^2-x).

A product

What is \lim_x→0^+x\ln x, and how is it found?

  • 0: write it as (\ln x)/(1/x), an \frac∞∞ form, and apply the rule
  • -∞, because \ln x→-∞
  • 1, because x·\ln x is a product of ones
  • it does not exist

A power of e

\lim_x→∞\left(1+\frac3x\right)^x=e^k. Find k.

Should the rule be used?

Why must the rule not be used for \lim_x→2(x^2+1)/(x+1)?

  • the quotient is \frac53 at 2: it is not \frac00 or \frac∞∞
  • the limit does not exist
  • x^2+1 is not differentiable
  • the rule never works for polynomials

A logarithm over a line

Find \lim_x→1(\ln x)/(x-1).

A rule that cycles

What happens with \lim_x→∞(√(9x+1))/(√ x+1), and what is the limit?

  • the rule cycles; dividing by √ x shows the limit is 3
  • the rule gives 9
  • the limit is ∞
  • the limit does not exist

Exponentials around zero

Find \lim_x→0(e^x-e^-x)/(\sin x).

One side or two

What is \lim_x→0(\sin x)/(x^2)?

  • it does not exist: +∞ from the right and -∞ from the left
  • 0
  • 1
  • +∞

Summary: L’Hôpital’s Rule at a glance

  • Indeterminate forms: \frac00, \frac∞∞, 0·∞, ∞-∞, 1^∞, 0^0, ∞^0 describe limits that the parts do not decide.
  • The rule: \frac00 or \frac∞∞ at a gives \lim\frac fg=\lim(f')/(g') if the right side exists or is ±∞; also for one-sided limits and a=±∞.
  • How: differentiate f and g separately, repeat while the form stays indeterminate, stop at the first quotient that is not.
  • Other forms: products and differences become a quotient by algebra; powers by \ln, then e^L.
  • Growth: \ln x≪ x^p≪ e^x as x→∞.
  • When it fails: a determinate quotient, a cycle (√(9x+1)/(√ x+1)), or (f')/(g') without a limit ((x+\sin x)/x).
  • Proof: Cauchy's Mean Value Theorem, (f'(c))/(g'(c))=(f(b)-f(a))/(g(b)-g(a)), then squeeze c between a and x.
  • Next: applied optimization, the closed interval method put to work on real problems.
  • Code: sp.limit(expr, x, a, '+'), sp.diff for the rounds, and tables at moderate distances.

Glossary: key terms

Indeterminate form
A label for a limit, such as zero over zero, whose value is not decided by the limits of its parts and can come out as any number or infinity.
L’Hôpital’s Rule
The rule that the limit of a quotient of the form zero over zero or infinity over infinity equals the limit of the quotient of the derivatives, if that limit exists.
Cauchy’s Mean Value Theorem
The Mean Value Theorem for two functions: for some point c, the ratio of the derivatives equals the ratio of the changes of the functions over the interval.
Indeterminate power
A limit of the form one to the infinity, zero to the zero or infinity to the zero, found by taking the logarithm of the function and exponentiating the limit.
One-sided limit
The limit as x approaches a from only the right or only the left; the two-sided limit exists only if both are equal.
Growth rate
How fast a function grows as x goes to infinity; a logarithm grows slower than any power, and an exponential faster than any power.

Frequently asked questions

What is L’Hôpital’s Rule?

It is a rule for limits of quotients. If the numerator and the denominator both go to zero, or both go to infinity, the limit of the quotient equals the limit of the quotient of their derivatives, provided that second limit exists or is infinite.

What is an indeterminate form?

It is a label such as zero over zero or infinity over infinity for a limit whose value the limits of the parts do not decide. Different limits with the same label give different results, so the label itself is not a number.

Do you use the quotient rule in L’Hôpital’s Rule?

No. You differentiate the numerator and the denominator separately and then divide, which gives f prime over g prime. Taking the derivative of the whole quotient is a common mistake and gives a different, wrong number.

When should you stop applying L’Hôpital’s Rule?

Stop as soon as the quotient is no longer of the form zero over zero or infinity over infinity. Then the limit can be read directly. Applying the rule once more to a quotient that is not indeterminate gives a wrong answer.

How do you handle the form zero times infinity?

Rewrite the product as a quotient by moving one factor to the denominator as its reciprocal, for example x times the logarithm of x as the logarithm of x over one over x. That is infinity over infinity, and the rule applies.

How do you find a limit of the form one to the infinity?

Take the natural logarithm of the function, which turns the power into a product and then into a quotient. Find the limit L with the rule, and the original limit is e to the power L. For example, one plus x to the 1 over x tends to e.

When does L’Hôpital’s Rule fail?

When the quotient is not indeterminate, when repeated use cycles through the same kind of quotient, or when the quotient of derivatives has no limit although the original does, as for x plus sine x over x at infinity.

How is L’Hôpital’s Rule proved?

With Cauchy’s Mean Value Theorem, which says that for two functions there is a point where the ratio of the derivatives equals the ratio of the changes. Applied between a and x, that point is squeezed toward a as x approaches a.

Who discovered L’Hôpital’s Rule?

Johann Bernoulli found it and taught it to Guillaume de l’Hôpital, who printed it in 1696 in the first textbook of the differential calculus. It is named after the author of the book, and Bernoulli’s own notes confirm it was his.

References

  1. Joel Hass, Christopher Heil, Maurice D. Weir et al. (2023). Thomas' Calculus: Early Transcendentals in SI Units (15th ed.), Section 4.5: Indeterminate Forms and L'Hôpital's Rule. Pearson.
  2. James Stewart (2015). Calculus (8th ed.), section 4.4: Indeterminate Forms and l'Hospital's Rule. Cengage Learning.
  3. Guillaume de l'Hôpital (1696). Analyse des infiniment petits pour l'intelligence des lignes courbes. Paris.
  4. Augustin-Louis Cauchy (1823). Résumé des leçons données à l'École royale polytechnique sur le calcul infinitésimal. Paris.
  • The Mean Value Theorem: The Mean Value Theorem and Rolle’s Theorem: statements, proofs, how to find c, speed and rates, and the corollaries about constant functions, with examples and code.
  • Monotonic Functions and the First Derivative Test: Monotonic functions and the First Derivative Test: where a function rises and falls from the sign of f′, local extrema, sign charts and inequalities, with code.
  • Concavity and Curve Sketching: Concavity and curve sketching: the second derivative, points of inflection, the Second Derivative Test and seven steps to sketch a graph, with examples and code.
  • Derivatives of Inverse Functions and Logarithms: Derivatives of inverse functions and logarithms: the rule for inverses, d/dx ln x = 1/x, a^x, log base a, logarithmic differentiation, and the number e.