L'Hôpital's Rule
L'Hôpital's Rule — Computing Indeterminate-Form Limits
Basic (University Year 1–2)
L'Hôpital's rule is typically introduced in first-year university calculus. It is a powerful method for evaluating indeterminate-form limits and an important application of differentiation.
In many introductory courses, problems are designed so that they can also be solved without L'Hôpital's rule.
Contents
16.1 What Are Indeterminate Forms?
When we try to evaluate a limit directly, we sometimes obtain a form such as $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$. Such a form is called an indeterminate form.
An indeterminate form is one whose limit is not determined by its form alone. For example, $\displaystyle\lim_{x \to 0}\dfrac{x}{x} = 1$ and $\displaystyle\lim_{x \to 0}\dfrac{x^2}{x} = 0$ are both of the same $\dfrac{0}{0}$ form, yet their limits differ. This is exactly why we must examine how fast the numerator and denominator approach zero (or infinity) — which is what L'Hôpital's rule does.
- The $\dfrac{0}{0}$ form
- The $\dfrac{\infty}{\infty}$ form
- The $0 \cdot \infty$ form
- The $\infty - \infty$ form
- The $0^0$, $1^\infty$, $\infty^0$ forms
16.2 L'Hôpital's Rule (the $\dfrac{0}{0}$ form)
If $\displaystyle\lim_{x \to a} f(x) = 0$, $\displaystyle\lim_{x \to a} g(x) = 0$, and $\displaystyle\lim_{x \to a} \dfrac{f'(x)}{g'(x)}$ exists, then:
$$\lim_{x \to a} \dfrac{f(x)}{g(x)} = \lim_{x \to a} \dfrac{f'(x)}{g'(x)}$$Note: Strictly speaking, one also needs $|a| < \infty$, that $f$ and $g$ are differentiable near $a$, and that $g'(x) \neq 0$ near $a$.
- Is the limit a $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$ form?
- Are the numerator and denominator each differentiable?
- Does $\displaystyle\lim \dfrac{f'(x)}{g'(x)}$ exist (does it not oscillate)?
16.2.1 Intuitive understanding: why does the "ratio of slopes" give the answer?
Let us first understand intuitively why L'Hôpital's rule holds, using approximation by tangent lines.
When $f(x) \to 0$ and $g(x) \to 0$ as $x \to 0$, near $x = 0$ the functions $f(x)$ and $g(x)$ can be approximated by lines through the origin with slopes $f'(0)$ and $g'(0)$:
$$f(x) \approx f'(0) x$$ $$g(x) \approx g'(0) x$$Therefore:
$$\dfrac{f(x)}{g(x)} \approx \dfrac{f'(0) \bcancel{x}}{g'(0) \bcancel{x}} = \dfrac{f'(0)}{g'(0)}$$In other words, it is a race over "which one approaches zero faster," and what determines that speed is the slope of the tangent line.
Slope at x = 0
$f'(0) = -2 \cdot 0 = 0$ (blue)
$g'(0) = 1$ (red)
Ratio of slopes at x = 0 = the limit value
$\dfrac{f'(0)}{g'(0)} = \dfrac{0}{1} = 0$
∴ $\displaystyle\lim_{x \to 0} \dfrac{-x^2}{x} = 0$
For $\dfrac{-x^2}{x}$ as $x \to 0$, both tend to zero, but:
- $-x^2$ already has slope close to $0$ near $x=0$ → it reaches zero quickly
- $x$ approaches $0$ linearly with slope $1$ → it reaches zero at a normal pace
"fast ÷ normal" = $0/1 = 0$ is the limit value.
16.2.2 Proof 1: a simple proof from the definition of the derivative
Note: This is a simplified version that assumes $a$ is finite and that $f(x)$, $g(x)$ are differentiable at $x = a$ (because it uses $x - a$, $a = \pm\infty$ is not allowed).
When $f(a) = g(a) = 0$ and $x \neq a$, we can rewrite as follows:
$$\dfrac{f(x)}{g(x)} = \dfrac{f(x) - f(a)}{g(x) - g(a)} = \dfrac{\dfrac{f(x) - f(a)}{x - a}}{\dfrac{g(x) - g(a)}{x - a}}$$As $x \to a$, the numerator and denominator each tend to a derivative by definition:
$$\lim_{x \to a} \dfrac{f(x) - f(a)}{x - a} = f'(a), \quad \lim_{x \to a} \dfrac{g(x) - g(a)}{x - a} = g'(a)$$and therefore the following holds.
$$\lim_{x \to a} \dfrac{f(x)}{g(x)} = \dfrac{f'(a)}{g'(a)}$$16.2.3 Proof 2: a rigorous proof via Cauchy's mean value theorem
Because Cauchy's theorem applies on a finite interval, we take $a$ finite; but it is enough that $f(x)$, $g(x)$ are differentiable in a neighborhood of $x = a$ — they need not be differentiable at $x = a$ itself (so this is more general than Proof 1).
Assume $f(a) = g(a) = 0$ (even if $x = a$ is undefined or discontinuous, the function can be continuously extended using the limit value).
Step 1: By Cauchy's mean value theorem, there exists a point $c$ between $a$ and $x$ at which the following holds.
\begin{equation} \dfrac{f(x) - f(a)}{g(x) - g(a)} = \dfrac{f'(c)}{g'(c)} \label{eq:cauchy} \end{equation}Step 2: Since we assume $f(a) = g(a) = 0$, equation $\eqref{eq:cauchy}$ can be written as
$$ \dfrac{f(x) - \bcancel{f(a)}}{g(x) - \bcancel{g(a)}} = \dfrac{f(x)}{g(x)} = \dfrac{f'(c)}{g'(c)} $$Step 3: Since $c$ lies between $x$ and $a$, we have $c \to a$ as $x \to a$ (squeeze principle).
$$\lim_{x \to a} \dfrac{f(x)}{g(x)} = \lim_{c \to a} \dfrac{f'(c)}{g'(c)} = \lim_{x \to a} \dfrac{f'(x)}{g'(x)}$$Step 1: Check the indeterminate form
As $x \to 0$, the numerator $e^x - 1 \to e^0 - 1 = 0$ and the denominator $x \to 0$, so this is a $\dfrac{0}{0}$ indeterminate form.
Step 2: Check the conditions of L'Hôpital's rule
Check that the numerator and denominator are differentiable:
- Derivative of the numerator: $(e^x - 1)' = e^x$ (differentiable for all $x$)
- Derivative of the denominator: $(x)' = 1 \neq 0$ (the condition holds)
Step 3: Apply L'Hôpital's rule
Differentiate the numerator and denominator separately and compute the new limit:
$$\lim_{x \to 0} \dfrac{e^x - 1}{x} = \lim_{x \to 0} \dfrac{(e^x - 1)'}{(x)'} = \lim_{x \to 0} \dfrac{e^x}{1}$$Step 4: Compute the new limit
Since $e^x$ is continuous at $x=0$, we can substitute directly:
$$\lim_{x \to 0} \dfrac{e^x}{1} = \dfrac{e^0}{1} = \dfrac{1}{1} = 1$$Meaning: near $x \approx 0$, the approximation $e^x - 1 \approx x$ holds (the tangent slope of the exponential function is $1$).
Step 1: Check the indeterminate form
As $x \to 0$, the numerator $1 - \cos x \to 1 - 1 = 0$ and the denominator $x^2 \to 0$, so this is the $\dfrac{0}{0}$ form.
Step 2: First application of L'Hôpital's rule
Derivatives of the numerator and denominator:
- Numerator: $(1 - \cos x)' = 0 - (-\sin x) = \sin x$
- Denominator: $(x^2)' = 2x$
Step 3: Identify the form of the new limit
As $x \to 0$, $\sin x \to 0$ and $2x \to 0$, so it is again the $\dfrac{0}{0}$ form.
→ L'Hôpital's rule can be applied once more.
Step 4: Second application of L'Hôpital's rule
Differentiate the numerator and denominator again:
- Numerator: $(\sin x)' = \cos x$
- Denominator: $(2x)' = 2$
Step 5: Compute the final limit
Since $\cos x$ is continuous at $x=0$:
$$\lim_{x \to 0} \dfrac{\cos x}{2} = \dfrac{\cos 0}{2} = \dfrac{1}{2}$$Meaning: near $x \approx 0$, the approximation $1 - \cos x \approx \dfrac{x^2}{2}$ holds (Taylor expansion).
Step 1: Check the indeterminate form
As $x \to 0$, the numerator $\sin x \to 0$ and the denominator $x \to 0$, so this is the $\dfrac{0}{0}$ form.
Step 2: Apply L'Hôpital's rule formally
Compute the derivatives of the numerator and denominator:
- Numerator: $(\sin x)' = \cos x$
- Denominator: $(x)' = 1$
Step 3: Compute the new limit
Since $\cos x$ is continuous:
$$\lim_{x \to 0} \dfrac{\cos x}{1} = \cos 0 = 1$$
⚠️ Important warning: the danger of circular reasoning
Proving the fact that $(\sin x)' = \cos x$ actually requires this very limit $\displaystyle\lim_{x \to 0} \dfrac{\sin x}{x} = 1$.
In other words, we fall into circular reasoning: "we use L'Hôpital's rule to find this limit, and we use this limit to justify L'Hôpital's rule."
The correct method: this limit should be proved by a geometric argument (the squeeze principle, comparing areas). For details, see Chapter 9.
Use on exams: however, it is fine to use L'Hôpital's rule to "double-check" an answer you obtained another way.
16.2.4 On repeated application
If $f'(a) = g'(a) = 0$ and $\displaystyle\lim_{x \to a}\dfrac{f''(x)}{g''(x)}$ exists, then the conditions of L'Hôpital's rule are met, so the theorem can be applied again (it can be applied as many times as the conditions hold!).
$$\lim_{x \to a} \dfrac{f(x)}{g(x)} = \lim_{x \to a} \dfrac{f'(x)}{g'(x)} = \lim_{x \to a} \dfrac{f''(x)}{g''(x)} = \cdots$$Note: However, differentiating the numerator and denominator does not always make the expression simpler. If differentiation makes it more complicated, consider another method as well.
16.3 L'Hôpital's Rule (the $\dfrac{\infty}{\infty}$ form)
If $\displaystyle\lim_{x \to a} f(x) = \pm\infty$, $\displaystyle\lim_{x \to a} g(x) = \pm\infty$, and $\displaystyle\lim_{x \to a} \dfrac{f'(x)}{g'(x)}$ exists, then:
$$\lim_{x \to a} \dfrac{f(x)}{g(x)} = \lim_{x \to a} \dfrac{f'(x)}{g'(x)}$$Note: As with the $\dfrac{0}{0}$ form, one needs "differentiable near $a$" and "$g'(x) \neq 0$." Here $a = \pm\infty$ is allowed.
Why it holds: an $\dfrac{\infty}{\infty}$ limit can be reduced to a $\dfrac{0}{0}$ limit by rewriting $\dfrac{f(x)}{g(x)} = \dfrac{1/g(x)}{1/f(x)}$. The rigorous proof is technically more involved than the $\dfrac{0}{0}$ case, but the conclusion has the same form.
A technique for $x \to \infty$: substituting $t = 1/x$ reduces $x \to \infty$ to $t \to 0^+$. This lets us treat it within the framework of Proofs 1 and 2 (which assume $|a| < \infty$).
Step 1: Check the indeterminate form
As $x \to \infty$, the numerator $\ln x \to \infty$ and the denominator $x \to \infty$, so this is the $\dfrac{\infty}{\infty}$ form.
Intuitively: "the logarithm tends to infinity, and $x$ also tends to infinity. Which one goes to infinity faster?" — a race.
Step 2: Check the conditions of L'Hôpital's rule
Derivatives of the numerator and denominator:
- Numerator: $(\ln x)' = \dfrac{1}{x}$ (differentiable for $x > 0$)
- Denominator: $(x)' = 1 \neq 0$ (the condition holds)
Step 3: Apply L'Hôpital's rule
$$\lim_{x \to \infty} \dfrac{\ln x}{x} = \lim_{x \to \infty} \dfrac{(\ln x)'}{(x)'} = \lim_{x \to \infty} \dfrac{1/x}{1} = \lim_{x \to \infty} \dfrac{1}{x}$$Step 4: Compute the new limit
As $x \to \infty$, $\dfrac{1}{x} \to 0$, so:
$$\lim_{x \to \infty} \dfrac{1}{x} = 0$$Meaning: the logarithm $\ln x$ tends to infinity, but the linear function $x$ tends to infinity much faster. In other words, "$x$ is overwhelmingly stronger than $\ln x$."
Step 1: Check the indeterminate form and the strategy
As $x \to \infty$, the numerator $e^x \to \infty$ and the denominator $x^n \to \infty$, so this is the $\dfrac{\infty}{\infty}$ form.
The intuitive question: "the exponential versus the polynomial — which goes to infinity faster?"
Strategy: the numerator stays $e^x$ no matter how many times we differentiate. The denominator is a polynomial, so after differentiating $n$ times it becomes a constant tending to zero in degree. Hence applying L'Hôpital's rule $n$ times settles it.
Step 2: Apply L'Hôpital's rule repeatedly
First differentiation:
$$\lim_{x \to \infty} \dfrac{e^x}{x^n} = \lim_{x \to \infty} \dfrac{(e^x)'}{(x^n)'} = \lim_{x \to \infty} \dfrac{e^x}{nx^{n-1}}$$This is still the $\dfrac{\infty}{\infty}$ form, so we differentiate a second time:
$$= \lim_{x \to \infty} \dfrac{e^x}{n(n-1)x^{n-2}}$$And we continue... (each time the degree of the denominator drops by one)
Step 3: The form after $n$ differentiations
After applying L'Hôpital's rule $n$ times, the polynomial in the denominator is entirely consumed and becomes the constant $n! = n(n-1)(n-2)\cdots 2 \cdot 1$:
$$\lim_{x \to \infty} \dfrac{e^x}{x^n} = \lim_{x \to \infty} \dfrac{e^x}{n!}$$Step 4: Compute the final limit
The numerator $e^x \to \infty$ and the denominator $n!$ is a constant, so:
$$\lim_{x \to \infty} \dfrac{e^x}{n!} = \infty$$Conclusion: the exponential $e^x$ tends to infinity faster than any power function $x^n$. This is an extremely important property in mathematics and physics.
For example: $1 < \ln x < x < x^2 < x^{100} < e^x < e^{2x}$
16.4 Converting Other Indeterminate Forms
16.4.1 The $0 \cdot \infty$ form
Problem: what happens when $0$ and $\infty$ are multiplied together?
Approach: convert the product $f \cdot g$ into a fraction $\dfrac{f}{1/g}$ or $\dfrac{g}{1/f}$, reducing it to the $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$ form. Then ordinary L'Hôpital's rule applies.
Step 1: Check the indeterminate form
As $x \to 0^+$:
- $x \to 0^+$ (tends to zero)
- $\ln x \to -\infty$ (tends to negative infinity)
Step 2: Convert the indeterminate form into a fraction
To turn $x \ln x$ into a fraction, put one factor in the numerator and the reciprocal of the other in the denominator. Here we put $\ln x$ in the numerator and $1/x$ in the denominator:
$$\lim_{x \to 0^+} x \ln x = \lim_{x \to 0^+} \dfrac{\ln x}{1/x}$$Step 3: Check the form of the new limit
As $x \to 0^+$:
- Numerator: $\ln x \to -\infty$
- Denominator: $\dfrac{1}{x} \to +\infty$
Step 4: Apply L'Hôpital's rule
Compute the derivatives of the numerator and denominator:
- Numerator: $(\ln x)' = \dfrac{1}{x}$
- Denominator: $\left(\dfrac{1}{x}\right)' = -\dfrac{1}{x^2}$
Step 5: Simplify the fraction
Multiply numerator and denominator by $x^2$ and simplify:
$$\lim_{x \to 0^+} \dfrac{1/x}{-1/x^2} = \lim_{x \to 0^+} \dfrac{1}{x} \cdot \dfrac{x^2}{-1} = \lim_{x \to 0^+} \dfrac{x^2}{-x} = \lim_{x \to 0^+} (-x)$$Step 6: Compute the final limit
As $x \to 0^+$, $-x \to 0$, so:
$$\lim_{x \to 0^+} (-x) = 0$$Meaning: $0$ is "stronger" than $\infty$, so in the end it converges to $0$. Intuitively, when $x$ is very small, the smallness of $x$ wins over the negative magnitude of $\ln x$.
16.4.2 The $\infty - \infty$ form
Use a common denominator or other rearrangement to reduce it to a $\dfrac{0}{0}$ form, etc.
Step 1: Check the indeterminate form
As $x \to 0^+$:
- $\dfrac{1}{\sin x} \to +\infty$ (positive infinity)
- $\dfrac{1}{x} \to +\infty$ (positive infinity)
Step 2: Combine into a single fraction
To turn the subtraction into a fraction, combine over a common denominator:
$$\lim_{x \to 0^+} \left(\dfrac{1}{\sin x} - \dfrac{1}{x}\right) = \lim_{x \to 0^+} \dfrac{x - \sin x}{x \sin x}$$Step 3: Check the form of the new limit
As $x \to 0^+$:
- Numerator: $x - \sin x \to 0 - 0 = 0$
- Denominator: $x \sin x \to 0 \cdot 0 = 0$
Step 4: Apply L'Hôpital's rule (first time)
Compute the derivatives of the numerator and denominator:
- Derivative of the numerator: $(x - \sin x)' = 1 - \cos x$
- Derivative of the denominator: $(x \sin x)' = \sin x + x \cos x$ (product rule)
Step 5: Check the form of the new limit
As $x \to 0^+$:
- Numerator: $1 - \cos x \to 1 - 1 = 0$
- Denominator: $\sin x + x \cos x \to 0 + 0 \cdot 1 = 0$
Step 6: Apply L'Hôpital's rule (second time)
Differentiate the numerator and denominator once more:
- Derivative of the numerator: $(1 - \cos x)' = \sin x$
- Derivative of the denominator: $(\sin x + x \cos x)' = \cos x + (\cos x - x\sin x) = 2\cos x - x\sin x$
Step 7: Compute the final limit
As $x \to 0^+$, both the numerator and the denominator tend to definite values:
- Numerator: $\sin x \to 0$
- Denominator: $2\cos x - x\sin x \to 2 \cdot 1 - 0 = 2$
Meaning: near $x \approx 0$, $\dfrac{1}{\sin x}$ and $\dfrac{1}{x}$ are very close in value, but $\dfrac{1}{\sin x}$ is slightly larger, so the result of the subtraction converges to $0$.
16.4.3 The $0^0$, $1^\infty$, $\infty^0$ forms
Common strategy: we cannot compute the exponential form $f^g$ directly, so take the logarithm and convert to the product form $\ln(f^g) = g \ln f$.
Step 1: Check the indeterminate form
As $x \to 0^+$, $x^x$ is the $0^0$ form, where "the base tends to $0$ and the exponent also tends to $0$."
Intuitively: "what is zero to the zeroth power?"
Step 2: Take the logarithm to bring down the exponent
Set $y = x^x$ and take the natural logarithm of both sides:
$$\ln y = \ln(x^x) = x \ln x$$Step 3: Find the limit of $\ln y$
Now it suffices to find the limit of $x \ln x$. We already computed this in Example 6:
$$\lim_{x \to 0^+} \ln y = \lim_{x \to 0^+} x \ln x = 0$$Step 4: Find the limit of the original $y$
If $\lim_{x \to 0^+} \ln y = 0$, then the limit of the original $y$ is:
$$\lim_{x \to 0^+} y = e^{\lim_{x \to 0^+} \ln y} = e^0 = 1$$Conclusion: $\displaystyle\lim_{x \to 0^+} x^x = 1$. That is, in the sense of limits $0^0$ is defined to be $1$.
Step 1: Check the indeterminate form
As $x \to \infty$:
- Base: $1 + \dfrac{1}{x} \to 1 + 0 = 1$ (tends to $1$)
- Exponent: $x \to \infty$ (tends to infinity)
Step 2: Take the logarithm to bring down the exponent
Set $y = \left(1 + \dfrac{1}{x}\right)^x$ and take the natural logarithm:
$$\ln y = x \ln\left(1 + \dfrac{1}{x}\right)$$Step 3: Recognize the form of $\ln y$
As $x \to \infty$:
- $x \to \infty$ (infinity)
- $\ln\left(1 + \dfrac{1}{x}\right) \to \ln 1 = 0$ (zero)
Step 4: Substitute to convert to the $\dfrac{0}{0}$ form
Let $t = \dfrac{1}{x}$; then $t \to 0^+$ as $x \to \infty$.
Also $x = \dfrac{1}{t}$, so:
$$\lim_{x \to \infty} x \ln\left(1 + \dfrac{1}{x}\right) = \lim_{t \to 0^+} \dfrac{1}{t} \ln(1+t) = \lim_{t \to 0^+} \dfrac{\ln(1+t)}{t}$$This has been reduced to the $\dfrac{0}{0}$ form.
Step 5: Apply L'Hôpital's rule
Compute the derivatives of the numerator and denominator:
- Numerator: $(\ln(1+t))' = \dfrac{1}{1+t}$
- Denominator: $(t)' = 1$
Step 6: Compute the final limit
As $t \to 0^+$:
$$\lim_{t \to 0^+} \dfrac{1}{1+t} = \dfrac{1}{1+0} = 1$$Step 7: Find the limit of the original $y$
If $\lim_{x \to \infty} \ln y = 1$, then:
$$\lim_{x \to \infty} y = e^1 = e$$Conclusion: $\displaystyle\lim_{x \to \infty} \left(1 + \dfrac{1}{x}\right)^x = e$. This is the definition of the base of the natural logarithm, $e \approx 2.71828\ldots$.
16.5 Cautions
- It cannot be used when the expression is not an indeterminate form
- $\displaystyle\lim \dfrac{f'}{g'}$ may fail to exist (the conditions of the theorem are not met)
- When a problem can be solved by a simple computation, not using L'Hôpital's rule is sometimes faster
- It can be applied repeatedly, but be careful that it does not become too complicated
16.5.1 An example where L'Hôpital's rule fails
❌ Why L'Hôpital's rule cannot be used
At $x \to 0$ it superficially looks like the $\dfrac{0}{0}$ form, but…
Differentiating the numerator:
$$(x^2 \sin(1/x))' = 2x \sin(1/x) - \cos(1/x)$$Derivative of the denominator: $(x)' = 1$
As $x \to 0$, $2x\sin(1/x) \to 0$, but $\cos(1/x)$ oscillates forever between $-1$ and $1$, so $\displaystyle\lim \dfrac{f'(x)}{g'(x)}$ does not exist.
⟹ The conditions of L'Hôpital's rule are not satisfied, so it cannot be used!
✓ Correct method: use a different approach
Use the squeeze principle. Since $\left|\sin(1/x)\right| \leq 1$:
$$\left|\dfrac{x^2 \sin(1/x)}{x}\right| = |x \sin(1/x)| \leq |x| \to 0 \quad (x \to 0)$$Therefore $\displaystyle\lim_{x \to 0} \dfrac{x^2 \sin(1/x)}{x} = 0$
L'Hôpital's rule is conditional on "when $\displaystyle\lim \dfrac{f'}{g'}$ exists."
Even when $\displaystyle\lim \dfrac{f'}{g'}$ does not exist, the original limit $\displaystyle\lim \dfrac{f}{g}$ may still exist.
16.6 Exercises
Evaluate the following limits using L'Hôpital's rule.
- $\displaystyle\lim_{x \to 0} \dfrac{e^x - 1 - x}{x^2}$
- $\displaystyle\lim_{x \to 0} \dfrac{\tan x - x}{x^3}$
- $\displaystyle\lim_{x \to \infty} \dfrac{x^3}{e^x}$
Evaluate $\displaystyle\lim_{x \to 0^+} x^{\sin x}$.
Show solutions
Solution to Exercise 1
- Approach: the $\dfrac{0}{0}$ form. After one application it is still $\dfrac{0}{0}$, so apply once more.
$\displaystyle\lim \dfrac{e^x - 1}{2x}$ (still $\dfrac{0}{0}$) → $\displaystyle\lim \dfrac{e^x}{2} = \dfrac{1}{2}$ - Approach: the $\dfrac{0}{0}$ form. After one application, use $\tan^2 x / x^2 \to 1$.
$\displaystyle\lim \dfrac{\sec^2 x - 1}{3x^2} = \displaystyle\lim \dfrac{\tan^2 x}{3x^2} = \dfrac{1}{3}\displaystyle\lim \dfrac{\tan^2 x}{x^2} = \dfrac{1}{3}$ - Approach: the $\dfrac{\infty}{\infty}$ form. Repeat until the numerator's degree becomes $0$ (three times).
$\displaystyle\lim \dfrac{3x^2}{e^x} \to \displaystyle\lim \dfrac{6x}{e^x} \to \displaystyle\lim \dfrac{6}{e^x} = 0$
Solution to Exercise 2
Approach: the $1^\infty$ form (as $x \to 0^+$, $x \to 1$ and $\sin x \to 0$). Take the logarithm to convert to the $0 \cdot (-\infty)$ form, then to the $\dfrac{\infty}{\infty}$ form.
Setting $y = x^{\sin x}$ gives $\ln y = \sin x \cdot \ln x$
$\displaystyle\lim_{x \to 0^+} \sin x \cdot \ln x = \displaystyle\lim \dfrac{\ln x}{\csc x}$ (the $\dfrac{-\infty}{\infty}$ form)
L'Hôpital: $\displaystyle\lim \dfrac{1/x}{-\csc x \cot x} = \displaystyle\lim \dfrac{-\sin x \tan x}{x} = \displaystyle\lim \dfrac{-\sin x}{x} \cdot \tan x = (-1) \cdot 0 = 0$
From $\displaystyle\lim \ln y = 0$ we get $\displaystyle\lim y = e^0 = 1$
FAQ
What forms of indeterminacy can L'Hôpital's rule be applied to?
It applies directly to the $\dfrac{0}{0}$ and $\dfrac{\infty}{\infty}$ forms. Forms such as $0 \cdot \infty$, $\infty - \infty$, $0^0$, $1^\infty$, and $\infty^0$ must first be rewritten as $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$ before applying it.
When should L'Hôpital's rule be applied repeatedly?
When the $\dfrac{0}{0}$ or $\dfrac{\infty}{\infty}$ form persists after one application, it can be applied again. For example, $\displaystyle\lim_{x \to 0}\dfrac{1 - \cos x}{x^2}$ leaves $\dfrac{\sin x}{2x}$ after the first application (still $\dfrac{0}{0}$), and $\dfrac{\cos x}{2} \to \dfrac{1}{2}$ after the second.
Are there cases where L'Hôpital's rule must not be used?
For a limit such as $\displaystyle\lim_{x \to \infty}\dfrac{x + \sin x}{x}$, the derivative of the numerator, $1 + \cos x$, does not converge, so L'Hôpital's rule cannot be applied (the limit itself converges to $1$). It is also unnecessary when the expression is not an indeterminate form (e.g. $\displaystyle\lim_{x \to 0}\dfrac{\sin x}{x+1} = 0$).
Why does L'Hôpital's rule hold?
Intuitively, when $f$ and $g$ both approach zero as $x \to a$, each is approximated by its tangent line, $f(x) \approx f'(a)(x-a)$ and $g(x) \approx g'(a)(x-a)$, so their ratio approaches $\dfrac{f'(a)}{g'(a)}$. Rigorously, Cauchy's mean value theorem gives a point $c$ between $a$ and $x$ with $\dfrac{f(x)}{g(x)} = \dfrac{f'(c)}{g'(c)}$, and $c \to a$ as $x \to a$ (see 16.2.2 and 16.2.3).