# L'Hôpital's rule

Part of a series of articles about :
Calculus :
$\int _{a}^{b}f'(t)\,dt=f(b)-f(a)$ :
Fundamental theorem
Limits
Continuity
Rolle's theorem
Mean value theorem
Inverse function theorem :
Differential
Definitions
Derivative (generalizations)
Differential
infinitesimal
of a function
total
Concepts
Differentiation notation
Second derivative
Implicit differentiation
Logarithmic differentiation
Related rates
Taylor's theorem
Rules and identities
Sum
Product
Chain
Power
Quotient
L'Hôpital's rule
Inverse
General Leibniz
Faà di Bruno's formula
Reynolds :
Integral
Lists of integrals
Integral transform
Leibniz integral rule
Definitions
Antiderivative
Integral (improper)
Riemann integral
Lebesgue integration
Contour integration
Integral of inverse functions
Integration by
Parts
Discs
Cylindrical shells
Substitution (trigonometric, tangent half-angle, Euler)
Euler's formula
Partial fractions (Heaviside's method)
Changing order
Reduction formulae
Differentiating under the integral sign
Risch algorithm :
Series
Geometric (arithmetico-geometric)
Harmonic
Alternating
Power
Binomial
Taylor
Convergence tests
Summand limit (term test)
Ratio
Root
Integral
Direct comparison
Limit comparison
Alternating series
Cauchy condensation
Dirichlet
Abel :
Vector
Gradient
Divergence
Curl
Laplacian
Directional derivative
Identities
Theorems
Gradient
Green's
Stokes'
Divergence
generalized Stokes
Helmholtz decomposition :
Multivariable
Formalisms
Matrix
Tensor
Exterior
Geometric
Definitions
Partial derivative
Multiple integral
Line integral
Surface integral
Volume integral
Jacobian
Hessian :
Advanced
Calculus on Euclidean space
Generalized functions
Limit of distributions :
Specialized
Fractional
Malliavin
Stochastic
Variations :
Miscellanea
Precalculus
History
Glossary
List of topics
Integration Bee
Mathematical analysis
Nonstandard analysis :
vte :
L'Hôpital's rule (/ˌloʊpiːˈtɑːl/, loh-pee-TAHL), 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.
L'Hôpital's rule states that for functions f and g which are defined on an open interval I and differentiable on I∖{c}{\textstyle I\setminus \{c\}} for a (possibly infinite) accumulation point c of I, if lim$_{x→c}$f(x)=lim$_{x→c}$g(x)=0 or ±∞, {\textstyle \lim \limits _{x\to c}f(x)=\lim \limits _{x\to c}g(x)=0{\text{ or }}\pm \infty , } and g$^′$(x)≠0{\textstyle g'(x)\neq 0} for all x in I∖{c}{\textstyle I\setminus \{c\}}, and lim$_{x→c}$ f$^′$(x)/g$^′$(x) {\textstyle \lim \limits _{x\to c}{\frac {f'(x)}{g'(x)}}} exists, then
    $\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 by continuity.

## History

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.

## 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). On $I\smallsetminus \{c\}$, the real-valued functions f and g are assumed differentiable with $g'(x)\neq 0$. 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}, a finite or infinite limit.
If either$\lim _{x\to c}f(x)=\lim _{x\to c}g(x)=0$or$\lim _{x\to c}|f(x)|=\lim _{x\to c}|g(x)|=\infty ,$then$\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 necessary; in fact, it is sufficient that lim$_{x→c}$|g(x)|=∞.{\textstyle \lim _{x\to c}|g(x)|=\infty .}
The hypothesis that $g'(x)\neq 0$ appears most commonly in the literature, but some authors sidestep this hypothesis by adding other hypotheses which imply $g'(x)\neq 0$. For example, one may require in the definition of the limit lim$_{x→c}$ f$^′$(x)/g$^′$(x)=L{\textstyle \lim \limits _{x\to c}{\frac {f'(x)}{g'(x)}}=L} that the function f$^′$(x)/g$^′$(x) {\textstyle {\frac {f'(x)}{g'(x)}}} must be defined everywhere on an interval $I\smallsetminus \{c\}$. Another method is to require that both f and g be differentiable everywhere on an interval containing c.

## Necessity of conditions: Counterexamples

All four conditions for L'Hôpital's rule are necessary:
* Indeterminacy of form: $\lim _{x\to c}f(x)=\lim _{x\to c}g(x)=0$ or $\pm \infty$ ;
* Differentiability of functions: $f(x)$ and $g(x)$ are differentiable on an open interval ${\mathcal {I}}$ except possibly at the limit point $c$ in ${\mathcal {I}}$;
* Non-zero derivative of denominator: $g'(x)\neq 0$ for all $x$ in ${\mathcal {I}}$ with $x\neq c$ ;
* 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 ${\mathcal {I}}$. The fact that ${\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$ 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\neq 0\\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)\neq 0$ near $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$, 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 $\lim _{x\to c}{\frac {f'(x)}{g'(x)}}$ exists is essential; if it does not exist, the other 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)}},$
so that if the limit of f/g {\textstyle {\frac {f}{g}}} exists, then it must lie between the inferior and superior limits of f$^′$/g$^′$ {\textstyle {\frac {f'}{g'}}} . In the example, 1 does indeed lie between 0 and 2.)
Note also that by the contrapositive form of the Rule, if $\lim _{x\to c}{\frac {f(x)}{g(x)}}$ does not exist, then $\lim _{x\to c}{\frac {f'(x)}{g'(x)}}$ also does not exist.

## Examples

In the following computations, we indicate each application of L'Hopital's rule by the symbol $\ {\stackrel {\mathrm {H} }{=}}\$.
* Here is a basic example involving the exponential function, which involves the indeterminate form ⁠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 ⁠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 ⁠∞/∞⁠: $\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 · ∞ (see below), which is rewritten as the form ⁠∞/∞⁠: $\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 ⁠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 → ∞ 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}{\biglf(x)+f'(x){\bigr )}}{e^{x}}}=\lim _{x\to \infty }{\biglf(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.} (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^{\frac {1}{2}}+x^{-{\frac {1}{2}}}}{x^{\frac {1}{2}}-x^{-{\frac {1}{2}}}}}\ {\stackrel {\mathrm {H} }{=}}\ \lim _{x\to \infty }{\frac {{\frac {1}{2}}x^{-{\frac {1}{2}}}-{\frac {1}{2}}x^{-{\frac {3}{2}}}}{{\frac {1}{2}}x^{-{\frac {1}{2}}}+{\frac {1}{2}}x^{-{\frac {3}{2}}}}}\ {\stackrel {\mathrm {H} }{=}}\ \lim _{x\to \infty }{\frac {-{\frac {1}{4}}x^{-{\frac {3}{2}}}+{\frac {3}{4}}x^{-{\frac {5}{2}}}}{-{\frac {1}{4}}x^{-{\frac {3}{2}}}-{\frac {3}{4}}x^{-{\frac {5}{2}}}}}\ {\stackrel {\mathrm {H} }{=}}\ \cdots .$This situation too can be dealt with by a transformation of variables, in this case $y={\sqrt {x}}$: $\lim _{x\to \infty }{\frac {x^{\frac {1}{2}}+x^{-{\frac {1}{2}}}}{x^{\frac {1}{2}}-x^{-{\frac {1}{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}}}={\frac {1}{1}}=1.$ Again, an alternative approach is to multiply numerator and denominator by $x^{1/2}$ before applying L'Hôpital's rule: $\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.$
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 x:
    $\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 yields nx$^{n−1}$ as expected, but this computation requires the use of the very formula that is being proven. Similarly, to prove $\lim _{x\to 0}{\frac {\sin(x)}{x}}=1$, applying L'Hôpital requires knowing the derivative of $\sin(x)$ at $x=0$, which amounts to calculating $\lim _{h\to 0}{\frac {\sin(h)}{h}}$ in the first place; a valid proof requires a different method such as the squeeze theorem.

## Other indeterminate forms

Other indeterminate forms, such as 1$^∞$, 0$^0$, ∞$^0$, 0 · ∞, and ∞ − ∞, 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 ∞ − ∞, convert the difference of two functions to a quotient:
    ${\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}}\\[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 \limits _{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.$
Thus
    $\lim _{x\to 0^{+}}x^{x}=\exp(0)=e^{0}=1.$
The following table lists the most common indeterminate forms and the transformations which precede applying l'Hôpital's rule:
| Indeterminate form with f & g | Conditions | Transformation to $0/0$ |
| ⁠0/0⁠ | $\lim _{x\to c}f(x)=0,\ \lim _{x\to c}g(x)=0\!$ | — |
| ⁠$\infty$/$\infty$⁠ | $\lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=\infty \!$ | $\lim _{x\to c}{\frac {f(x)}{g(x)}}=\lim _{x\to c}{\frac {1/g(x)}{1/f(x)}}\!$ |
| $0\cdot \infty$ | $\lim _{x\to c}f(x)=0,\ \lim _{x\to c}g(x)=\infty \!$ | $\lim _{x\to c}f(x)g(x)=\lim _{x\to c}{\frac {f(x)}{1/g(x)}}\!$ |
| $\infty -\infty$ | $\lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=\infty \!$ | $\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}$ | $\lim _{x\to c}f(x)=0^{+},\lim _{x\to c}g(x)=0\!$ | $\lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {g(x)}{1/\ln f(x)}}\!$ |
| $1^{\infty }$ | $\lim _{x\to c}f(x)=1,\ \lim _{x\to c}g(x)=\infty \!$ | $\lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {\ln f(x)}{1/g(x)}}\!$ |
| $\infty ^{0}$ | $\lim _{x\to c}f(x)=\infty ,\ \lim _{x\to c}g(x)=0\!$ | $\lim _{x\to c}f(x)^{g(x)}=\exp \lim _{x\to c}{\frac {g(x)}{1/\ln f(x)}}\!$ |

## 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 $\textstyle {\frac {f(t)}{g(t)}}$ as t → c. The tangent to the curve at the point $(g(t),f(t))$ is the velocity vector $(g'(t),f'(t))$ with slope $\textstyle {\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.

## Proof of L'Hôpital's rule
### 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 \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)\neq 0$.
The proof of a more general version of L'Hôpital's rule is given below.

### General proof

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 ${\mathcal {I}}$ be the open interval in the hypothesis with endpoint c. Considering that $g'(x)\neq 0$ on this interval and g is continuous, ${\mathcal {I}}$ can be chosen smaller so that g is nonzero on ${\mathcal {I}}$.
For each x in the interval, define $m(x)=\inf {\frac {f'(t)}{g'(t)}}$ and $M(x)=\sup {\frac {f'(t)}{g'(t)}}$ as $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 ${\mathcal {I}}$, Cauchy's mean value theorem ensures that for any two distinct points x and y in ${\mathcal {I}}$ there exists a $\xi$ between x and y such that ${\frac {f(x)-f(y)}{g(x)-g(y)}}={\frac {f'(\xi )}{g'(\xi )}}$. Consequently, $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\to c}f(x)=\lim _{x\to c}g(x)=0$
For any x in the interval ${\mathcal {I}}$, and point y between x and c,
    $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, ${\frac {f(y)}{g(x)}}$ and ${\frac {g(y)}{g(x)}}$ become zero, and so
    $m(x)\leq {\frac {f(x)}{g(x)}}\leq M(x).$
Case 2: $\lim _{x\to c}|g(x)|=\infty$
For every x in the interval ${\mathcal {I}}$, define $S_{x}=\{y\mid y{\text{ is between }}x{\text{ and }}c\}$. For every point y between x and c,
    $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 ${\frac {f(x)}{g(y)}}$ and ${\frac {g(x)}{g(y)}}$ become zero, and therefore
    $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\to c}m(x)=\lim _{x\to c}M(x)=\lim _{x\to c}{\frac {f'(x)}{g'(x)}}=L.$
and
    $\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\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\to c}{\frac {f(x)}{g(x)}}$ exists and is equal to L. In the case 2, and the squeeze theorem again asserts that $\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\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.

## 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 f is continuous at a, and that $f'(x)$ exists for all x in some open interval containing a, except perhaps for $x=a$. Suppose, moreover, that $\lim _{x\to a}f'(x)$ exists. Then $f'(a)$ also exists and
    $f'(a)=\lim _{x\to a}f'(x).$
In particular, f' is also continuous at a.
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 $h(x)=f(x)-f(a)$ and $g(x)=x-a$. The continuity of f at a tells us that $\lim _{x\to a}h(x)=0$. Moreover, $\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\to a}{\frac {f(x)-f(a)}{x-a}}=\lim _{x\to a}{\frac {h'(x)}{g'(x)}}=\lim _{x\to a}f'(x)$.