Example application of l'Hôpital's rule to f(x) = sin(x) and g(x) = −0.5x: the function h(x) = f(x)/g(x) is undefined at x = 0, but can be completed to a continuous function on all of R by defining h(0) = f′(0)/g′(0) = −2.
Part of a series of articles about | ||||||
Calculus | ||||||
---|---|---|---|---|---|---|
∫ a b f ′ ( t ) d t = f ( b ) − f ( a ) {\displaystyle \int _{a}^{b}f'(t)\,dt=f(b)-f(a)} | ||||||
Differential
|
||||||
Integral
|
||||||
Series
|
||||||
Vector
|
||||||
Multivariable
|
||||||
Advanced |
||||||
Specialized | ||||||
Miscellaneous | ||||||
L'Hôpital's rule (/ˌloʊpiːˈtɑːl/, loh-pee-TAHL) or L'Hospital's rule, also known as Bernoulli's rule, is a mathematical theorem that allows evaluating limits of indeterminate forms using derivatives. Application (or repeated application) of the rule often converts an indeterminate form to an expression that can be easily evaluated by substitution. The rule is named after the 17th-century French mathematician Guillaume De l'Hôpital. Although the rule is often attributed to De l'Hôpital, the theorem was first introduced to him in 1694 by the Swiss mathematician Johann Bernoulli.
De L'Hôpital's rule states that for functions f and g which are differentiable on an open interval I except possibly at a point c contained in I, if lim x → c f ( x ) = lim x → c g ( x ) = 0 or lim x → c g ( x ) = ± ∞ , {\textstyle \lim \limits _{x\to c}f(x)=\lim \limits _{x\to c}g(x)=0{\text{ or }}\lim \limits _{x\to c}g(x)=\pm \infty ,} and g ′ ( x ) ≠ 0 {\textstyle g'(x)\neq 0} for all x in I with x ≠ c, and lim x → c f ′ ( x ) g ′ ( x ) {\textstyle \lim \limits _{x\to c}{\frac {f'(x)}{g'(x)}}} exists, then
lim x → c f ( x ) g ( x ) = lim x → c f ′ ( x ) g ′ ( x ) . {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}=\lim _{x\to c}{\frac {f'(x)}{g'(x)}}.}The differentiation of the numerator and denominator often simplifies the quotient or converts it to a limit that can be directly evaluated.
Guillaume de l'Hôpital (also written l'Hospital) published this rule in his 1696 book Analyse des Infiniment Petits pour l'Intelligence des Lignes Courbes (literal translation: Analysis of the Infinitely Small for the Understanding of Curved Lines), the first textbook on differential calculus. However, it is believed that the rule was discovered by the Swiss mathematician Johann Bernoulli.
The general form of L'Hôpital's rule covers many cases. Let c and L be extended real numbers (i.e., real numbers, positive infinity, or 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). The real valued functions f and g are assumed to be differentiable on I except possibly at c, and additionally g ′ ( x ) ≠ 0 {\displaystyle g'(x)\neq 0} on I except possibly at c. It is also assumed that lim x → c f ′ ( x ) g ′ ( x ) = L . {\textstyle \lim \limits _{x\to c}{\frac {f'(x)}{g'(x)}}=L.} Thus, the rule applies to situations in which the ratio of the derivatives has a finite or infinite limit, but not to situations in which that ratio fluctuates permanently as x gets closer and closer to c.
If either
lim x → c f ( x ) = lim x → c g ( x ) = 0 {\displaystyle \lim _{x\to c}f(x)=\lim _{x\to c}g(x)=0} or lim x → c | f ( x ) | = lim x → c | g ( x ) | = ∞ , {\displaystyle \lim _{x\to c}|f(x)|=\lim _{x\to c}|g(x)|=\infty ,} then lim x → c f ( x ) g ( x ) = L . {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}=L.} Although we have written x → c throughout, the limits may also be one-sided limits (x → c+ or x → c−), when c is a finite endpoint of I.
In the second case, the hypothesis that f diverges to infinity is not used in the proof (see note at the end of the proof section); thus, while the conditions of the rule are normally stated as above, the second sufficient condition for the rule's procedure to be valid can be more briefly stated as
lim
x
→
c
|
g
(
x
)
|
=
∞
.
{\textstyle \lim _{x\to c}|g(x)|=\infty .}
The hypothesis that g ′ ( x ) ≠ 0 {\displaystyle g'(x)\neq 0} appears most commonly in the literature, but some authors sidestep this hypothesis by adding other hypotheses elsewhere. One method is to define the limit of a function with the additional requirement that the limiting function is defined everywhere on the relevant interval I except possibly at c. Another method is to require that both f and g be differentiable everywhere on an interval containing c.
All four conditions for L'Hôpital's rule are necessary:
Where one of the above conditions is not satisfied, L'Hôpital's rule is not valid in general, and so it cannot always be applied.
The necessity of the first condition can be seen by considering the counterexample where the functions are f ( x ) = x + 1 {\displaystyle f(x)=x+1} and g ( x ) = 2 x + 1 {\displaystyle g(x)=2x+1} and the limit is x → 1 {\displaystyle x\to 1} .
The first condition is not satisfied for this counterexample because lim x → 1 f ( x ) = lim x → 1 ( x + 1 ) = ( 1 ) + 1 = 2 ≠ 0 {\displaystyle \lim _{x\to 1}f(x)=\lim _{x\to 1}(x+1)=(1)+1=2\neq 0} and lim x → 1 g ( x ) = lim x → 1 ( 2 x + 1 ) = 2 ( 1 ) + 1 = 3 ≠ 0 {\displaystyle \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 ) {\displaystyle f(x)} and g ( x ) {\displaystyle g(x)} . The fourth condition is also satisfied with lim x → 1 f ′ ( x ) g ′ ( x ) = lim x → 1 ( x + 1 ) ′ ( 2 x + 1 ) ′ = lim x → 1 1 2 = 1 2 {\displaystyle \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, L'Hôpital's rule fails in this counterexample, since lim x → 1 f ( x ) g ( x ) = lim x → 1 x + 1 2 x + 1 = lim x → 1 ( x + 1 ) lim x → 1 ( 2 x + 1 ) = 2 3 ≠ 1 2 = lim x → 1 f ′ ( x ) g ′ ( x ) {\displaystyle \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}}=\lim _{x\to 1}{\frac {f'(x)}{g'(x)}}} .
Differentiability of functions is a requirement because if a function is not differentiable, then the derivative of the functions is not guaranteed to exist at each point in I {\displaystyle {\mathcal {I}}} . The fact that I {\displaystyle {\mathcal {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 {\displaystyle c} exists because L'Hôpital's rule only requires the derivative to exist as the function approaches c {\displaystyle c} ; the derivative does not need to be taken at c {\displaystyle c} .
For example, let f ( x ) = { sin x , x ≠ 0 1 , x = 0 {\displaystyle f(x)={\begin{cases}\sin x,&x\neq 0\\1,&x=0\end{cases}}} , g ( x ) = x {\displaystyle g(x)=x} , and c = 0 {\displaystyle c=0} . In this case, f ( x ) {\displaystyle f(x)} is not differentiable at c {\displaystyle c} . However, since f ( x ) {\displaystyle f(x)} is differentiable everywhere except c {\displaystyle c} , then lim x → c f ′ ( x ) {\displaystyle \lim _{x\to c}f'(x)} still exists. Thus, since
lim x → c f ( x ) g ( x ) = 0 0 {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}={\frac {0}{0}}} and lim x → c f ′ ( x ) g ′ ( x ) {\displaystyle \lim _{x\to c}{\frac {f'(x)}{g'(x)}}} exists, L'Hôpital's rule still holds.
The necessity of the condition that g ′ ( x ) ≠ 0 {\displaystyle g'(x)\neq 0} near c {\displaystyle c} can be seen by the following counterexample due to Otto Stolz. Let f ( x ) = x + sin x cos x {\displaystyle f(x)=x+\sin x\cos x} and g ( x ) = f ( x ) e sin x . {\displaystyle g(x)=f(x)e^{\sin x}.} Then there is no limit for f ( x ) / g ( x ) {\displaystyle f(x)/g(x)} as x → ∞ . {\displaystyle x\to \infty .} However,
f ′ ( x ) g ′ ( x ) = 2 cos 2 x ( 2 cos 2 x ) e sin x + ( x + sin x cos x ) e sin x cos x = 2 cos x 2 cos x + x + sin x cos x e − sin x , {\displaystyle {\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 → ∞ {\displaystyle x\to \infty } . Further examples of this type were found by Ralph P. Boas Jr.
The requirement that the limit
lim x → c f ′ ( x ) g ′ ( x ) {\displaystyle \lim _{x\to c}{\frac {f'(x)}{g'(x)}}}exists is essential. Without this condition, f ′ {\displaystyle f'} or g ′ {\displaystyle g'} may exhibit undamped oscillations as x {\displaystyle x} approaches c {\displaystyle c} , in which case L'Hôpital's rule does not apply. For example, if f ( x ) = x + sin ( x ) {\displaystyle f(x)=x+\sin(x)} , g ( x ) = x {\displaystyle g(x)=x} and c = ± ∞ {\displaystyle c=\pm \infty } , then
f ′ ( x ) g ′ ( x ) = 1 + cos ( x ) 1 ; {\displaystyle {\frac {f'(x)}{g'(x)}}={\frac {1+\cos(x)}{1}};}this expression does not approach a limit as x {\displaystyle x} goes to c {\displaystyle c} , since the cosine function oscillates between 1 and −1. But working with the original functions, lim x → ∞ f ( x ) g ( x ) {\displaystyle \lim _{x\to \infty }{\frac {f(x)}{g(x)}}} can be shown to exist:
lim x → ∞ f ( x ) g ( x ) = lim x → ∞ ( x + sin ( x ) x ) = lim x → ∞ ( 1 + sin ( x ) x ) = 1 + lim x → ∞ ( sin ( x ) x ) = 1 + 0 = 1. {\displaystyle \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+\lim _{x\to \infty }\left({\frac {\sin(x)}{x}}\right)=1+0=1.}In a case such as this, all that can be concluded is that
lim inf x → c f ′ ( x ) g ′ ( x ) ≤ lim inf x → c f ( x ) g ( x ) ≤ lim sup x → c f ( x ) g ( x ) ≤ lim sup x → c f ′ ( x ) g ′ ( x ) , {\displaystyle \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)}},}so that if the limit of f g {\textstyle {\frac {f}{g}}} f/g exists, then it must lie between the inferior and superior limits of f ′ g ′ {\textstyle {\frac {f'}{g'}}} . (In the example above, this is true, since 1 indeed lies between 0 and 2.)
Sometimes L'Hôpital's rule is invoked in a tricky way: suppose f ( x ) + f ′ ( x ) {\displaystyle f(x)+f'(x)} converges as x → ∞ and that e x ⋅ f ( x ) {\displaystyle e^{x}\cdot f(x)} converges to positive or negative infinity. Then:
lim x → ∞ f ( x ) = lim x → ∞ e x ⋅ f ( x ) e x = lim x → ∞ e x ( f ( x ) + f ′ ( x ) ) e x = lim x → ∞ ( f ( x ) + f ′ ( x ) ) {\displaystyle \lim _{x\to \infty }f(x)=\lim _{x\to \infty }{\frac {e^{x}\cdot f(x)}{e^{x}}}=\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 → ∞ f ( x ) {\textstyle \lim _{x\to \infty }f(x)} exists and lim x → ∞ f ′ ( x ) = 0. {\textstyle \lim _{x\to \infty }f'(x)=0.}The result remains true without the added hypothesis that e x ⋅ f ( x ) {\displaystyle e^{x}\cdot f(x)} converges to positive or negative infinity, but the justification is then incomplete.
Sometimes L'Hôpital's rule does not lead to an answer in a finite number of steps unless some additional steps are applied. Examples include the following:
A common pitfall is using L'Hôpital's rule with some circular reasoning to compute a derivative via a difference quotient. For example, consider the task of proving the derivative formula for powers of x:
lim h → 0 ( x + h ) n − x n h = n x n − 1 . {\displaystyle \lim _{h\to 0}{\frac {(x+h)^{n}-x^{n}}{h}}=nx^{n-1}.}Applying L'Hôpital's rule and finding the derivatives with respect to h of the numerator and the denominator yields nxn−1 as expected. However, differentiating the numerator requires the use of the very fact that is being proven. This is an example of begging the question, since one may not assume the fact to be proven during the course of the proof.
A similar pitfall occurs in the calculation of lim x → 0 sin ( x ) x = 1. {\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{x}}=1.} Proving that differentiating sin ( x ) {\displaystyle \sin(x)} gives cos ( x ) {\displaystyle \cos(x)} involves calculating the difference quotient lim h → 0 sin ( h ) h {\displaystyle \lim _{h\to 0}{\frac {\sin(h)}{h}}} in the first place, so a different method such as squeeze theorem must be used instead.
Other indeterminate forms, such as 1∞, 00, ∞0, 0 · ∞, and ∞ − ∞, can sometimes be evaluated using L'Hôpital's rule. For example, to evaluate a limit involving ∞ − ∞, convert the difference of two functions to a quotient:
lim x → 1 ( x x − 1 − 1 ln x ) = lim x → 1 x ⋅ ln x − x + 1 ( x − 1 ) ⋅ ln x ( 1 ) = lim x → 1 ln x x − 1 x + ln x ( 2 ) = lim x → 1 x ⋅ ln x x − 1 + x ⋅ ln x ( 3 ) = lim x → 1 1 + ln x 1 + 1 + ln x ( 4 ) = lim x → 1 1 + ln x 2 + ln x = 1 2 , {\displaystyle {\begin{aligned}\lim _{x\to 1}\left({\frac {x}{x-1}}-{\frac {1}{\ln x}}\right)&=\lim _{x\to 1}{\frac {x\cdot \ln x-x+1}{(x-1)\cdot \ln x}}&\quad (1)\\&=\lim _{x\to 1}{\frac {\ln x}{{\frac {x-1}{x}}+\ln x}}&\quad (2)\\&=\lim _{x\to 1}{\frac {x\cdot \ln x}{x-1+x\cdot \ln x}}&\quad (3)\\&=\lim _{x\to 1}{\frac {1+\ln x}{1+1+\ln x}}&\quad (4)\\&=\lim _{x\to 1}{\frac {1+\ln x}{2+\ln x}}\\&={\frac {1}{2}},\end{aligned}}}where L'Hôpital's rule is applied when going from (1) to (2) and again when going from (3) to (4).
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 00:
lim x → 0 + x x = lim x → 0 + e ln ( x x ) = lim x → 0 + e x ⋅ ln x = e lim x → 0 + ( x ⋅ ln x ) . {\displaystyle \lim _{x\to 0^{+}}x^{x}=\lim _{x\to 0^{+}}e^{\ln(x^{x})}=\lim _{x\to 0^{+}}e^{x\cdot \ln x}=e^{\lim \limits _{x\to 0^{+}}(x\cdot \ln x)}.}It is valid to move the limit inside the exponential function because the exponential function is continuous. Now the exponent x {\displaystyle x} has been "moved down". The limit lim x → 0 + x ⋅ ln x {\displaystyle \lim _{x\to 0^{+}}x\cdot \ln x} is of the indeterminate form 0 · ∞, but as shown in an example above, l'Hôpital's rule may be used to determine that
lim x → 0 + x ⋅ ln x = 0. {\displaystyle \lim _{x\to 0^{+}}x\cdot \ln x=0.}Thus
lim x → 0 + x x = e 0 = 1. {\displaystyle \lim _{x\to 0^{+}}x^{x}=e^{0}=1.}The following table lists the most common indeterminate forms, and the transformations for applying l'Hôpital's rule:
Indeterminate form | Conditions | Transformation to 0 / 0 {\displaystyle 0/0} |
---|---|---|
0/0 | lim x → c f ( x ) = 0 , lim x → c g ( x ) = 0 {\displaystyle \lim _{x\to c}f(x)=0,\ \lim _{x\to c}g(x)=0\!} | — |
∞ {\displaystyle \infty } / ∞ {\displaystyle \infty } | lim x → c f ( x ) = ∞ , lim x → c g ( x ) = ∞ {\displaystyle \lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=\infty \!} | lim x → c f ( x ) g ( x ) = lim x → c 1 / g ( x ) 1 / f ( x ) {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}=\lim _{x\to c}{\frac {1/g(x)}{1/f(x)}}\!} |
0 ⋅ ∞ {\displaystyle 0\cdot \infty } | lim x → c f ( x ) = 0 , lim x → c g ( x ) = ∞ {\displaystyle \lim _{x\to c}f(x)=0,\ \lim _{x\to c}g(x)=\infty \!} | lim x → c f ( x ) g ( x ) = lim x → c f ( x ) 1 / g ( x ) {\displaystyle \lim _{x\to c}f(x)g(x)=\lim _{x\to c}{\frac {f(x)}{1/g(x)}}\!} |
∞ − ∞ {\displaystyle \infty -\infty } | lim x → c f ( x ) = ∞ , lim x → c g ( x ) = ∞ {\displaystyle \lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=\infty \!} | lim x → c ( f ( x ) − g ( x ) ) = lim x → c 1 / g ( x ) − 1 / f ( x ) 1 / ( f ( x ) g ( x ) ) {\displaystyle \lim _{x\to c}(f(x)-g(x))=\lim _{x\to c}{\frac {1/g(x)-1/f(x)}{1/(f(x)g(x))}}\!} |
0 0 {\displaystyle 0^{0}} | lim x → c f ( x ) = 0 + , lim x → c g ( x ) = 0 {\displaystyle \lim _{x\to c}f(x)=0^{+},\lim _{x\to c}g(x)=0\!} | lim x → c f ( x ) g ( x ) = exp lim x → c g ( x ) 1 / ln f ( x ) {\displaystyle \lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {g(x)}{1/\ln f(x)}}\!} |
1 ∞ {\displaystyle 1^{\infty }} | lim x → c f ( x ) = 1 , lim x → c g ( x ) = ∞ {\displaystyle \lim _{x\to c}f(x)=1,\ \lim _{x\to c}g(x)=\infty \!} | lim x → c f ( x ) g ( x ) = exp lim x → c ln f ( x ) 1 / g ( x ) {\displaystyle \lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {\ln f(x)}{1/g(x)}}\!} |
∞ 0 {\displaystyle \infty ^{0}} | lim x → c f ( x ) = ∞ , lim x → c g ( x ) = 0 {\displaystyle \lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=0\!} | lim x → c f ( x ) g ( x ) = exp lim x → c g ( x ) 1 / ln f ( x ) {\displaystyle \lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {g(x)}{1/\ln f(x)}}\!} |
The Stolz–Cesàro theorem is a similar result involving limits of sequences, but it uses finite difference operators rather than derivatives.
Consider the curve in the plane whose x-coordinate is given by g(t) and whose y-coordinate is given by f(t), with both functions continuous, i.e., the locus of points of the form . Suppose f(c) = g(c) = 0. The limit of the ratio f(t)/g(t) as t → c is the slope of the tangent to the curve at the point = . The tangent to the curve at the point is given by . L'Hôpital's rule then states that the slope of the curve when t = c is the limit of the slope of the tangent to the curve as the curve approaches the origin, provided that this is defined.
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. It is not a proof of the general L'Hôpital's rule because it is stricter in its definition, requiring both continuous differentiability and that c be a real number. Since many common functions have continuous derivatives (e.g. polynomials, sine and cosine, exponential functions), it is a special case worthy of attention.
Suppose that f and g are continuously differentiable at a real number c, that f ( c ) = g ( c ) = 0 {\displaystyle f(c)=g(c)=0} , and that g ′ ( c ) ≠ 0 {\displaystyle g'(c)\neq 0} . Then
lim x → c f ( x ) g ( x ) = lim x → c f ( x ) − 0 g ( x ) − 0 = lim x → c f ( x ) − f ( c ) g ( x ) − g ( c ) = lim x → c ( f ( x ) − f ( c ) x − c ) ( g ( x ) − g ( c ) x − c ) = lim x → c ( f ( x ) − f ( c ) x − c ) lim x → c ( g ( x ) − g ( c ) x − c ) = f ′ ( c ) g ′ ( c ) = lim x → c f ′ ( x ) g ′ ( x ) . {\displaystyle {\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)}}\\={}&\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 \limits _{x\to c}\left({\frac {f(x)-f(c)}{x-c}}\right)}{\lim \limits _{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 ) ≠ 0 {\displaystyle g'(c)\neq 0} .
The proof of a more general version of L'Hôpital's rule is given below.
The following proof is due to Taylor (1952), where a unified proof for the 0 0 {\textstyle {\frac {0}{0}}} and ± ∞ ± ∞ {\textstyle {\frac {\pm \infty }{\pm \infty }}} indeterminate forms is given. Taylor notes that different proofs may be found in Lettenmeyer (1936) and Wazewski (1949).
Let f and g be functions satisfying the hypotheses in the General form section. Let I {\displaystyle {\mathcal {I}}} be the open interval in the hypothesis with endpoint c. Considering that g ′ ( x ) ≠ 0 {\displaystyle g'(x)\neq 0} on this interval and g is continuous, I {\displaystyle {\mathcal {I}}} can be chosen smaller so that g is nonzero on I {\displaystyle {\mathcal {I}}} .
For each x in the interval, define m ( x ) = inf f ′ ( t ) g ′ ( t ) {\displaystyle m(x)=\inf {\frac {f'(t)}{g'(t)}}} and M ( x ) = sup f ′ ( t ) g ′ ( t ) {\displaystyle M(x)=\sup {\frac {f'(t)}{g'(t)}}} as t {\displaystyle t} ranges over all values between x and c. (The symbols inf and sup denote the infimum and supremum.)
From the differentiability of f and g on I {\displaystyle {\mathcal {I}}} , Cauchy's mean value theorem ensures that for any two distinct points x and y in I {\displaystyle {\mathcal {I}}} there exists a ξ {\displaystyle \xi } between x and y such that f ( x ) − f ( y ) g ( x ) − g ( y ) = f ′ ( ξ ) g ′ ( ξ ) {\displaystyle {\frac {f(x)-f(y)}{g(x)-g(y)}}={\frac {f'(\xi )}{g'(\xi )}}} . Consequently, m ( x ) ≤ f ( x ) − f ( y ) g ( x ) − g ( y ) ≤ M ( x ) {\displaystyle m(x)\leq {\frac {f(x)-f(y)}{g(x)-g(y)}}\leq M(x)} for all choices of distinct x and y in the interval. The value g(x)-g(y) is always nonzero for distinct x and y in the interval, for if it was not, the mean value theorem would imply the existence of a p between x and y such that g' (p)=0.
The definition of m(x) and M(x) will result in an extended real number, and so it is possible for them to take on the values ±∞. In the following two cases, m(x) and M(x) will establish bounds on the ratio f/g.
Case 1: lim x → c f ( x ) = lim x → c g ( x ) = 0 {\displaystyle \lim _{x\to c}f(x)=\lim _{x\to c}g(x)=0}
For any x in the interval I {\displaystyle {\mathcal {I}}} , and point y between x and c,
m ( x ) ≤ f ( x ) − f ( y ) g ( x ) − g ( y ) = f ( x ) g ( x ) − f ( y ) g ( x ) 1 − g ( y ) g ( x ) ≤ M ( x ) {\displaystyle m(x)\leq {\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)}}}}\leq M(x)}and therefore as y approaches c, f ( y ) g ( x ) {\displaystyle {\frac {f(y)}{g(x)}}} and g ( y ) g ( x ) {\displaystyle {\frac {g(y)}{g(x)}}} become zero, and so
m ( x ) ≤ f ( x ) g ( x ) ≤ M ( x ) . {\displaystyle m(x)\leq {\frac {f(x)}{g(x)}}\leq M(x).}Case 2: lim x → c | g ( x ) | = ∞ {\displaystyle \lim _{x\to c}|g(x)|=\infty }
For every x in the interval I {\displaystyle {\mathcal {I}}} , define S x = { y ∣ y is between x and c } {\displaystyle S_{x}=\{y\mid y{\text{ is between }}x{\text{ and }}c\}} . For every point y between x and c,
m ( x ) ≤ f ( y ) − f ( x ) g ( y ) − g ( x ) = f ( y ) g ( y ) − f ( x ) g ( y ) 1 − g ( x ) g ( y ) ≤ M ( x ) . {\displaystyle m(x)\leq {\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)}}}}\leq M(x).}As y approaches c, both f ( x ) g ( y ) {\displaystyle {\frac {f(x)}{g(y)}}} and g ( x ) g ( y ) {\displaystyle {\frac {g(x)}{g(y)}}} become zero, and therefore
m ( x ) ≤ lim inf y ∈ S x f ( y ) g ( y ) ≤ lim sup y ∈ S x f ( y ) g ( y ) ≤ M ( x ) . {\displaystyle m(x)\leq \liminf _{y\in S_{x}}{\frac {f(y)}{g(y)}}\leq \limsup _{y\in S_{x}}{\frac {f(y)}{g(y)}}\leq M(x).}The limit superior and limit inferior are necessary since the existence of the limit of f/g has not yet been established.
It is also the case that
lim x → c m ( x ) = lim x → c M ( x ) = lim x → c f ′ ( x ) g ′ ( x ) = L . {\displaystyle \lim _{x\to c}m(x)=\lim _{x\to c}M(x)=\lim _{x\to c}{\frac {f'(x)}{g'(x)}}=L.} lim x → c ( lim inf y ∈ S x f ( y ) g ( y ) ) = lim inf x → c f ( x ) g ( x ) {\displaystyle \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)}}} and lim x → c ( lim sup y ∈ S x f ( y ) g ( y ) ) = lim sup x → c f ( x ) g ( x ) . {\displaystyle \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)}}.}In case 1, the squeeze theorem establishes that lim x → c f ( x ) g ( x ) {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}} exists and is equal to L. In the case 2, and the squeeze theorem again asserts that lim inf x → c f ( x ) g ( x ) = lim sup x → c f ( x ) g ( x ) = L {\displaystyle \liminf _{x\to c}{\frac {f(x)}{g(x)}}=\limsup _{x\to c}{\frac {f(x)}{g(x)}}=L} , and so the limit lim x → c f ( x ) g ( x ) {\displaystyle \lim _{x\to c}{\frac {f(x)}{g(x)}}} exists and is equal to L. This is the result that was to be proven.
In case 2 the assumption that f(x) diverges to infinity was not used within the proof. This means that if |g(x)| diverges to infinity as x approaches c and both f and g satisfy the hypotheses of L'Hôpital's rule, then no additional assumption is needed about the limit of f(x): It could even be the case that the limit of f(x) does not exist. In this case, L'Hopital's theorem is actually a consequence of Cesàro–Stolz.
In the case when |g(x)| diverges to infinity as x approaches c and f(x) converges to a finite limit at c, then L'Hôpital's rule would be applicable, but not absolutely necessary, since basic limit calculus will show that the limit of f(x)/g(x) as x approaches c must be zero.
A simple but very useful consequence of L'Hopital's rule is a well-known criterion for differentiability. It states the following: suppose that f is continuous at a, and that f ′ ( x ) {\displaystyle f'(x)} exists for all x in some open interval containing a, except perhaps for x = a {\displaystyle x=a} . Suppose, moreover, that lim x → a f ′ ( x ) {\displaystyle \lim _{x\to a}f'(x)} exists. Then f ′ ( a ) {\displaystyle f'(a)} also exists and
f ′ ( a ) = lim x → a f ′ ( x ) . {\displaystyle f'(a)=\lim _{x\to a}f'(x).}In particular, f' is also continuous at a.
Consider the functions h ( x ) = f ( x ) − f ( a ) {\displaystyle h(x)=f(x)-f(a)} and g ( x ) = x − a {\displaystyle g(x)=x-a} . The continuity of f at a tells us that lim x → a h ( x ) = 0 {\displaystyle \lim _{x\to a}h(x)=0} . Moreover, lim x → a g ( x ) = 0 {\displaystyle \lim _{x\to a}g(x)=0} since a polynomial function is always continuous everywhere. Applying L'Hopital's rule shows that f ′ ( a ) := lim x → a f ( x ) − f ( a ) x − a = lim x → a h ′ ( x ) g ′ ( x ) = lim x → a f ′ ( x ) {\displaystyle 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)} .