Practice / Calculus

L'Hôpital's rule and indeterminate forms

Ten limits by L'Hôpital's rule: 0/0 and ∞/∞, a rule applied twice, x ln x and the 0 log 0 = 0 of entropy, xˣ and (1 + 2/x)ˣ by taking logs, a difference of fractions, and a limit the rule cannot find, with worked solutions and the mistakes of using it on a limit that is not indeterminate and of reading 1^∞ as 1.

Before you start

When substitution gives 00\tfrac00 or ∞∞\tfrac\infty\infty, L'Hôpital's rule replaces the limit of a ratio with the limit of the ratio of the derivatives. It is how the convention 0log⁡0=00\log 0 = 0 in entropy is justified, and why x2e−xx^2e^{-x} and ln⁡xx\tfrac{\ln x}{\sqrt x} go to 0: exponentials beat powers, and powers beat logs. The work goes wrong in a few places: the rule used on a limit that is not indeterminate, the quotient rule used instead of differentiating top and bottom separately, 1∞1^\infty read as 1, a log taken and never undone, and a conclusion drawn when the rule does not apply. These ten problems cover each of them.

  • L'Hôpital's rule. Suppose ff and gg are differentiable near aa (except possibly at aa), g′(x)≠0g'(x) \neq 0 near aa, and f(x)g(x)\tfrac{f(x)}{g(x)} has the form 00\tfrac00 or ±∞±∞\tfrac{\pm\infty}{\pm\infty} as x→ax \to a. If lim⁡f′(x)g′(x)\lim\tfrac{f'(x)}{g'(x)} exists (or is ±∞\pm\infty), then lim⁡f(x)g(x)\lim\tfrac{f(x)}{g(x)} equals it. The same holds for one-sided limits and for a=±∞a = \pm\infty.
  • f′f' and g′g' are differentiated separately. It is not the quotient rule.
  • Check the form before every use. If substitution gives a number, that number is the limit and the rule does not apply.
  • The other indeterminate forms are rewritten first. 0⋅∞0\cdot\infty: write the product as a quotient, fg=f1/gfg = \tfrac{f}{1/g}. ∞−∞\infty - \infty: combine into one fraction. 1∞1^\infty, 000^0 and ∞0\infty^0: take the log, find the limit LL of the log, and the answer is eLe^L.
  • If lim⁡f′g′\lim\tfrac{f'}{g'} does not exist, the rule says nothing: the original limit may still exist (Problem 10).
  • Derivatives used: (sin⁡x)′=cos⁡x(\sin x)' = \cos x, (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x, (ex)′=ex(e^x)' = e^x, (ln⁡x)′=1x(\ln x)' = \tfrac1x, (xn)′=nxn−1(x^n)' = nx^{n-1}.

Builds on: Evaluating limits: factoring, conjugates and limits at infinity, Differentiation rules: chain, product, quotient

Problems

  1. ·

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

  2. ·

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

  3. ··

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

  4. ··

    Find lim⁡x→0+xln⁡x\displaystyle\lim_{x\to0^+} x\ln x.

  5. ··

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

  6. ··

    Find lim⁡x→01−cos⁡xx2\displaystyle\lim_{x\to0}\frac{1 - \cos x}{x^2}.

  7. ···

    Find lim⁡x→0+xx\displaystyle\lim_{x\to0^+} x^x.

  8. ···

    Find lim⁡x→∞(1+2x)x\displaystyle\lim_{x\to\infty}\Big(1 + \frac2x\Big)^x.

  9. ···

    Find lim⁡x→0(1x−1sin⁡x)\displaystyle\lim_{x\to0}\Big(\frac1x - \frac1{\sin x}\Big).

  10. ···

    Find lim⁡x→∞x+sin⁡xx\displaystyle\lim_{x\to\infty}\frac{x + \sin x}{x}. What happens if you use L'Hôpital's rule?

Worked solutions

Problem 1

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

  1. At x=0x = 0: sin⁡00=00\tfrac{\sin 0}{0} = \tfrac00.Indeterminate, so the rule may apply.
  2. lim⁡x→03cos⁡3x1\displaystyle\lim_{x\to0}\frac{3\cos 3x}{1}Differentiate top and bottom separately; the chain rule gives the 3.
  3. 333cos⁡0=33\cos 0 = 3. Near 0, sin⁡3x≈3x\sin 3x \approx 3x.

Problem 2

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

  1. At x=0x = 0: 1−1−00=00\tfrac{1 - 1 - 0}{0} = \tfrac00.Indeterminate.
  2. lim⁡x→0ex−12x\displaystyle\lim_{x\to0}\frac{e^x - 1}{2x}, again 00\tfrac00One application. Check the form again before the next one.
  3. lim⁡x→0ex2\displaystyle\lim_{x\to0}\frac{e^x}{2}A second application.
  4. 12\tfrac12e02\tfrac{e^0}2. It is the x22\tfrac{x^2}{2} term of the Taylor series ex=1+x+x22+⋯e^x = 1 + x + \tfrac{x^2}2 + \cdots.

Problem 3

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

  1. As x→∞x \to \infty: ∞∞\tfrac\infty\infty.Indeterminate.
  2. lim⁡x→∞2xex\displaystyle\lim_{x\to\infty}\frac{2x}{e^x}, still ∞∞\tfrac\infty\inftyThe power drops by one; the exponential does not change.
  3. lim⁡x→∞2ex\displaystyle\lim_{x\to\infty}\frac{2}{e^x}A second application. The top is now a constant.
  4. 00ex→∞e^x \to \infty. The same argument, applied nn times, shows xne−x→0x^n e^{-x} \to 0 for every nn.

Problem 4

Find lim⁡x→0+xln⁡x\displaystyle\lim_{x\to0^+} x\ln x.

  1. As x→0+x \to 0^+: 0⋅(−∞)0\cdot(-\infty).Indeterminate, but not a quotient yet.
  2. xln⁡x=ln⁡x1/xx\ln x = \dfrac{\ln x}{1/x}, which has the form −∞∞\tfrac{-\infty}{\infty}.Move xx to the denominator as 1x\tfrac1x. Keeping ln⁡x\ln x on top makes the derivatives simple.
  3. lim⁡x→0+1/x−1/x2=lim⁡x→0+(−x)\displaystyle\lim_{x\to0^+}\frac{1/x}{-1/x^2} = \lim_{x\to0^+}(-x)Differentiate top and bottom; 1/x−1/x2=−x\tfrac{1/x}{-1/x^2} = -x.
  4. 00This is why entropy uses 0log⁡0=00\log 0 = 0: plog⁡p→0p\log p \to 0 as p→0+p \to 0^+, so an outcome of probability 0 adds nothing.

Problem 5

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

  1. As x→∞x \to \infty: ∞∞\tfrac\infty\infty.Indeterminate.
  2. lim⁡x→∞1/x1/(2x)=lim⁡x→∞2xx\displaystyle\lim_{x\to\infty}\frac{1/x}{1/(2\sqrt x)} = \lim_{x\to\infty}\frac{2\sqrt x}{x}(x)′=12x(\sqrt x)' = \tfrac1{2\sqrt x}.
  3. =lim⁡x→∞2x= \displaystyle\lim_{x\to\infty}\frac{2}{\sqrt x}xx=1x\tfrac{\sqrt x}{x} = \tfrac1{\sqrt x}.
  4. 00Any positive power of xx eventually outgrows ln⁡x\ln x, even x1/2x^{1/2}.

Problem 6

Find lim⁡x→01−cos⁡xx2\displaystyle\lim_{x\to0}\frac{1 - \cos x}{x^2}.

  1. At x=0x = 0: 1−10=00\tfrac{1 - 1}{0} = \tfrac00.Indeterminate.
  2. lim⁡x→0sin⁡x2x\displaystyle\lim_{x\to0}\frac{\sin x}{2x}, still 00\tfrac00(1−cos⁡x)′=sin⁡x(1 - \cos x)' = \sin x.
  3. lim⁡x→0cos⁡x2\displaystyle\lim_{x\to0}\frac{\cos x}{2}A second application.
  4. 12\tfrac12cos⁡02\tfrac{\cos 0}2. So cos⁡x≈1−x22\cos x \approx 1 - \tfrac{x^2}2 near 0.

Problem 7

Find lim⁡x→0+xx\displaystyle\lim_{x\to0^+} x^x.

  1. As x→0+x \to 0^+: 000^0.Indeterminate: a base going to 0 pulls toward 0, an exponent going to 0 pulls toward 1.
  2. Let y=xxy = x^x; then ln⁡y=xln⁡x\ln y = x\ln x.Take the log to bring the exponent down.
  3. lim⁡x→0+ln⁡y=0\displaystyle\lim_{x\to0^+}\ln y = 0Problem 4.
  4. 11y=eln⁡yy = e^{\ln y}, and exe^x is continuous, so y→e0=1y \to e^0 = 1. The answer is not 0, which is the limit of the log (mistake 4).

Problem 8

Find lim⁡x→∞(1+2x)x\displaystyle\lim_{x\to\infty}\Big(1 + \frac2x\Big)^x.

  1. As x→∞x \to \infty: 1∞1^\infty.Indeterminate: the base goes to 1, but the exponent grows without bound.
  2. ln⁡y=xln⁡(1+2x)=ln⁡(1+2/x)1/x\ln y = x\ln\Big(1 + \dfrac2x\Big) = \dfrac{\ln(1 + 2/x)}{1/x}, which has the form 00\tfrac00.Take the log, then write the product as a quotient.
  3. lim⁡x→∞11+2/x⋅(−2x2)−1x2=lim⁡x→∞21+2/x=2\displaystyle\lim_{x\to\infty}\frac{\dfrac{1}{1 + 2/x}\cdot\Big(-\dfrac{2}{x^2}\Big)}{-\dfrac1{x^2}} = \lim_{x\to\infty}\frac{2}{1 + 2/x} = 2The chain rule on the top: (2x)′=−2x2\big(\tfrac2x\big)' = -\tfrac2{x^2}. The −1x2-\tfrac1{x^2} cancels.
  4. e2≈7.389e^2 \approx 7.389y=eln⁡y→e2y = e^{\ln y} \to e^2. This is compound interest at a rate of 200% compounded ever more often.

Problem 9

Find lim⁡x→0(1x−1sin⁡x)\displaystyle\lim_{x\to0}\Big(\frac1x - \frac1{\sin x}\Big).

  1. As x→0+x \to 0^+: ∞−∞\infty - \infty.Indeterminate; from the left it is −∞+∞-\infty + \infty.
  2. 1x−1sin⁡x=sin⁡x−xxsin⁡x\dfrac1x - \dfrac1{\sin x} = \dfrac{\sin x - x}{x\sin x}, which has the form 00\tfrac00.Combine into one fraction over the common denominator.
  3. lim⁡x→0cos⁡x−1sin⁡x+xcos⁡x\displaystyle\lim_{x\to0}\frac{\cos x - 1}{\sin x + x\cos x}, still 00\tfrac00The product rule on the bottom: (xsin⁡x)′=sin⁡x+xcos⁡x(x\sin x)' = \sin x + x\cos x.
  4. lim⁡x→0−sin⁡x2cos⁡x−xsin⁡x=02\displaystyle\lim_{x\to0}\frac{-\sin x}{2\cos x - x\sin x} = \frac{0}{2}Again: (sin⁡x+xcos⁡x)′=cos⁡x+cos⁡x−xsin⁡x(\sin x + x\cos x)' = \cos x + \cos x - x\sin x.
  5. 00From both sides. Near 0, sin⁡x≈x−x36\sin x \approx x - \tfrac{x^3}6, so 1sin⁡x≈1x(1+x26)\tfrac1{\sin x} \approx \tfrac1x\big(1 + \tfrac{x^2}6\big) and the difference is about −x6-\tfrac x6.

Problem 10

Find lim⁡x→∞x+sin⁡xx\displaystyle\lim_{x\to\infty}\frac{x + \sin x}{x}. What happens if you use L'Hôpital's rule?

  1. As x→∞x \to \infty: ∞∞\tfrac\infty\infty.Indeterminate.
  2. The rule gives lim⁡x→∞1+cos⁡x1\displaystyle\lim_{x\to\infty}\frac{1 + \cos x}{1}, which does not exist.1+cos⁡x1 + \cos x keeps swinging between 0 and 2. The rule needs this limit to exist, so it gives no answer here, and it does not show that the original limit fails to exist.
  3. x+sin⁡xx=1+sin⁡xx\dfrac{x + \sin x}{x} = 1 + \dfrac{\sin x}{x}Divide top and bottom by xx instead.
  4. −1x≤sin⁡xx≤1x-\dfrac1x \le \dfrac{\sin x}{x} \le \dfrac1x, so sin⁡xx→0\dfrac{\sin x}{x} \to 0.∣sin⁡x∣≤1\lvert\sin x\rvert \le 1, and both bounds go to 0 (squeeze).
  5. 11; L'Hôpital's rule does not apply, because lim⁡(1+cos⁡x)\lim(1 + \cos x) does not existThe rule is a sufficient condition, not a test: when the ratio of derivatives has no limit, use another method.

Where this goes wrong

1. Using the rule on a limit that is not indeterminate

The rule is used so often that it becomes the first step for every fraction.

  1. lim⁡x→1x2+1x+1\displaystyle\lim_{x\to1}\frac{x^2 + 1}{x + 1}A limit to find.
  2. “It is a fraction, so differentiate top and bottom.”The habit that causes the mistake: skipping the check of the form.
  3. lim⁡x→12x1=2\displaystyle\lim_{x\to1}\frac{2x}{1} = 2At x=1x = 1 the fraction is 22=1\tfrac22 = 1, not 00\tfrac00 or ∞∞\tfrac\infty\infty, so the rule does not apply, and the limit is 1 by substitution. Check the form every time, including before each repeat application.

2. The quotient rule instead of two separate derivatives

L'Hôpital's rule involves a fraction and derivatives, and the quotient rule is the derivative of a fraction.

  1. lim⁡x→0sin⁡3xx\displaystyle\lim_{x\to0}\frac{\sin 3x}{x}, form 00\tfrac00Right so far: Problem 1, step 1.
  2. “Differentiate the fraction.”The habit that causes the mistake: the rule remembered as "take the derivative".
  3. lim⁡x→03xcos⁡3x−sin⁡3xx2=0\displaystyle\lim_{x\to0}\frac{3x\cos 3x - \sin 3x}{x^2} = 0That is the limit of the derivative of sin⁡3xx\tfrac{\sin 3x}{x}, the slope of its graph near 0, which is a different question. The rule differentiates the top and the bottom separately: 3cos⁡3x1→3\tfrac{3\cos 3x}{1} \to 3.

3. Reading 1^∞ as 1

One to any power is one, so a base that goes to 1 seems to settle the limit.

  1. lim⁡x→∞(1+2x)x\displaystyle\lim_{x\to\infty}\Big(1 + \frac2x\Big)^xRight so far: Problem 8.
  2. “The base goes to 1, and 1x=11^x = 1.”The habit that causes the mistake: letting the base reach its limit while the exponent is still finite.
  3. lim⁡x→∞(1+2x)x=1\displaystyle\lim_{x\to\infty}\Big(1 + \frac2x\Big)^x = 1The base is never exactly 1, and the exponent grows as fast as the base approaches 1. At x=100x = 100 the value is already 1.02100≈7.241.02^{100} \approx 7.24. Take the log: xln⁡(1+2x)→2x\ln\big(1 + \tfrac2x\big) \to 2, so the limit is e2≈7.389e^2 \approx 7.389.

4. Forgetting to undo the log

After taking a log, the limit that comes out looks like the end of the problem.

  1. y=xxy = x^x, so ln⁡y=xln⁡x→0\ln y = x\ln x \to 0 as x→0+x \to 0^+Right so far: Problem 7, steps 2 and 3.
  2. “The limit is 0.”The habit that causes the mistake: reporting the limit of ln⁡y\ln y as the limit of yy.
  3. lim⁡x→0+xx=0\displaystyle\lim_{x\to0^+} x^x = 000 is the limit of ln⁡y\ln y. The limit of yy is e0=1e^0 = 1. A check: 0.010.01≈0.9550.01^{0.01} \approx 0.955, near 1 and nowhere near 0.

5. Concluding the limit does not exist

When the rule produces something with no limit, it looks like the answer is "no limit".

  1. lim⁡x→∞x+sin⁡xx\displaystyle\lim_{x\to\infty}\frac{x + \sin x}{x}, form ∞∞\tfrac\infty\inftyRight so far: Problem 10.
  2. “L'Hôpital: lim⁡(1+cos⁡x)\lim(1 + \cos x) does not exist.”Right so far as a fact about 1+cos⁡x1 + \cos x.
  3. So lim⁡x→∞x+sin⁡xx\displaystyle\lim_{x\to\infty}\frac{x + \sin x}{x} does not existThe rule only says that if the ratio of derivatives has a limit, the original ratio has the same one. It says nothing when the ratio of derivatives has no limit. Here x+sin⁡xx=1+sin⁡xx→1\tfrac{x + \sin x}{x} = 1 + \tfrac{\sin x}{x} \to 1.

Print this set: lhopitals-rule.pdf (problems, answers, and worked solutions on separate pages).

Read the guide: L'Hôpital's rule: check the form, then differentiate top and bottom separately