Skip to content
Family Table Math
Auto

L'Hospital's Rule

Some limits, like lim⁡x→0sin⁡3xx\displaystyle\lim_{x \to 0} \frac{\sin 3x}{x} or lim⁡x→∞x2ex\displaystyle\lim_{x \to \infty} \frac{x^2}{e^x}, can’t be found by substituting, and factoring doesn’t help. L’Hospital’s Rule (also spelled L’Hôpital’s, after the French mathematician; AP uses “L’Hospital”) turns these into easier limits using derivatives. It’s quick and powerful, but only when you check the form first.

If substituting gives 00\dfrac{0}{0} or ∞∞\dfrac{\infty}{\infty}, the limit is indeterminate: the form alone doesn’t tell you the answer. It could be any number, or infinite. You saw how to handle some of these with algebraic techniques like factoring. L’Hospital’s Rule handles many more.

Suppose ff and gg are differentiable near aa (except possibly at aa), g′(x)≠0g'(x) \ne 0 near aa, and

lim⁡x→af(x)=0 and lim⁡x→ag(x)=0,orlim⁡x→af(x)=±∞ and lim⁡x→ag(x)=±∞\lim_{x \to a} f(x) = 0 \ \text{and}\ \lim_{x \to a} g(x) = 0, \qquad \text{or} \qquad \lim_{x \to a} f(x) = \pm\infty \ \text{and}\ \lim_{x \to a} g(x) = \pm\infty

Then

lim⁡x→af(x)g(x)=lim⁡x→af′(x)g′(x)\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}

as long as the limit on the right exists (or is ±∞\pm\infty). The same rule works for x→∞x \to \infty and for one-sided limits.

Notice: you differentiate the top and the bottom separately. This is not the quotient rule.

For the 00\dfrac{0}{0} case, think about local linearity. If f(a)=g(a)=0f(a) = g(a) = 0, then near aa each function is close to its tangent line: f(x)≈f′(a)(x−a)f(x) \approx f'(a)(x - a) and g(x)≈g′(a)(x−a)g(x) \approx g'(a)(x - a). The (x−a)(x - a) factors cancel, leaving f′(a)g′(a)\dfrac{f'(a)}{g'(a)}.

The curves f(x) = ln x and g(x) = x squared minus 1 both pass through (1, 0). Dashed tangent lines at that point have slopes 1 and 2, so near x = 1 the ratio f over g is close to 1 over 2. f(x) = ln x slope 1 slope 2 g(x) = x² − 1 (1, 0) 1 2 −1 1 2
Near x=1x = 1, ln⁡x≈1(x−1)\ln x \approx 1(x - 1) and x2−1≈2(x−1)x^2 - 1 \approx 2(x - 1), so lim⁡x→1ln⁡xx2−1=12\displaystyle\lim_{x \to 1} \frac{\ln x}{x^2 - 1} = \frac{1}{2}.
  1. Check the form by substituting. Only continue if you get 00\dfrac{0}{0} or ∞∞\dfrac{\infty}{\infty}.
  2. Differentiate the numerator and the denominator separately.
  3. Find the new limit. If it is still 00\dfrac{0}{0} or ∞∞\dfrac{\infty}{\infty}, you may apply the rule again (check the form each time).

On a test, show that the form is indeterminate before using the rule, for example: ”lim⁡x→0(ex−1)=0\displaystyle\lim_{x \to 0}(e^x - 1) = 0 and lim⁡x→0x=0\displaystyle\lim_{x \to 0} x = 0, so L’Hospital’s Rule applies.” AP questions in particular often give values of ff, gg, f′f', g′g' in a table instead of formulas.

  • When the form is not indeterminate. If substitution gives a number like 11\dfrac{1}{1} or 50\dfrac{5}{0}, the rule doesn’t apply and will give a wrong answer.
  • When an easier method works. Factoring or dividing by the highest power is often quicker.
  • When the derivatives get messier each time and never resolve. Try rewriting the expression instead.

All trig in calculus uses radians. For example, ddxsin⁡x=cos⁡x\dfrac{d}{dx}\sin x = \cos x is only true in radians.

Find lim⁡x→0sin⁡3xx\displaystyle\lim_{x \to 0} \frac{\sin 3x}{x}.

Solution. Check the form: sin⁡0=0\sin 0 = 0 and the bottom is 00, so the form is 00\dfrac{0}{0}. Apply the rule:

lim⁡x→0sin⁡3xx=lim⁡x→03cos⁡3x1=3cos⁡0=3\lim_{x \to 0} \frac{\sin 3x}{x} = \lim_{x \to 0} \frac{3\cos 3x}{1} = 3\cos 0 = 3

Find lim⁡x→0ex−1−xx2\displaystyle\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}.

Solution. Substituting gives 1−1−00=00\dfrac{1 - 1 - 0}{0} = \dfrac{0}{0}. Apply the rule:

lim⁡x→0ex−12x\lim_{x \to 0} \frac{e^x - 1}{2x}

This is still 00\dfrac{0}{0} (since e0−1=0e^0 - 1 = 0), so apply it again:

lim⁡x→0ex2=12\lim_{x \to 0} \frac{e^x}{2} = \frac{1}{2}

Find lim⁡x→∞x2ex\displaystyle\lim_{x \to \infty} \frac{x^2}{e^x}.

Solution. As x→∞x \to \infty, both x2x^2 and exe^x go to ∞\infty: the form is ∞∞\dfrac{\infty}{\infty}.

lim⁡x→∞x2ex=lim⁡x→∞2xex=lim⁡x→∞2ex=0\lim_{x \to \infty} \frac{x^2}{e^x} = \lim_{x \to \infty} \frac{2x}{e^x} = \lim_{x \to \infty} \frac{2}{e^x} = 0

(The middle limit is still ∞∞\dfrac{\infty}{\infty}, so we applied the rule a second time.) This shows that exe^x grows faster than x2x^2; in fact it grows faster than any power of xx.

Find lim⁡x→0cos⁡xx+1\displaystyle\lim_{x \to 0} \frac{\cos x}{x + 1}.

Solution. Substitute: cos⁡00+1=11=1\dfrac{\cos 0}{0 + 1} = \dfrac{1}{1} = 1. That’s a number, not an indeterminate form, so the limit is 11.

If you had wrongly used L’Hospital’s Rule, you’d get −sin⁡01=0\dfrac{-\sin 0}{1} = 0, which is wrong. Always check the form first.

Using the rule without checking the form. Example 4 shows how this gives a wrong answer. Substitute first, every time, including before a second application.

Using the quotient rule. L’Hospital’s Rule takes f′(x)g′(x)\dfrac{f'(x)}{g'(x)}, the derivative of the top over the derivative of the bottom, not the derivative of f(x)g(x)\dfrac{f(x)}{g(x)}.

Not showing the form in a written solution. Markers (including AP graders) expect you to state that both the numerator and denominator have limit 00 (or both are infinite) before using the rule.

Applying it to forms like 50\dfrac{5}{0}. That form means the limit is infinite or doesn’t exist (check the signs on each side); it’s not a case for L’Hospital’s Rule.

Forgetting the chain rule when differentiating. ddxsin⁡3x=3cos⁡3x\dfrac{d}{dx}\sin 3x = 3\cos 3x and ddxe2x=2e2x\dfrac{d}{dx}e^{2x} = 2e^{2x}.

1. (Warm-up) Which of these limits are indeterminate forms? Evaluate the one that is not.

  • (a) lim⁡x→1x2−1x+1\displaystyle\lim_{x \to 1} \frac{x^2 - 1}{x + 1}
  • (b) lim⁡x→01−cos⁡xx2\displaystyle\lim_{x \to 0} \frac{1 - \cos x}{x^2}
Solution

(a) Substituting gives 02=0\dfrac{0}{2} = 0. Not indeterminate: the limit is 00.

(b) Substituting gives 1−10=00\dfrac{1 - 1}{0} = \dfrac{0}{0}. Indeterminate (see question 4).

2. (Warm-up) Find lim⁡x→0tan⁡xx\displaystyle\lim_{x \to 0} \frac{\tan x}{x}.

Solution

The form is 00\dfrac{0}{0}.

lim⁡x→0tan⁡xx=lim⁡x→0sec⁡2x1=sec⁡20=1\lim_{x \to 0} \frac{\tan x}{x} = \lim_{x \to 0} \frac{\sec^2 x}{1} = \sec^2 0 = 1

3. (Core) Find lim⁡x→1ln⁡xx−1\displaystyle\lim_{x \to 1} \frac{\ln x}{x - 1}.

Solution

ln⁡1=0\ln 1 = 0 and 1−1=01 - 1 = 0, so the form is 00\dfrac{0}{0}.

lim⁡x→1ln⁡xx−1=lim⁡x→11/x1=1\lim_{x \to 1} \frac{\ln x}{x - 1} = \lim_{x \to 1} \frac{1/x}{1} = 1

4. (Core) Find lim⁡x→01−cos⁡xx2\displaystyle\lim_{x \to 0} \frac{1 - \cos x}{x^2}.

Solution

The form is 00\dfrac{0}{0}. Apply the rule:

lim⁡x→0sin⁡x2x\lim_{x \to 0} \frac{\sin x}{2x}

Still 00\dfrac{0}{0}, so apply it again:

lim⁡x→0cos⁡x2=12\lim_{x \to 0} \frac{\cos x}{2} = \frac{1}{2}

5. (Core) Find lim⁡x→∞3x2+52x2−x\displaystyle\lim_{x \to \infty} \frac{3x^2 + 5}{2x^2 - x} two ways: with L’Hospital’s Rule, and by dividing by x2x^2.

Solution

The form is ∞∞\dfrac{\infty}{\infty}.

L’Hospital’s Rule (twice):

lim⁡x→∞6x4x−1=lim⁡x→∞64=32\lim_{x \to \infty} \frac{6x}{4x - 1} = \lim_{x \to \infty} \frac{6}{4} = \frac{3}{2}

Dividing by x2x^2:

lim⁡x→∞3+5/x22−1/x=3+02−0=32\lim_{x \to \infty} \frac{3 + 5/x^2}{2 - 1/x} = \frac{3 + 0}{2 - 0} = \frac{3}{2}

Both give 32\dfrac{3}{2}. Here dividing is just as quick.

6. (Core) Find lim⁡x→∞ln⁡xx\displaystyle\lim_{x \to \infty} \frac{\ln x}{\sqrt{x}}.

Solution

Both go to ∞\infty, so the form is ∞∞\dfrac{\infty}{\infty}.

lim⁡x→∞1/x12x=lim⁡x→∞2xx=lim⁡x→∞2x=0\lim_{x \to \infty} \frac{1/x}{\dfrac{1}{2\sqrt{x}}} = \lim_{x \to \infty} \frac{2\sqrt{x}}{x} = \lim_{x \to \infty} \frac{2}{\sqrt{x}} = 0

So x\sqrt{x} grows faster than ln⁡x\ln x.

7. (Core) The functions ff and gg are differentiable, with f(3)=0f(3) = 0, g(3)=0g(3) = 0, f′(3)=6f'(3) = 6, and g′(3)=−2g'(3) = -2. Find lim⁡x→3f(x)g(x)\displaystyle\lim_{x \to 3} \frac{f(x)}{g(x)}, assuming f′f' and g′g' are continuous.

Solution

Since ff and gg are differentiable, they are continuous, so lim⁡x→3f(x)=f(3)=0\displaystyle\lim_{x \to 3} f(x) = f(3) = 0 and lim⁡x→3g(x)=g(3)=0\displaystyle\lim_{x \to 3} g(x) = g(3) = 0. The form is 00\dfrac{0}{0}, so L’Hospital’s Rule applies:

lim⁡x→3f(x)g(x)=lim⁡x→3f′(x)g′(x)=6−2=−3\lim_{x \to 3} \frac{f(x)}{g(x)} = \lim_{x \to 3} \frac{f'(x)}{g'(x)} = \frac{6}{-2} = -3

8. (Challenge) Find lim⁡x→0x−sin⁡xx3\displaystyle\lim_{x \to 0} \frac{x - \sin x}{x^3}.

Solution

Each step below is 00\dfrac{0}{0} until the last:

lim⁡x→0x−sin⁡xx3=lim⁡x→01−cos⁡x3x2=lim⁡x→0sin⁡x6x=lim⁡x→0cos⁡x6=16\lim_{x \to 0} \frac{x - \sin x}{x^3} = \lim_{x \to 0} \frac{1 - \cos x}{3x^2} = \lim_{x \to 0} \frac{\sin x}{6x} = \lim_{x \to 0} \frac{\cos x}{6} = \frac{1}{6}

9. (Challenge) Find the value of the constant kk that makes lim⁡x→0ekx−1−2xx2\displaystyle\lim_{x \to 0} \frac{e^{kx} - 1 - 2x}{x^2} a finite number, and find the value of the limit.

Solution

The form is 00\dfrac{0}{0} for every kk. Apply the rule once:

lim⁡x→0kekx−22x\lim_{x \to 0} \frac{ke^{kx} - 2}{2x}

The bottom goes to 00, and the top goes to k−2k - 2. If k≠2k \ne 2, this new limit doesn’t exist, but L’Hospital’s Rule only tells you something when the new limit does exist, so reason another way. By the rule, lim⁡x→0ekx−1−2xx=lim⁡x→0kekx−21=k−2\displaystyle\lim_{x \to 0} \frac{e^{kx} - 1 - 2x}{x} = \lim_{x \to 0} \frac{ke^{kx} - 2}{1} = k - 2. So near 00,

ekx−1−2xx2=ekx−1−2xx⋅1x≈k−2x\frac{e^{kx} - 1 - 2x}{x^2} = \frac{e^{kx} - 1 - 2x}{x} \cdot \frac{1}{x} \approx \frac{k - 2}{x}

which blows up if k≠2k \ne 2. So the limit can only be finite if k=2k = 2.

With k=2k = 2 the form is 00\dfrac{0}{0} again, so apply the rule a second time:

lim⁡x→04e2x2=2\lim_{x \to 0} \frac{4e^{2x}}{2} = 2

So k=2k = 2, and the limit is 22.

Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site. Identify the original form before applying L’Hôpital’s rule, and check the form again before every repeated application. Trigonometric angles are in radians.

H1. (Foundations) Identify the limiting form of each expression. Which are candidates for L’Hôpital’s rule without rewriting?

  • (a) lim⁡x→1ln⁡xx−1\displaystyle\lim_{x\to1}\frac{\ln x}{x-1}.
  • (b) lim⁡x→∞exx\displaystyle\lim_{x\to\infty}\frac{e^x}{x}.
  • (c) lim⁡x→02+sin⁡xx\displaystyle\lim_{x\to0}\frac{2+\sin x}{x}.
  • (d) lim⁡x→01+x2\displaystyle\lim_{x\to0}\frac{1+x}{2}.

H2. (Foundations) Evaluate lim⁡x→0sin⁡(5x)3x\displaystyle\lim_{x\to0}\frac{\sin(5x)}{3x} using L’Hôpital’s rule. State why the rule applies.

H3. (Core) Evaluate lim⁡x→0ln⁡(1+4x)x\displaystyle\lim_{x\to0}\frac{\ln(1+4x)}{x}. Check that the numerator is defined on both sides of zero sufficiently close to zero.

H4. (Core) Evaluate lim⁡x→0e3x−1−3xx2\displaystyle\lim_{x\to0}\frac{e^{3x}-1-3x}{x^2}. Show every form check needed for repeated differentiation.

H5. (Core) Evaluate lim⁡x→∞x3e2x\displaystyle\lim_{x\to\infty}\frac{x^3}{e^{2x}} using repeated applications of L’Hôpital’s rule. At which step does the indeterminate form disappear?

H6. (Core) Evaluate lim⁡x→∞ln⁡xx1/4\displaystyle\lim_{x\to\infty}\frac{\ln x}{x^{1/4}}. Differentiate the numerator and denominator separately, and simplify the resulting quotient.

H7. (Challenge) Evaluate lim⁡x→0sin⁡(2x)−2xx3\displaystyle\lim_{x\to0}\frac{\sin(2x)-2x}{x^3}. Justify each application of L’Hôpital’s rule. Explain why using degrees would invalidate the derivative steps.

H8. (Challenge) Functions ff and gg are twice continuously differentiable on an open interval containing 2, with these values:

QuantityValue
f(2)f(2)00
g(2)g(2)00
f′(2)f'(2)00
g′(2)g'(2)00
f′′(2)f''(2)−12-12
g′′(2)g''(2)88

Evaluate lim⁡x→2f(x)g(x)\displaystyle\lim_{x\to2}\frac{f(x)}{g(x)}. Explain why the information supports two applications near 2 rather than direct substitution into f′(2)/g′(2)f'(2)/g'(2).

H9. (Challenge) For real constants aa and bb, determine exactly when lim⁡x→0eax−1−bxx2\displaystyle\lim_{x\to0}\frac{e^{ax}-1-bx}{x^2} is finite. Find all pairs (a,b)(a,b) for which this limit equals 9/29/2. For the remaining cases, describe both one-sided limits rather than just writing “undefined”.

H10. (Challenge) Evaluate the following limits by first rewriting their original forms into something usable. State whether L’Hôpital’s rule applies to the original expression, and explain your chosen method.

  • (a) lim⁡x→0+xln⁡x\displaystyle\lim_{x\to0^+}x\ln x.
  • (b) lim⁡x→∞(x2+6x−x)\displaystyle\lim_{x\to\infty}\left(\sqrt{x^2+6x}-x\right).