maths.freeReal Analysis › Functions › L'Hôpital's rule

L'Hôpital's rule

L'Hôpital's rule (/ˌloʊpiːˈtɑːl/ loh-pee-TAHL) is a mathematical theorem used for evaluating the limit of a quotient of two functions, each of which tends to zero or infinity, by taking each function's derivative.

L'Hôpital's rule

L'Hôpital's rule (/ˌloʊpiːˈtɑːl/ loh-pee-TAHL) is a mathematical theorem used for evaluating the limit of a quotient of two functions, each of which tends to zero or infinity, by taking each function's derivative. The rule is named after the 17th-century French mathematician Guillaume de l'Hôpital, who published it in his 1696 textbook after learning it from his tutor, the Swiss mathematician Johann Bernoulli.

For two functions \(f\) and \(g\), under most circumstances the limit of their quotient can be evaluated as the quotient of the limits: \(\lim_{x \to c} f(x)/g(x) = {}\)\(\lim_{x \to c} f(x) \big/ \lim_{x \to c} g(x)\). However, if both limits tend to zero (that is, \(\lim_{x \to c}f(x) = {}\)\(\lim_{x \to c}g(x) = 0\)) or if both tend to infinity, this method cannot be applied because the "indeterminate forms" ⁠\(0/0\)⁠ and ⁠\(\infty/\infty\)⁠ are not well defined. L'Hôpital's rule states that in such cases (assuming a non-vanishing derivative in the denominator),\[\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)},\]where ⁠\(f'\)⁠ and ⁠\(g'\)⁠ are the derivatives of ⁠\(f\)⁠ and ⁠\(g\)⁠.

The differentiation of the numerator and denominator often simplifies the quotient or converts it to a limit that can be directly evaluated by continuity.

History

Johann Bernoulli was the original discoverer of this result for the indeterminate form \(0/0\). He sent it to Guillaume de l'Hôpital (also written l'Hospital) in a letter dated July 22, 1694. Previously, during his time in Paris, Bernoulli signed a contract with l'Hôpital, in which he agreed to teach the new calculus to l'Hôpital, to inform him of his own mathematical discoveries, which l'Hôpital might use as he pleased, and to refrain from sharing his notes with others. In return, l'Hôpital paid Bernoulli an annual allowance, which dramatically improved Bernoulli's financial situation. L'Hôpital published this rule in his 1696 book Analyse des Infiniment Petits pour l'Intelligence des Lignes Courbes (lit. 'Analysis of the Infinitely Small for the Understanding of Curved Lines'). Its original presentation was geometric and L'Hôpital showcased many of the same examples used by Bernoulli. As the first textbook on the differential calculus to be printed, it dominated much of the eighteenth century and helped popularize new mathematics across Europe. The original result was subsequently extended; these are now collectively referred to as l'Hôpital's rules.

General form

The general form of l'Hôpital's rule covers many cases. Let \(c\) and \(L\) be extended real numbers: real numbers, as well as positive and negative infinity. Let \(I\) be an open interval containing \(c\) (for a two-sided limit) or an open interval with endpoint \(c\) (for a one-sided limit, or a limit at infinity if \(c\) is infinite).

Assumption 1: On \(I\setminus \{c\}\), the real-valued functions \(f\) and \(g\) are differentiable with \(g'(x) \ne 0\).

Assumption 2: \(\lim_{x \to c} \frac{f'(x)}{g'(x)} = L\), a finite or infinite limit.

If either

\[a) \lim_{x \to c}f(x) = \lim_{x \to c}g(x) = 0\]

or

\[b) \lim_{x \to c} |f(x)| = \lim_{x \to c} |g(x)| = \infty,\]

Condensed: the full section is in Wikipedia.

Necessity of conditions: Counterexamples

All four conditions for l'Hôpital's rule are necessary:

  1. Indeterminacy of form: \(\lim_{x \to c} f(x) = \lim_{x \to c} g(x) = 0\) or \(\pm \infty\) ;
  2. Differentiability of functions: \(f(x)\) and \(g(x)\) are differentiable on an open interval \(I\) except possibly at the limit point \(c\) in \(I\);
  3. Non-zero derivative of denominator: \(g'(x) \ne 0\) for all \(x\) in \(I\) with \(x \ne c\);
  4. Existence of limit of the quotient of the derivatives: \(\lim_{x \to c} \frac{f'(x)}{g'(x)}\) exists.

Where one of the above conditions is not satisfied, l'Hôpital's rule is not valid in general, and its conclusion may be false in certain cases.

1. Form is not indeterminate

The necessity of the first condition can be seen by considering the counterexample where the functions are \(f(x) = x + 1\) and \(g(x) = 2x + 1\) and the limit is \(x \to 1\).

The first condition is not satisfied for this counterexample because \(\lim_{x \to 1} f(x) = \lim_{x \to 1} (x + 1) = (1) + 1 = 2 \neq 0\) and \(\lim_{x \to 1} g(x) = \lim_{x \to 1} (2x + 1) = 2(1) + 1 = 3 \neq 0\). This means that the form is not indeterminate.

The second and third conditions are satisfied by \(f(x)\) and \(g(x)\). The fourth condition is also satisfied with

\[\lim_{x \to 1} \frac{f'(x)}{g'(x)} = \lim_{x \to 1} \frac{(x+1)'}{(2x+1)'} = \lim_{x \to 1} \frac{1}{2} = \frac{1}{2}.\]

But the conclusion fails, since

\[\lim_{x \to 1} \frac{f(x)}{g(x)} = \lim_{x \to 1} \frac{x+1}{2x+1} = \frac{ \lim_{x \to 1} (x+1) }{ \lim_{x \to 1} (2x+1) } = \frac{2}{3} \neq \frac{1}{2}.\]

2. Differentiability of functions

Differentiability of functions is a requirement because if a function is not differentiable, then the derivative of the function is not guaranteed to exist at each point in \(I\). The fact that \(I\) is an open interval is grandfathered in from the hypothesis of the Cauchy's mean value theorem. The notable exception of the possibility of the functions being not differentiable at \(c\) exists because l'Hôpital's rule only requires the derivative to exist as the function approaches \(c\); the derivative does not need to be taken at \(c\).

For example, let \(f(x) = \begin{cases} \sin x, & x\neq0 \\ 1, & x=0 \end{cases}\), \(g(x)=x\), and \(c = 0\). In this case, \(f(x)\) is not differentiable at \(c\). However, since \(f(x)\) is differentiable everywhere except \(c\), then \(\lim_{x \to c} f'(x)\) still exists. Thus, since \(\lim_{x \to c} \frac{f(x)}{g(x)} = \frac{0}{0}\) and \(\lim_{x \to c} \frac{f'(x)}{g'(x)}\) exists, l'Hôpital's rule still holds.

3. Derivative of denominator is zero

The necessity of the condition that \(g'(x) \ne 0\) near \(c\) (except possibly at \(c\)) can be seen by the following counterexample due to Otto Stolz. Let \(f(x)=x+\sin x \cos x\) and \(g(x) = f(x) e^{\sin x}.\) Then there is no limit for \(f(x)/g(x)\) as \(x \to \infty.\) However,

\[\begin{aligned} \frac{f'(x)}{g'(x)} &= \frac{2\cos^2 x}{(2 \cos^2 x) e^{\sin x} + (x+\sin x \cos x) e^{\sin x} \cos x} \\ &= \frac{2\cos x}{2 \cos x +x+\sin x \cos x} e^{-\sin x}, \end{aligned}\]

which tends to 0 as \(x \to \infty\), while the original expression before cancellation of \(\cos x\) is undefined at infinitely many points. Further examples of this type were found by Ralph P. Boas Jr.

4. Limit of derivatives does not exist

The requirement that the limit \(\lim_{x \to c} \frac{f'(x)}{g'(x)}\) exists is essential; if it does not exist, the original limit \(\lim_{x \to c} \frac{f(x)}{g(x)}\) may nevertheless exist. Indeed, as \(x\) approaches \(c\), the functions \(f\) or \(g\) may exhibit many oscillations of small amplitude but steep slope, which do not affect \(\lim_{x \to c} \frac{f(x)}{g(x)}\) but do prevent the convergence of \(\lim_{x \to c} \frac{f'(x)}{g'(x)}\).

For example, if \(f(x)=x+\sin(x)\), \(g(x)=x\) and \(c=\infty\), then

\[\frac{f'(x)}{g'(x)}=\frac{1+\cos(x)}{1},\]

which does not approach a limit since cosine oscillates infinitely between 1 and −1. But the ratio of the original functions does approach a limit, since the amplitude of the oscillations of \(f\) becomes small relative to \(g\):

\[\lim_{x \to \infty} \frac{f(x)}{g(x)} = \lim_{x \to \infty} \left(\frac{x+\sin(x)}{x} \right) = \lim_{x \to \infty} \left(1+\frac{\sin(x)}{x} \right) = 1+0 = 1.\]

In a case such as this, all that can be concluded is that

\[\liminf_{x \to c} \frac{f'(x)}{g'(x)} \leq \liminf_{x \to c} \frac{f(x)}{g(x)} \leq \limsup_{x \to c} \frac{f(x)}{g(x)} \leq \limsup_{x \to c} \frac{f'(x)}{g'(x)} ,\]

Condensed: the full section is in Wikipedia.

Examples

In the following computations, each application of l'Hôpital's rule is indicated by the symbol \(\stackrel{\mathrm{H}}{=}\).

  • Here is a basic example involving the exponential function, which involves the indeterminate form \(\frac{0}{0}\) at \(x = 0\):\[\lim_{x \to 0} \frac{e^x - 1}{x^2+x} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 0} \frac{\frac{d}{dx}(e^x - 1)}{\frac{d}{dx}(x^2+x)} = \lim_{x \to 0} \frac{e^x}{2x+1} = 1.\]
  • This is a more elaborate example involving \(\frac{0}{0}\). Applying l'Hôpital's rule a single time still results in an indeterminate form. In this case, the limit may be evaluated by applying the rule three times:\[\begin{aligned} \lim_{x \to 0}{\frac{2\sin(x)-\sin(2x)}{x-\sin(x)}} & \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 0}{\frac{2\cos(x)-2\cos(2x)}{1-\cos(x)}} \\[4pt] & \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 0}{\frac{-2\sin(x)+4\sin(2x)}{\sin(x)}} \\[4pt] & \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 0}{\frac{-2\cos(x)+8\cos(2x)}{\cos(x)}} ={\frac{-2+8}{1}} =6. \end{aligned}\]
  • Here is an example involving \(\frac{\infty}{\infty}\): \[\lim_{x \to \infty}x^n\cdot e^{-x} =\lim_{x \to \infty}{\frac{x^n}{e^x}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty}{\frac{nx^{n-1}}{e^x}} =n\cdot \lim_{x \to \infty}{\frac{x^{n-1}}{e^x}}.\] Repeatedly apply l'Hôpital's rule until the exponent is zero (if \(n\) is an integer) or negative (if \(n\) is fractional) to conclude that the limit is zero.
  • Here is an example involving the indeterminate form \(0 \cdot \infty\) (see below), which is rewritten as the form \(\frac{\infty}{\infty}\):\[\lim_{x \to 0^+}x \ln x =\lim_{x \to 0^+} \frac{\ln x}{\frac{1}{x}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 0^+} \frac{\frac{1}{x}}{-\frac{1}{x^2}} = \lim_{x \to 0^+} -x = 0.\]
  • Here is an example involving the mortgage repayment formula and \(\frac{0}{0}\). Let \(P\) be the principal (loan amount), \(r\) the interest rate per period and \(n\) the number of periods. When \(r\) is zero, the repayment amount per period is \(\frac{P}{n}\) (since only principal is being repaid); this is consistent with the formula for non-zero interest rates: \[\lim_{r\to 0} \frac{Pr(1+r)^n}{(1+r)^n-1} \ \stackrel{\mathrm{H}}{=} \ P \lim_{r\to 0} \frac{(1+r)^n+rn(1+r)^{n-1}}{n(1+r)^{n-1}} = \frac{P}{n}.\]
  • One can also use l'Hôpital's rule to prove the following theorem. If \(f\) is twice-differentiable in a neighborhood of \(x\) and its second derivative is continuous on this neighborhood, then\[\begin{aligned} \lim_{h \to 0} \frac{f(x+h)+f(x-h)-2f(x)}{h^2} &= \lim_{h\to 0} \frac{f'(x+h)-f'(x-h)}{2h} \\[4pt] &= \lim_{h\to 0} \frac{f''(x+h) + f''(x-h)}{2} \\[4pt] &= f''(x). \end{aligned}\]
  • Sometimes l'Hôpital's rule is invoked in a tricky way: suppose \(f(x) + f'(x)\) converges as \(x \to \infty\) and that \(e^x\cdot f(x)\) converges to positive or negative infinity. Then:\[\lim_{x \to \infty }f(x) = \lim_{x \to \infty} \frac{e^x\cdot f(x)}{e^x} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{e^x\bigl(f(x)+f'(x)\bigr)}{e^x} = \lim_{x \to \infty} \bigl(f(x)+f'(x)\bigr),\]and so, \(\lim_{x \to \infty}f(x)\) exists and \(\lim_{x \to \infty}f'(x) = 0.\) (This result remains true without the added hypothesis that \(e^x\cdot f(x)\) converges to positive or negative infinity, but the justification is then incomplete.)

Complications

Sometimes L'Hôpital's rule does not reduce to an obvious limit in a finite number of steps, unless some intermediate simplifications are applied. Examples include the following:

  • Two applications can lead to a return to the original expression that was to be evaluated:

\[\lim_{x \to \infty} \frac{e^x+e^{-x}}{e^x-e^{-x}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{e^x-e^{-x}}{e^x+e^{-x}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{e^x+e^{-x}}{e^x-e^{-x}} \ \stackrel{\mathrm{H}}{=} \ \cdots .\]This situation can be dealt with by substituting \(y=e^x\) and noting that \(y\) goes to infinity as \(x\) goes to infinity; with this substitution, this problem can be solved with a single application of the rule:

\[\lim_{x \to \infty} \frac{e^x+e^{-x}}{e^x-e^{-x}} = \lim_{y\to \infty} \frac{y+y^{-1}}{y-y^{-1}} \ \stackrel{\mathrm{H}}{=} \ \lim_{y\to \infty} \frac{1-y^{-2}}{1+y^{-2}} = \frac{1}{1} = 1.\]

Alternatively, the numerator and denominator can both be multiplied by \(e^x,\) at which point L'Hôpital's rule can immediately be applied successfully

\[\lim_{x \to \infty} \frac{e^x+e^{-x}}{e^x-e^{-x}} = \lim_{x \to \infty} \frac{e^{2x} + 1}{e^{2x} - 1} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{2e^{2x}}{2e^{2x}} = 1.\]

  • An arbitrarily large number of applications may never lead to an answer even without repeating:

\[\lim_{x \to \infty} \frac{x^\frac1{2}+x^{-\frac1{2}}}{x^\frac1{2}-x^{-\frac1{2}}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{\frac1{2}x^{-\frac1{2}}-\frac{1}{2}x^{-\frac3{2}}}{\frac1{2}x^{-\frac1{2}}+\frac1{2}x^{-\frac3{2}}} \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to \infty} \frac{-\frac1{4}x^{-\frac3{2}}+\frac3{4}x^{-\frac5{2}}}{-\frac1{4}x^{-\frac3{2}}-\frac3{4}x^{-\frac5{2}}} \ \stackrel{\mathrm{H}}{=} \ \cdots .\]

This situation too can be dealt with by a transformation of variables, in this case \(y = \sqrt{x}\):

Condensed: the full section is in Wikipedia.

Other indeterminate forms

Other indeterminate forms, such as \(1^\infty\), \(0^0\), \(\infty^0\), \(0 \cdot \infty\), and \(\infty - \infty\), can sometimes be evaluated using L'Hôpital's rule. We again indicate applications of L'Hopital's rule by \(\stackrel{\mathrm{H}}{=}\).

For example, to evaluate a limit involving \(\infty - \infty\), convert the difference of two functions to a quotient:

\[\begin{aligned} \lim_{x \to 1} \left(\frac{x}{x-1}-\frac1{\ln x} \right) & = \lim_{x \to 1} \frac{x\cdot\ln x -x+1}{(x-1)\cdot\ln x} \\[6pt] & \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 1} \frac{\ln x}{\frac{x-1}{x}+\ln x} \\[6pt] & = \lim_{x \to 1} \frac{x\cdot\ln x}{x-1+x\cdot\ln x} \\[6pt] & \ \stackrel{\mathrm{H}}{=} \ \lim_{x \to 1} \frac{1+\ln x}{1+1+\ln x} = \frac{1+0}{1+1+0}. \end{aligned}\]

L'Hôpital's rule can be used on indeterminate forms involving exponents by using logarithms to "move the exponent down". Here is an example involving the indeterminate form \(0^0\):

\[\lim_{x \to 0^+\!} x^x = \lim_{x \to 0^+\!} e^{\ln (x^x)} = \lim_{x \to 0^+\!} e^{x \cdot \ln x} = \lim_{x \to 0^+\!} \exp(x \cdot \ln x) = \exp({\lim_{x \to 0^+\!\!} \, x \cdot \ln x}).\]

It is valid to move the limit inside the exponential function because this function is continuous. Now the exponent \(x\) has been "moved down". The limit \(\lim_{x \to 0^+}x\cdot\ln x\) is of the indeterminate form 0 · ∞ dealt with in an example above: L'Hôpital may be used to determine that

\[\lim_{x \to 0^+} x \cdot \ln x = 0.\]

Condensed: the full section is in Wikipedia.

Stolz-Cesàro theorem

The Stolz-Cesàro theorem is a similar result involving limits of sequences, but it uses finite difference operators rather than derivatives.

Geometric interpretation: parametric curve and velocity vector

Consider the parametric curve in the xy-plane with coordinates given by the continuous functions \(g(t)\) and \(f(t)\), the locus of points \((g(t),f(t))\), and suppose \(f(c) = g(c) = 0\). The slope of the tangent to the curve at \((g(c),f(c)) = (0,0)\) is the limit of the ratio \(\frac{f(t)}{g(t)}\) as \(t \to c\). The tangent to the curve at the point \((g(t),f(t))\) is the velocity vector \((g'(t),f'(t))\) with slope \(\frac{f'(t)}{g'(t)}\). L'Hôpital's rule then states that the slope of the curve at the origin (\(t = c\)) is the limit of the tangent slope at points approaching the origin, provided that this is defined.

Special case

The proof of L'Hôpital's rule is simple in the case where \(f\) and \(g\) are continuously differentiable at the point \(c\) and where a finite limit is found after the first round of differentiation. This is only a special case of L'Hôpital's rule, because it only applies to functions satisfying stronger conditions than required by the general rule. However, many common functions have continuous derivatives (e.g. polynomials, sine and cosine, exponential functions), so this special case covers most applications.

Suppose that \(f\) and \(g\) are continuously differentiable at a real number \(c\), that \(f(c) = g(c) = 0\), and that \(g'(c) \neq 0\). Then

\[\begin{aligned} & \lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f(x)-0}{g(x)-0} = \lim_{x \to c} \frac{f(x)-f(c)}{g(x)-g(c)} \\[6pt] = {} & \lim_{x \to c} \frac{\left(\frac{f(x)-f(c)}{x-c} \right)}{\left(\frac{g(x)-g(c)}{x-c} \right)} = \frac{\lim_{x \to c} \left(\frac{f(x)-f(c)}{x-c} \right)}{\lim_{x \to c} \left(\frac{g(x)-g(c)}{x-c} \right)}= \frac{f'(c)}{g'(c)} = \lim_{x \to c} \frac{f'(x)}{g'(x)}. \end{aligned}\]

This follows from the difference quotient definition of the derivative. The last equality follows from the continuity of the derivatives at \(c\). The limit in the conclusion is not indeterminate because \(g'(c) \ne 0\).

The proof of a more general version of L'Hôpital's rule is given below.

さあ 計算機では解けませんが、計算可能です。下の一つを試してみましょう。もしくは自分で入力してください。

あなた自身の仕事を続ける

無料アカウントでは、すべてのレッスンにノートを追加し、完成したことの記録、解いた問題を一つの場所に保存し、このページについて質問できる先生を追加します。数学自体はログインしたかどうかに関係なく誰でも利用できます。

登録 ログイン

ここで使用された記号

どの記号をタップしても、定義、画像、それぞれの文字の意味が表示されます。

質問

What is the ε, δ definition actually saying?

That you can make the output as close to the limit as anyone demands (within ε) by keeping the input close enough (within δ). It replaces "approaches" with a challenge-and-response that can be checked.

Why does the harmonic series diverge when its terms go to zero?

Because the terms shrink too slowly: group them as 1/3 + 1/4 > 1/2, 1/5 + … + 1/8 > 1/2, and so on: infinitely many halves.

このページの一部は、 Wikipedia (CC BY-SA 4.0). ここで簡略化して再説明する 誤りは我々の責任だ

ここに Real Analysis