L'Hôpital's rule ( ) is a mathematical theorem used for evaluating the limit of a quotient of two functions, both 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 <math>f</math> and <math>g</math>, under most circumstances the limit of their quotient can be evaluated as the quotient of the limits: <math display=inline>\lim_{x \to c} f(x)/g(x) = {}</math><math display=inline>\lim_{x \to c} f(x) \big/ \lim_{x \to c} g(x)</math>. This is one of the limit laws. However, if both limits tend to zero (that is, <math display="inline">\lim_{x \to c}f(x) = {}</math><math display="inline">\lim_{x \to c}g(x) = 0</math>) or if both tend to infinity, this method cannot be applied because the "indeterminate forms" and are not well defined. L'Hôpital's rule states that in such cases (assuming a non-vanishing derivative in the denominator),<math display="block">
\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)},</math>where and are the derivatives of and .
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 <math>0/0</math>. 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. Its original presentation was geometric and L'Hôpital showcased many of the same examples used by Bernoulli. 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 <math>c</math> and <math>L</math> be extended real numbers: real numbers, as well as positive and negative infinity. Let <math>I</math> be an open interval containing <math>c</math> (for a two-sided limit) or an open interval with endpoint <math>c</math> (for a one-sided limit, or a limit at infinity if <math>c</math> is infinite).
Assumption 1: On <math>I\setminus \{c\}</math>, the real-valued functions <math>f</math> and <math>g</math> are differentiable with <math>g'(x) \ne 0</math>.
Assumption 2: <math>\lim_{x \to c} \frac{f'(x)}{g'(x)} = L</math>, a finite or infinite limit.
If either
<math display="block">
a) \lim_{x \to c}f(x) = \lim_{x \to c}g(x) = 0
</math>
or
<math display="block">
b) \lim_{x \to c} |f(x)| = \lim_{x \to c} |g(x)| = \infty,
</math>
then
<math display="block">
\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)} = L.
</math>
Although we have written <math>x \to c</math> throughout, the limits may also be one-sided limits (<math>x \to c^+</math> or <math>x \to c^-</math>), when <math>c</math> is a finite endpoint of <math>I</math>.
In the second case b), the hypothesis that <math>f</math> diverges to infinity is not necessary; in fact, it is sufficient that <math>\lim_{x \to c} |g(x)| = \infty.</math>
The hypothesis that <math>g'(x) \ne 0</math> appears most commonly in the literature, but some authors sidestep this hypothesis by adding other hypotheses which imply <math>g'(x) \ne 0</math>. For example, one may require in the definition of the limit <math>\lim_{x \to c} \frac{f'(x)}{g'(x)} = L</math> that the function <math>\frac{f'(x)}{g'(x)}</math> must be defined everywhere on an interval <math>I\setminus \{c\}</math>. Another method is to require that both <math>f</math> and <math>g</math> be differentiable everywhere on an interval containing <math>c</math>.
Necessity of conditions: Counterexamples
All four conditions for l'Hôpital's rule are necessary:
- Indeterminacy of form: <math>\lim_{x \to c} f(x) = \lim_{x \to c} g(x) = 0</math> or <math>\pm \infty</math> ;
- Differentiability of functions: <math> f(x) </math> and <math>g(x)</math> are differentiable on an open interval <math>I</math> except possibly at the limit point <math>c</math> in <math>I</math>;
- Non-zero derivative of denominator: <math>g'(x) \ne 0</math> for all <math>x</math> in <math>I</math> with <math>x \ne c</math>;
- Existence of limit of the quotient of the derivatives: <math>\lim_{x \to c} \frac{f'(x)}{g'(x)} </math> 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 <math>f(x) = x + 1</math> and <math>g(x) = 2x + 1</math> and the limit is <math>x \to 1</math>.
The first condition is not satisfied for this counterexample because <math>\lim_{x \to 1} f(x) = \lim_{x \to 1} (x + 1) = (1) + 1 = 2 \neq 0</math> and <math>\lim_{x \to 1} g(x) = \lim_{x \to 1} (2x + 1) = 2(1) + 1 = 3 \neq 0</math>. This means that the form is not indeterminate.
The second and third conditions are satisfied by <math>f(x)</math> and <math>g(x)</math>. The fourth condition is also satisfied with
<math display="block">
\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}.
</math>
But the conclusion fails, since
<math display="block"> \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}.
</math>
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 <math>I</math>. The fact that <math>I</math> 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 <math>c</math> exists because l'Hôpital's rule only requires the derivative to exist as the function approaches <math>c</math>; the derivative does not need to be taken at <math>c</math>.
For example, let <math>f(x) = \begin{cases} \sin x, & x\neq0 \\ 1, & x=0 \end{cases}</math>, <math>g(x)=x</math>, and <math>c = 0</math>. In this case, <math>f(x)</math> is not differentiable at <math>c</math>. However, since <math>f(x)</math> is differentiable everywhere except <math>c</math>, then <math>\lim_{x \to c} f'(x)</math> still exists. Thus, since <math>\lim_{x \to c} \frac{f(x)}{g(x)} = \frac{0}{0}</math> and <math>\lim_{x \to c} \frac{f'(x)}{g'(x)}</math> exists, l'Hôpital's rule still holds.
3. Derivative of denominator is zero
The necessity of the condition that <math>g'(x) \ne 0</math> near <math>c</math> can be seen by the following counterexample due to Otto Stolz. Let <math>f(x)=x+\sin x \cos x</math> and <math>g(x) = f(x) e^{\sin x}.</math> Then there is no limit for <math>f(x)/g(x)</math> as <math>x \to \infty.</math> However,
<math display="block">
\begin{align}
\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{align}
</math>
which tends to 0 as <math>x \to \infty</math>, although it 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 <math>\lim_{x \to c} \frac{f'(x)}{g'(x)}</math> exists is essential; if it does not exist, the original limit <math>\lim_{x \to c} \frac{f(x)}{g(x)}</math> may nevertheless exist. Indeed, as <math>x</math> approaches <math>c</math>, the functions <math>f</math> or <math>g</math> may exhibit many oscillations of small amplitude but steep slope, which do not affect <math>\lim_{x \to c} \frac{f(x)}{g(x)}</math> but do prevent the convergence of <math>\lim_{x \to c} \frac{f'(x)}{g'(x)}</math>.
For example, if <math>f(x)=x+\sin(x)</math>, <math>g(x)=x</math> and <math>c=\infty</math>, then
<math display="block">
\frac{f'(x)}{g'(x)}=\frac{1+\cos(x)}{1},
</math>
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 <math>f</math> becomes small relative to <math>g</math>:
<math display="block">\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. </math>
In a case such as this, all that can be concluded is that
<math display="block"> \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)} ,</math>
so that if the limit of <math>\frac{f}{g}
</math> exists, then it must lie between the inferior and superior limits of <math>\frac{f'}{g'}
</math> . In the example, 1 does indeed lie between 0 and 2.)
Note also that by the contrapositive form of the Rule, if <math>\lim_{x \to c} \frac{f(x)}{g(x)}</math> does not exist, then <math>\lim_{x \to c} \frac{f'(x)}{g'(x)}</math> also does not exist.
Examples
thumb|upright=1.5|Example application of l'Hôpital's rule to <math>f(x) = \sin x</math> and <math>g(x) = -0.5 x</math>: the function <math>h(x) = f(x)/g(x)</math> is undefined at <math>x = 0</math>, but can be completed to a continuous function on all of <math>\mathbb{R}</math> by defining <math>h(0) = f'(0)/g'(0) = -2</math> (colors marked in legend).In the following computations, each application of l'Hôpital's rule is indicated by the symbol <math>
\stackrel{\mathrm{H{=}</math>.
- Here is a basic example involving the exponential function, which involves the indeterminate form <math>\frac{0}{0}</math> at <math>x = 0</math>:<!--
--><math display="block">
\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.
</math>
- This is a more elaborate example involving <math>\frac{0}{0}</math>. 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:<!--
--><math display="block">
\begin{align}
\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{align}
</math>
- Here is an example involving <math>\frac{\infty}{\infty}</math>: <math display="block">
\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.
</math> Repeatedly apply l'Hôpital's rule until the exponent is zero (if <math>n</math> is an integer) or negative (if <math>n</math> is fractional) to conclude that the limit is zero.
- Here is an example involving the indeterminate form <math>0 \cdot \infty</math> (see below), which is rewritten as the form <math>\frac{\infty}{\infty}</math>:<!--
--><math display="block">\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.
</math>
- Here is an example involving the mortgage repayment formula and <math>\frac{0}{0}</math>. Let <math>P</math> be the principal (loan amount), <math>r</math> the interest rate per period and <math>n</math> the number of periods. When <math>r</math> is zero, the repayment amount per period is <math>\frac{P}{n}</math> (since only principal is being repaid); this is consistent with the formula for non-zero interest rates: <math display="block"> \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}.</math>
- One can also use l'Hôpital's rule to prove the following theorem. If <math>f</math> is twice-differentiable in a neighborhood of <math>x</math> and its second derivative is continuous on this neighborhood, then<!--
--><math display="block">
\begin{align}
\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{align}
</math>
- Sometimes l'Hôpital's rule is invoked in a tricky way: suppose <math> f(x) + f'(x)</math> converges as <math>x \to \infty</math> and that <math>e^x\cdot f(x)</math> converges to positive or negative infinity. Then:<!--
--><math display="block">
\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),
</math><!-- -->and so, <math>\lim_{x \to \infty}f(x)</math> exists and <math>\lim_{x \to \infty}f'(x) = 0.</math> (This result remains true without the added hypothesis that <math>e^x\cdot f(x)</math> 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:
<math display="block">
\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 .
</math><!-- -->This situation can be dealt with by substituting <math>y=e^x</math> and noting that <math>y</math> goes to infinity as <math>x</math> goes to infinity; with this substitution, this problem can be solved with a single application of the rule:
<math display="block">
\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.
</math>
Alternatively, the numerator and denominator can both be multiplied by <math>e^x,</math> at which point L'Hôpital's rule can immediately be applied successfully
<math display="block">
\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.
</math>
- An arbitrarily large number of applications may never lead to an answer even without repeating:
<math display="block">
\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 .</math>
This situation too can be dealt with by a transformation of variables, in this case <math>y = \sqrt{x}</math>:
<math display="block">
\lim_{x \to \infty} \frac{x^\frac1{2}+x^{-\frac1{2}{x^\frac1{2}-x^{-\frac1{2}
= \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
= \frac1{1}
= 1.
</math>
Again, an alternative approach is to multiply numerator and denominator by <math>x^{1/2}</math> before applying L'Hôpital's rule:
<math display="block">
\lim_{x \to \infty} \frac{x^\frac{1}{2}+x^{-\frac{1}{2}{x^\frac{1}{2}-x^{-\frac{1}{2}
= \lim_{x \to \infty} \frac{x+1}{x-1}
\ \stackrel{\mathrm{H{=} \ \lim_{x \to \infty} \frac{1}{1}
= 1.</math>
A common logical fallacy is to use L'Hôpital's rule to prove the value of a derivative by computing the limit of a difference quotient. Since applying l'Hôpital requires knowing the relevant derivatives, this amounts to circular reasoning or begging the question, assuming what is to be proved. For example, consider the proof of the derivative formula for powers of :
<math display="block">
\lim_{h\to 0} \frac{(x+h)^n-x^n}{h}=nx^{n-1}.
</math>
Applying L'Hôpital's rule and finding the derivatives with respect to <math>h</math> yields <math>nx^{n - 1}</math> as expected, but this computation requires the use of the very formula that is being proven. Similarly, to prove <math>\lim_{x \to 0} \frac{\sin(x)}{x}=1</math>, applying L'Hôpital requires knowing the derivative of <math>\sin(x)</math> at <math>x=0</math>, which amounts to calculating <math>\lim_{h\to 0} \frac{\sin(h)}{h}</math> in the first place; a valid proof requires a different method such as the squeeze theorem.
Other indeterminate forms
Other indeterminate forms, such as <math>1^\infty</math>, <math>0^0</math>, <math>\infty^0</math>, <math>0 \cdot \infty</math>, and <math>\infty - \infty</math>, can sometimes be evaluated using L'Hôpital's rule. We again indicate applications of L'Hopital's rule by <math>\stackrel{\mathrm{H{=}</math>.
For example, to evaluate a limit involving <math>\infty - \infty</math>, convert the difference of two functions to a quotient:
<math display="block">
\begin{align}
\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{align}
</math>
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 <math>0^0</math>:
<math display="block">
\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}).
</math>
It is valid to move the limit inside the exponential function because this function is continuous. Now the exponent <math>x</math> has been "moved down". The limit <math>\lim_{x \to 0^+}x\cdot\ln x</math> is of the indeterminate form dealt with in an example above: L'Hôpital may be used to determine that
<math display="block">
\lim_{x \to 0^+} x \cdot \ln x = 0.
</math>
Thus
<math display="block">
\lim_{x \to 0^+} x^x = \exp(0) = e^0 = 1.
</math>
The following table lists the most common indeterminate forms and the transformations which precede applying l'Hôpital's rule:
{| class="wikitable defaultleft col1center"
! Indeterminate form with <math>f</math> and <math>g</math>
! Conditions
! Transformation to <math>0/0</math>
|-
|<math>\frac{0}{0}</math>
|<math>\lim_{x \to c} f(x) = 0,\ \lim_{x \to c} g(x) = 0 \!</math>
|
|-
|<math>\frac{\infty}{\infty}</math>
|<math>\lim_{x \to c} f(x) = \infty,\ \lim_{x \to c} g(x) = \infty \!</math>
|<math>\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{1/g(x)}{1/f(x)} \!</math>
|-
|<math>0 \cdot \infty</math>
|<math>\lim_{x \to c} f(x) = 0,\ \lim_{x \to c} g(x) = \infty \!</math>
|<math>\lim_{x \to c} f(x)g(x) = \lim_{x \to c} \frac{f(x)}{1/g(x)} \!</math>
|-
|<math>\infty - \infty</math>
|<math>\lim_{x \to c} f(x) = \infty,\ \lim_{x \to c} g(x) = \infty \!</math>
|<math>\lim_{x \to c} (f(x) - g(x)) = \lim_{x \to c} \frac{1/g(x) - 1/f(x)}{1/(f(x)g(x))} \!</math>
|-
|<math>0^0</math>
|<math>\lim_{x \to c} f(x) = 0^+, \lim_{x \to c} g(x) = 0 \!</math>
|<math>\lim_{x \to c} f(x)^{g(x)} = \exp \lim_{x \to c} \frac{g(x)}{1/\ln f(x)} \!</math>
|-
|<math>1^\infty</math>
|<math>\lim_{x \to c} f(x) = 1,\ \lim_{x \to c} g(x) = \infty \!</math>
|<math>\lim_{x \to c} f(x)^{g(x)} = \exp \lim_{x \to c} \frac{\ln f(x)}{1/g(x)} \!</math>
|-
|<math>\infty^0</math>
|<math>\lim_{x \to c} f(x) = \infty,\ \lim_{x \to c} g(x) = 0 \!</math>
|<math>\lim_{x \to c} f(x)^{g(x)} = \exp \lim_{x \to c} \frac{g(x)}{1/\ln f(x)} \!</math>
|}
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 -plane with coordinates given by the continuous functions <math>g(t)</math> and <math>f(t)</math>, the locus of points <math>(g(t),f(t))</math>, and suppose <math>f(c) = g(c) = 0</math>. The slope of the tangent to the curve at <math>(g(c),f(c)) = (0,0)</math> is the limit of the ratio <math>\frac{f(t)}{g(t)}</math> as <math>t \to c</math>. The tangent to the curve at the point <math>(g(t),f(t))</math> is the velocity vector <math>(g'(t),f'(t))</math> with slope <math>\frac{f'(t)}{g'(t)}</math>. L'Hôpital's rule then states that the slope of the curve at the origin (<math>t = c</math>) is the limit of the tangent slope at points approaching the origin, provided that this is defined.
Proof of L'Hôpital's rule
Special case
The proof of L'Hôpital's rule is simple in the case where <math>f</math> and <math>g</math> are continuously differentiable at the point <math>c</math> 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 <math>f</math> and <math>g</math> are continuously differentiable at a real number <math>c</math>, that <math>f(c) = g(c) = 0</math>, and that <math>g'(c) \neq 0</math>. Then
<math display="block">\begin{align}
& \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{align}</math>
This follows from the difference quotient definition of the derivative. The last equality follows from the continuity of the derivatives at <math>c</math>. The limit in the conclusion is not indeterminate because <math>g'(c) \ne 0</math>.
The proof of a more general version of L'Hôpital's rule is given below.
General proof
This is a unified proof the <math>\frac{0}{0}</math> and <math>\frac{\pm \infty}{\pm \infty}
</math> indeterminate forms using Cauchy's generalization of the mean value theorem. But it is possible to prove it without Cauchy's result.
Let <math>f</math> and <math>g</math> be functions satisfying the assumptions in . Let <math>I</math> be the open interval in the hypothesis with endpoint <math>c</math>. Considering that <math>g'(x) \ne 0</math> on this interval and <math>g</math> is continuous, <math>I</math> can be chosen smaller so that <math>g</math> is nonzero on <math>I</math>.
For each <math>x</math> in the interval, define <math>m(x) = \inf \frac{f'(t)}{g'(t)}</math> and <math>M(x) = \sup \frac{f'(t)}{g'(t)}</math> as <math>t</math> ranges over all values between <math>x</math> and <math>c</math>. (The symbols inf and sup denote the infimum and supremum.)
From the differentiability of <math>f</math> and <math>g</math> on <math>I</math>, Cauchy's mean value theorem ensures that for any two distinct points <math>x</math> and <math>y</math> in <math>I</math> there exists a <math>\xi</math> between <math>x</math> and <math>y</math> such that <math>\frac{f(x)-f(y)}{g(x)-g(y)} = \frac{f'(\xi)}{g'(\xi)}</math>. Consequently, <math>m(x) \leq \frac{f(x)-f(y)}{g(x)-g(y)} \leq M(x)</math> for all choices of distinct <math>x</math> and <math>y</math> in the interval. The value <math>g(x) - g(y)</math> is always nonzero for distinct <math>x</math> and <math>y</math> in the interval, for if it was not, the mean value theorem would imply the existence of a <math>p</math> between <math>x</math> and <math>y</math> such that <math>g'(p) = 0</math>.
The definition of <math>m(x)</math> and <math>M(x)</math> will result in an extended real number, and so it is possible for them to take on the values <math>\pm\infty</math>. In the following two cases, <math>m(x)</math> and <math>M(x)</math> will establish bounds on the ratio <math>\frac{f}{g}</math>.
Case 1: <math>\lim_{x \to c}f(x)=\lim_{x \to c}g(x)=0</math>
For any <math>x</math> in the interval <math>I</math>, and point <math>y</math> between <math>x</math> and <math>c</math>,
<math display="block">
m(x) \le \frac{f(x)-f(y)}{g(x)-g(y)}=\frac{\frac{f(x)}{g(x)}-\frac{f(y)}{g(x){1-\frac{g(y)}{g(x) \le M(x)
</math>
and therefore as <math>y</math> approaches <math>c</math>, <math>\frac{f(y)}{g(x)}</math> and <math>\frac{g(y)}{g(x)}</math> become zero, and so
<math display="block">
m(x) \leq \frac{f(x)}{g(x)} \leq M(x).
</math>
Case 2: <math>\lim_{x \to c} |g(x)| = \infty</math>
For every <math>x</math> in the interval <math>I</math>, define <math>S_x = \{y \mid y</math> is between <math>x</math> and <math>c\}</math>. For every point <math>y</math> between <math>x</math> and <math>c</math>,
<math display="block"
>m(x) \le \frac{f(y)-f(x)}{g(y)-g(x)}=\frac{\frac{f(y)}{g(y)}-\frac{f(x)}{g(y){1-\frac{g(x)}{g(y) \le M(x).
</math>
As <math>y</math> approaches <math>c</math>, both <math>\frac{f(x)}{g(y)}</math> and <math>\frac{g(x)}{g(y)}</math> become zero, and therefore
<math display="block">
m(x) \le \liminf_{y\in S_x} \frac{f(y)}{g(y)} \le \limsup_{y\in S_x} \frac{f(y)}{g(y)} \le M(x).
</math>
The limit superior and limit inferior are necessary since the existence of the limit of <math>\frac{f}{g}</math> has not yet been established.
It is also the case that
<math display="block">
\lim_{x \to c} m(x) = \lim_{x \to c} M(x)
= \lim_{x \to c} \frac{f'(x)}{g'(x)} = L.
</math><!-- close efn -->
and
<math display="block">
\lim_{x \to c} \left(\liminf_{y\in S_x} \frac{f(y)}{g(y)} \right)=\liminf_{x \to c} \frac{f(x)}{g(x)}</math> and <math>\lim_{x \to c} \left(\limsup_{y\in S_x} \frac{f(y)}{g(y)} \right)=\limsup_{x \to c} \frac{f(x)}{g(x)}.
</math>
In case 1, the squeeze theorem establishes that <math>\lim_{x \to c} \frac{f(x)}{g(x)}</math> exists and is equal to <math>L</math>. In the case 2, and the squeeze theorem again asserts that <math>\liminf_{x \to c} \frac{f(x)}{g(x)}=\limsup_{x \to c} \frac{f(x)}{g(x)}=L</math>, and so the limit <math>\lim_{x \to c} \frac{f(x)}{g(x)}</math> exists and is equal to <math>L</math>. This is the result that was to be proven.
In case 2 the assumption that <math>f(x)</math> diverges to infinity was not used within the proof. This means that if <math>|g(x)|</math> diverges to infinity as <math>x</math> approaches <math>c</math> and both <math>f</math> and <math>g</math> satisfy the hypotheses of L'Hôpital's rule, then no additional assumption is needed about the limit of <math>f(x)</math>: It could even be the case that the limit of <math>f(x)</math> does not exist. In this case, L'Hopital's theorem is actually a consequence of Cesàro–Stolz.
In the case when <math>|g(x)|</math> diverges to infinity as <math>x</math> approaches <math>c</math> and <math>f(x)</math> converges to a finite limit at <math>c</math>, then L'Hôpital's rule would be applicable, but not absolutely necessary, since basic limit calculus will show that the limit of <math>\frac{f(x)}{g(x)}</math> as <math>x</math> approaches <math>c</math> must be zero.
Corollary
A simple but very useful consequence of L'Hopital's rule is that the derivative of a function cannot have a removable discontinuity. That is, suppose that <math>f</math> is continuous at <math>a</math>, and that <math>f'(x)</math> exists for all <math>x</math> in some open interval containing <math>a</math>, except perhaps for <math>x = a</math>. Suppose, moreover, that <math>\lim_{x \to a}f'(x)</math> exists. Then <math>f'(a)</math> also exists and
<math display="block">f'(a) = \lim_{x \to a}f'(x).</math>
In particular, <math>f'</math> is also continuous at <math>a</math>.
Thus, if a function is not continuously differentiable near a point, the derivative must have an essential discontinuity at that point.
Proof
Consider the functions <math>h(x) = f(x)-f(a)</math> and <math>g(x) = x-a</math>. The continuity of <math>f</math> at <math>a</math> tells us that <math>\lim_{x \to a}h(x) = 0</math>. Moreover, <math>\lim_{x \to a}g(x) = 0</math> since a polynomial function is always continuous everywhere. Applying L'Hopital's rule shows that
<math display="block">
f'(a) := \lim_{x \to a} \frac{f(x)-f(a)}{x-a} = \lim_{x \to a} \frac{h'(x)}{g'(x)} = \lim_{x \to a}f'(x).</math>
See also
- L'Hôpital controversy
