L'Hôpital's Rule

L'Hôpital's rule is a technique for evaluating limits that result in **indeterminate forms** by differentiating the numerator and the denominator.

Contents
  1. Statement
  2. Important Warning
  3. When Can You Use It?
  4. Step-by-Step Method
  5. Examples
  6. Example 1: \dfrac{0}{0}
  7. Example 2: \dfrac{\infty}{\infty}
  8. Example 3: Repeated application
  9. Other Indeterminate Forms
  10. Example: 0 \cdot \infty
  11. Example: 1^\infty
  12. Common Mistakes
  13. Connection to Taylor Series
  14. Quick Python Check

Statement #

Let f and g be differentiable near a (except possibly at a), with g'(x) \neq 0 near a. If

\lim_{x \to a} \frac{f(x)}{g(x)}

produces the indeterminate form \dfrac{0}{0} or \dfrac{\pm\infty}{\pm\infty}, then:

\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}

provided the limit on the right exists (or is \pm\infty).

The rule also works for x \to \pm\infty and for one-sided limits.

Important Warning #

Differentiate the numerator and denominator separately. This is not the quotient rule.

\frac{d}{dx}\left[\frac{f}{g}\right] \neq \frac{f'}{g'}

When Can You Use It? #

Always check these conditions first:

  1. The limit has the form \frac{0}{0} or \frac{\infty}{\infty}.
  2. f and g are differentiable near the point.
  3. \lim \frac{f'}{g'} exists or is infinite.

If the form is not indeterminate, applying the rule gives wrong answers.

Step-by-Step Method #

  1. Substitute the limit value and confirm it is \frac{0}{0} or \frac{\infty}{\infty}.
  2. Differentiate the numerator and the denominator separately.
  3. Evaluate the new limit.
  4. If it is still indeterminate, apply the rule again.

Examples #

Example 1: \dfrac{0}{0} #

\lim_{x \to 0} \frac{\sin x}{x}

Direct substitution gives \frac{0}{0}. Applying the rule:

\lim_{x \to 0} \frac{\cos x}{1} = 1

Example 2: \dfrac{\infty}{\infty} #

\lim_{x \to \infty} \frac{x^2}{e^x}

Applying the rule twice:

\lim_{x \to \infty} \frac{2x}{e^x} = \lim_{x \to \infty} \frac{2}{e^x} = 0

This shows that exponentials grow faster than polynomials.

Example 3: Repeated application #

\lim_{x \to 0} \frac{e^x - 1 - x}{x^2} = \lim_{x \to 0} \frac{e^x - 1}{2x} = \lim_{x \to 0} \frac{e^x}{2} = \frac{1}{2}

Other Indeterminate Forms #

The rule applies directly only to \frac{0}{0} and \frac{\infty}{\infty}. Other forms must be rewritten first.

Form Strategy
0 \cdot \infty Rewrite as \dfrac{f}{1/g} or \dfrac{g}{1/f}
\infty - \infty Combine into a single fraction
0^0, 1^\infty, \infty^0 Take the logarithm: \ln L = \lim g \cdot \ln f

Example: 0 \cdot \infty #

\lim_{x \to 0^+} x \ln x = \lim_{x \to 0^+} \frac{\ln x}{1/x} = \lim_{x \to 0^+} \frac{1/x}{-1/x^2} = \lim_{x \to 0^+} (-x) = 0

Example: 1^\infty #

L = \lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x \;\Rightarrow\; \ln L = \lim_{x \to \infty} \frac{\ln(1 + 1/x)}{1/x} = 1 \;\Rightarrow\; L = e

Common Mistakes #

  • Using the rule when the form is not indeterminate.
  • Applying the quotient rule instead of differentiating separately.
  • Looping forever, for example with \lim_{x\to\infty} \frac{\sqrt{x^2+1}}{x}, where the derivatives keep swapping. Use algebra instead.
  • Forgetting that the new limit must exist for the conclusion to hold.

Connection to Taylor Series #

L'Hôpital's rule is closely related to Taylor expansions. For \frac{0}{0} limits, replacing the functions by their Taylor polynomials often gives the same answer faster:

\frac{\sin x}{x} \approx \frac{x - x^3/6}{x} = 1 - \frac{x^2}{6} \;\to\; 1

Quick Python Check #

import sympy as sp

x = sp.symbols("x")
print(sp.limit(sp.sin(x) / x, x, 0))          # 1
print(sp.limit(x**2 / sp.exp(x), x, sp.oo))   # 0
print(sp.limit(x * sp.log(x), x, 0, "+"))     # 0

Comments

Loading comments…