AP Calculus BC · Contextual applications of differentiation
L'Hospital's rule
1Indeterminate forms
Some limits produce indeterminate forms when you substitute: $\frac{0}{0}$ or $\frac{\infty}{\infty}$. These tell you nothing about the limit; it could be any number, or infinite.
Earlier you handled $\frac{0}{0}$ by factoring or using conjugates. L'Hospital's rule is a powerful general method that uses derivatives.
Check yourself
Which of these is an indeterminate form?
Show the answer
∞/∞
0/0 and ∞/∞ are the forms L'Hospital's rule handles.
2The rule
If $\lim_{x \to c} \frac{f(x)}{g(x)}$ gives $\frac{0}{0}$ or $\frac{\pm\infty}{\pm\infty}$, and $f$ and $g$ are differentiable near $c$ (with $g'(x) \neq 0$ near $c$), then
$$\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)}$$
provided the right-hand limit exists. It also works for $c = \pm\infty$ and one-sided limits.
Important: differentiate the numerator and denominator separately. This is not the quotient rule.
$\lim_{x \to 0} \frac{\sin x}{x}$
- Substitution: $\frac{0}{0}$.
- L'Hospital: $\lim_{x \to 0} \frac{\cos x}{1} = 1$.
$\lim_{x \to 2} \frac{x^3 - 8}{x - 2}$
- Substitution: $\frac{0}{0}$.
- L'Hospital: $\lim_{x \to 2} \frac{3x^2}{1} = 12$.
Check yourself
When using L'Hospital's rule on f/g, you:
Show the answer
Differentiate f and g separately
Then take the limit of f′/g′.
3Infinity over infinity and repeated use
$\lim_{x \to \infty} \frac{\ln x}{x}$
- Form: $\frac{\infty}{\infty}$.
- L'Hospital: $\lim_{x \to \infty} \frac{1/x}{1} = 0$.
Sometimes you must apply the rule more than once, checking the form each time.
$\lim_{x \to \infty} \frac{x^2}{e^x}$
- Form $\frac{\infty}{\infty}$: L'Hospital gives $\lim \frac{2x}{e^x}$.
- Still $\frac{\infty}{\infty}$: L'Hospital gives $\lim \frac{2}{e^x}$.
- This is $0$.
This confirms that exponentials grow faster than powers.
$\lim_{x \to 0} \frac{1 - \cos x}{x^2}$
- $\frac{0}{0}$: L'Hospital gives $\lim \frac{\sin x}{2x}$.
- Still $\frac{0}{0}$: L'Hospital gives $\lim \frac{\cos x}{2} = \frac{1}{2}$.
Check yourself
lim (x→∞) of eˣ/x³ equals:
Show the answer
∞
After three applications: eˣ/6 → ∞.
4When not to use it
Only use L'Hospital's rule on genuine $\frac{0}{0}$ or $\frac{\infty}{\infty}$ forms. Applying it elsewhere gives wrong answers.
$\lim_{x \to 0} \frac{x + 1}{x + 2} = \frac{1}{2}$ by substitution. Wrongly applying L'Hospital would give $\frac{1}{1} = 1$.
Also, sometimes simpler methods are quicker (factoring, dividing by the highest power), and sometimes L'Hospital goes in circles (e.g. $\frac{\sqrt{x^2 + 1}}{x}$ as $x \to \infty$, where dividing by $x$ works better).
Check yourself
Why can't L'Hospital's rule be used for lim (x→1) of (x + 3)/(x − 2)?
Show the answer
Substitution gives −4, not an indeterminate form
Just substitute.
5Using tables and given information
AP questions may give values of $f$, $g$ and their derivatives.
$f(3) = 0$, $g(3) = 0$, $f'(3) = 5$, $g'(3) = 2$, and $f'$, $g'$ are continuous. Find $\lim_{x \to 3} \frac{f(x)}{g(x)}$.
- Substitution gives $\frac{0}{0}$.
- L'Hospital: $\lim_{x \to 3} \frac{f'(x)}{g'(x)} = \frac{f'(3)}{g'(3)} = \frac{5}{2}$.
On the free-response section, you must show that the limit has an indeterminate form before applying the rule.
Check yourself
f(1) = g(1) = 0, f′(1) = 6, g′(1) = −3. lim (x→1) f(x)/g(x) =
Show the answer
−2
6/(−3).
6Going deeper: checking the form first, repeated use and rewriting products
The rule: if $\lim\frac{f(x)}{g(x)}$ has the form $\frac{0}{0}$ or $\frac{\pm\infty}{\pm\infty}$, then
$$\lim\frac{f(x)}{g(x)} = \lim\frac{f'(x)}{g'(x)}$$
provided the limit on the right exists (or is infinite). Differentiate the numerator and denominator separately; this is not the quotient rule.
Always verify the form first. On free-response questions, show it explicitly:
"$\lim_{x \to 0}(e^x - 1) = 0$ and $\lim_{x \to 0} x = 0$, so L'Hospital's rule applies." Writing "$\frac{0}{0}$" as if it were a value loses credit.
$\lim_{x \to 0}\frac{e^x - 1}{x}$.
- Form $\frac{0}{0}$.
- $\lim\frac{e^x}{1} = 1$.
Worked example (twice): $\lim_{x \to 0}\frac{1 - \cos x}{x^2}$.
- Form $\frac{0}{0}$: $\lim\frac{\sin x}{2x}$.
- Still $\frac{0}{0}$: $\lim\frac{\cos x}{2} = \frac{1}{2}$.
Worked example (infinity over infinity): $\lim_{x \to \infty}\frac{\ln x}{x}$.
- Form $\frac{\infty}{\infty}$.
- $\lim\frac{1/x}{1} = 0$. Logarithms grow more slowly than x.
$\lim_{x \to \infty}\frac{x^2}{e^x}$.
- $\frac{2x}{e^x}$, then $\frac{2}{e^x} \to 0$. Exponentials outgrow powers.
Other indeterminate forms must be rewritten as a quotient.
0 · ∞: move one factor to the denominator.
$\lim_{x \to 0^+} x\ln x$.
- Write $\frac{\ln x}{1/x}$: form $\frac{-\infty}{\infty}$.
- $\frac{1/x}{-1/x^2} = -x \to 0$.
$\lim_{x \to \infty} xe^{-x} = \lim\frac{x}{e^x} = \lim\frac{1}{e^x} = 0$.
1^∞, 0⁰, ∞⁰ (BC emphasis): take a logarithm.
$\lim_{x \to \infty}\left(1 + \frac{1}{x}\right)^x$.
- Let y be the expression: $\ln y = x\ln\left(1 + \frac{1}{x}\right) = \frac{\ln(1 + 1/x)}{1/x}$: form $\frac{0}{0}$.
- Differentiate: $\frac{\frac{-1/x^2}{1 + 1/x}}{-1/x^2} = \frac{1}{1 + 1/x} \to 1$.
- ln y → 1, so y → e.
When the rule does not apply
- $\lim_{x \to 1}\frac{x + 1}{x}$: substitution gives 2. Applying the rule would give $\frac{1}{1} = 1$: wrong.
- $\frac{\text{non-zero}}{0}$: the function is unbounded; examine signs.
- If the derivative ratio oscillates with no limit, the rule gives no conclusion; try another method.
With given values: f and g are differentiable with f(2) = 0, g(2) = 0, f′(2) = 6, g′(2) = −3.
- $\lim_{x \to 2}\frac{f(x)}{g(x)}$ has form $\frac{0}{0}$ (f and g are continuous since differentiable).
- $= \frac{f'(2)}{g'(2)} = -2$.
Is algebra quicker? Sometimes: $\lim_{x \to 3}\frac{x^2 - 9}{x - 3}$ by factoring gives 6 at once; the rule gives $\frac{2x}{1} = 6$ too.
Common mistakes
- Using the quotient rule.
- Applying the rule to a form that is not indeterminate.
- Not showing that numerator and denominator limits are both 0 (or infinite).
- Stopping after one application when the form is still indeterminate.
- Applying it to a product without rewriting.
Check yourself
Which limit can be evaluated directly with L'Hospital's rule?
Show the answer
The limit of sin(x) ÷ x as x approaches 0
Only the first has the indeterminate form 0 ÷ 0.
7For top marks
- Always state the indeterminate form, e.g. "$\lim_{x \to 0}(1 - \cos x) = 0$ and $\lim_{x \to 0} x^2 = 0$, so L'Hospital's rule applies."
- Differentiate numerator and denominator separately.
- Check the form again before each new application.
- Write "$\lim$" on every line.
"Since $\lim_{x \to 3} f(x) = 0$ and $\lim_{x \to 3} g(x) = 0$, by L'Hospital's rule $\lim_{x \to 3} \frac{f(x)}{g(x)} = \lim_{x \to 3}\frac{f'(x)}{g'(x)} = \frac{5}{2}$."
Check yourself
lim (x→0) of (e^x − 1)/x equals:
Show the answer
1
L'Hospital gives eˣ/1 at 0.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera