LHospitals rule

In calculus, l'Hôpital's rule pronounced: [lopiˈtal] (also sometimes spelled l'Hospital's rule with silent "s" and identical pronunciation), also called Bernoulli's rule, uses derivatives to help evaluate limits involving indeterminate forms. Application (or repeated application) of the rule often converts an indeterminate form to a determinate form, allowing easy evaluation of the limit. The rule is named after the 17th-century French mathematician Guillaume de l'Hôpital, who published the rule in his book Analyse des Infiniment Petits pour l'Intelligence des Lignes Courbes (literal translation: Analysis of the Infinitely Small for the Understanding of Curved Lines) (1696), the first textbook on differential calculus.[1][2] However, it is believed that the rule was discovered by the Swiss mathematician Johann Bernoulli.[3]

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

In its simplest form, l'Hôpital's rule states that for functions f and g which are differentiable on I \ {c} , where I is an open interval containing c:


\lim_{x \to c}f(x)=\lim_{x \to c}g(x)=0 \text{ or } \pm\infty, and
\lim_{x\to c}\frac{f'(x)}{g'(x)}   exists, and
g'(x)\neq 0 for all x in I with xc,


\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 and/or converts it to a determinate form, allowing the limit to be evaluated more easily.

General form

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). The real valued functions f and g are assumed to be differentiable on an open interval with endpoint c, and additionally g'(x)\neq 0 on the interval. It is also assumed that \lim_{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, and not to situations in which that ratio fluctuates permanently as x gets closer and closer to c.

If either

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


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


\lim_{x\to c}{\frac{f(x)}{g(x)}}=L.

The limits may also be one-sided limits. 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\to c}{|g(x)|} = \infty.

The "g'(x)\neq 0" hypothesis appears most commonly in the literature. Some authors sidestep the hypothesis by adding other hypotheses elsewhere. One method used implicitly in (Chatterjee 2005, p. 291) is to define the limit of a function with the additional requirement that the limiting function is defined everywhere on a connected interval with endpoint c.[4] Another method appearing in (Krantz 2004, p.79) is to require that both f and g are differentiable everywhere on an interval containing c.

Requirement that the limit exists

The requirement that the limit

\lim_{x\to c}\frac{f'(x)}{g'(x)}

exist is essential. Without this condition, it may be the case that f \, ' and/or g\,' exhibits undampened oscillations as x approaches c. If this happens, then l'Hôpital's rule does not apply. For example, if f(x) = x + \sin(x) and g(x) = x, then

\lim_{x\to\infty}\frac{f'(x)}{g'(x)}=\lim_{x\to\infty}\frac{1+\cos x}{1};

this expression does not approach a limit, since the cosine function oscillates between 1 and −1. But working with the original functions, \lim_{x\to\infty}\frac{f(x)}{g(x)} can be shown to exist:

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


  • Here is an example involving the sinc function and the indeterminate form 00:

\begin{align} \lim_{x \to 0} \operatorname{sinc}(x) & = \lim_{x \to 0} \frac{\sin\pi x}{\pi x} \\ & = \lim_{y \to 0} \frac{\sin y}{y} \\ & = \lim_{y \to 0} \frac{\cos y}{1} \\ & = 1. \end{align}

Alternatively, just observe that the limit is the definition of the derivative of the sine function at zero.
  • This is a more elaborate example involving 00. 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{align} \lim_{x\to 0}{\frac{2\sin x-\sin 2x}{x-\sin x}} & =\lim_{x\to 0}{\frac{2\cos x -2\cos 2x}{1-\cos x}} \\ & = \lim_{x\to 0}{\frac{-2\sin x +4\sin 2x}{\sin x}} \\ & = \lim_{x\to 0}{\frac{-2\cos x +8\cos 2x}{\cos x}} \\ & ={\frac{-2 +8}{1}} \\ & =6. \end{align}

  • This example involves 00. Suppose that b > 0. Then
\lim_{x\to 0} {\frac{b^x - 1}{x}}=\lim_{x \to 0}{\frac{b^x \ln b}{1}}=\ln b \lim_{x \to 0}{b^x}=\ln b.
  • Here is another example involving 00:
\lim_{x\to 0}{\frac{e^x-1-x}{x^2}}

=\lim_{x\to 0}{\frac{e^x-1}{2x}} =\lim_{x\to 0}{\frac{e^x}{2}}={\frac{1}{2}}.

  • This example involves . Assume n is a positive integer. Then
\lim_{x\to\infty} x^n e^{-x}

=\lim_{x\to\infty}{\frac{x^n}{e^x}} =\lim_{x\to\infty}{\frac{nx^{n-1}}{e^x}} =n\lim_{x\to\infty}{\frac{x^{n-1}}{e^x}}.

Repeatedly apply l'Hôpital's rule until the exponent is zero to conclude that the limit is zero.
  • Here is another example involving :
\lim_{x\to 0^+} x \ln x =\lim_{x\to 0^+}{\frac{\ln x}{1/x}}

=\lim_{x\to 0^+}{\frac{1/x}{-1/x^2}} =\lim_{x\to 0^+} -x= 0.

\begin{align} \lim_{t\to 1/2} \operatorname{sinc}(t) \frac{\cos \pi t}{1 - (2t)^2} & = \operatorname{sinc}(1/2) \lim_{t\to 1/2} \frac{\cos \pi t}{1 - (2 t)^2} \\ & = \frac{2}{\pi} \lim_{t\to 1/2} \frac{-\pi \sin \pi t}{-8 t} \\ & = \frac{2}{\pi} \cdot \frac{\pi}{4} \\ & = \frac{1}{2}. \end{align}

  • One can also use l'Hôpital's rule to prove the following theorem. If f ′′ is continuous at x, then

\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} \\ & = f(x). \end{align}

  • Sometimes l'Hôpital's rule is invoked in a tricky way: suppose f(x) + f ′(x) converges as x → ∞. It follows:
\lim_{x \to \infty} f(x) = \lim_{x \to \infty} {e^x f(x) \over e^x} = \lim_{x \to \infty} {e^x (f(x) + f'(x)) \over e^x} = \lim_{x \to \infty} (f(x) + f'(x))
and so, if  \lim_{x \to \infty} f(x)  exists and is finite, then  \ \lim_{x \to \infty} f'(x) = 0.
Note that the above proof assumes that exf(x) converges to positive or negative infinity as x → ∞, allowing us to apply L'Hôpital's rule. The results however still hold even though the proof is not entirely complete.
u(x) = \frac{x^{1-\rho}-1}{1-\rho}
with \rho >0, defined over x>0, is said to have constant relative risk aversion equal to \rho . But unit relative risk aversion cannot be expressed directly with this expression, since as \rho approaches 1 the numerator and denominator both approach zero. However, a single application of l'Hôpital's rule allows this case to be expressed as
\lim_{\rho \to 1} \frac{x^{1-\rho}-1}{1-\rho} = \lim_{\rho \to 1} \frac{-x^{1-\rho}\ln x}{-1} = \ln x.


Sometimes l'Hôpital's rule does not lead to an answer in a finite number of steps unless a transformation of variables is 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}} = \lim_{x \to \infty} \frac{e^x-e^{-x}}{e^x+e^{-x}} = \lim_{x \to \infty} \frac{e^x+e^{-x}}{e^x-e^{-x}} = \dots .
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}} = \lim_{y \to \infty} \frac{1-y^{-2}}{1+y^{-2}} = \frac{1}{1} = 1.
  • An arbitrarily large number of applications may never lead to an answer even without repeating:
\lim_{x \to \infty} \frac{x^{1/2}+x^{-1/2}}{x^{1/2}-x^{-1/2}} = \lim_{x \to \infty} \frac{\tfrac{1}{2}x^{-1/2}-\tfrac{1}{2}x^{-3/2}}{\tfrac{1}{2}x^{-1/2}+\tfrac{1}{2}x^{-3/2}} = \lim_{x \to \infty} \frac{-\tfrac{1}{4}x^{-3/2}+\tfrac{3}{4}x^{-5/2}}{-\tfrac{1}{4}x^{-3/2}-\tfrac{3}{4}x^{-5/2}} \dots .
This situation too can be dealt with by a transformation of variables, in this case y = x^{1/2}:
\lim_{x \to \infty} \frac{x^{1/2}+x^{-1/2}}{x^{1/2}-x^{-1/2}} = \lim_{y \to \infty} \frac{y+y^{-1}}{y-y^{-1}} = \lim_{y \to \infty} \frac{1-y^{-2}}{1+y^{-2}} = \frac{1}{1} = 1.

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\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 n xn - 1 as expected. However, differentiating the numerator required 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.

Other indeterminate forms

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:

\begin{align} \lim_{x \to 1} \left( \frac{x}{x-1} - \frac{1}{\ln x} \right) & = \lim_{x \to 1} \frac{x \ln x - x + 1}{(x-1) \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 \ln x}{x - 1 + x \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{align}

where l'Hôpital's rule was applied in going from (1) to (2) and then again in 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 \to 0^+} x^x = \lim_{x \to 0^+} e^{\ln x^x} = \lim_{x \to 0^+} e^{x \ln x} = e^{\lim_{x \to 0^+} (x \ln x)}.

It is valid to move the limit inside the exponential function because the exponential function is continuous. Now the exponent x has been "moved down". The limit limx→0+ (x 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 \to 0^+} x \ln x = 0.


\lim_{x \to 0^+} x^x = e^0 = 1.

Other methods of evaluating limits

Although l'Hôpital's rule is a powerful way of evaluating otherwise hard-to-evaluate limits, it is not always the easiest way. Consider

\lim_{|x| \to \infty} x \sin \frac{1}{x}.

This limit may be evaluated using l'Hôpital's rule:

\begin{align} \lim_{|x| \to \infty} x \sin \frac{1}{x} & = \lim_{|x| \to \infty} \frac{\sin \frac{1}{x}}{1/x} \\ & = \lim_{|x| \to \infty} \frac{-x^{-2}\cos\frac{1}{x}}{-x^{-2}} \\ & = \lim_{|x| \to \infty} \cos\frac{1}{x} \\ & = \cos{\left(\lim_{|x| \to \infty} \frac{1}{x} \right)} \\ & = 1. \end{align}

It is valid to move the limit inside the cosine function because the cosine function is continuous.

But a simpler way to evaluate this limit is to use a substitution. y = 1/x. As |x| approaches infinity, y approaches zero. So,

\lim_{|x| \to \infty} x \sin \frac{1}{x} = \lim_{y \to 0} \frac{\sin y}{y} = 1.

The final limit may be evaluated using l'Hôpital's rule or by noting that it is the definition of the derivative of the sine function at zero.

Still another way to evaluate this limit is to use a Taylor series expansion:

\begin{align} \lim_{|x| \to \infty} x \sin \frac{1}{x} & = \lim_{|x| \to \infty} x \left( \frac{1}{x} - \frac{1}{3!\, x^3} + \frac{1}{5!\, x^5} - \cdots \right) \\ & = \lim_{|x| \to \infty} 1 - \frac{1}{3!\, x^2} + \frac{1}{5!\, x^4} - \cdots \\ & = 1 + \lim_{|x| \to \infty} \frac{1}{x}\left(-\frac{1}{3!\, x} + \frac{1}{5!\, x^3} - \cdots \right). \end{align}

For |x| ≥ 1, the expression in parentheses is bounded, so the limit in the last line is zero.

Geometric interpretation

Consider the curve in the plane whose x-coordinate is given by g(t) and whose y-coordinate is given by f(t), i.e.

t\mapsto [g(t),f(t)]. \,

Suppose f(c) = g(c) = 0. The limit of the ratio f(t)/g(t) as tc is the slope of tangent to the curve at the point [c, 0]. The tangent to the curve at the point t is given by [g′(t), f ′(t)]. L'Hôpital's rule then states that the slope of the tangent at 0 is the limit of the slopes of tangents at the points approaching zero.

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. It is not a proof of the general l'Hôpital's rule because it is stricter in its definition, requiring both 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\,, and that g'(c)\neq 0. Then

\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_{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)}.

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 and ±∞/±∞ 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}.[5]

For each x in the interval, define m(x)=\inf\frac{f'(\xi)}{g'(\xi)} and M(x)=\sup\frac{f'(\xi)}{g'(\xi)} as \xi 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\rightarrow c}f(x)=\lim_{x\rightarrow 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\rightarrow c}|g(x)|=\infty

For any x in the interval \mathcal{I}, define S_x=\{y\mid y \text{ is between } x \text{ and } c\}. For any point y between x and c, we have

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.

We need the facts that

\lim_{x \rightarrow c}m(x)=\lim_{x \rightarrow c}M(x)=\lim_{x \rightarrow c}\frac{f'(x)}{g'(x)}=L

[6] and

\lim_{x\rightarrow c}\left(\liminf_{y\in S_x} \frac{f(y)}{g(y)}\right)=\liminf_{x\rightarrow c}\frac{f(x)}{g(x)} and \lim_{x\rightarrow c}\left(\limsup_{y\in S_x} \frac{f(y)}{g(y)}\right)=\limsup_{x\rightarrow c}\frac{f(x)}{g(x)}.

In case 1, the Squeeze theorem, establishes that \lim_{x\rightarrow 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\rightarrow c}\frac{f(x)}{g(x)}=\limsup_{x\rightarrow c}\frac{f(x)}{g(x)}=L, and so the limit \lim_{x\rightarrow c}\frac{f(x)}{g(x)} exists and is equal to L. This is the result that was to be proven.

Note: In case 2 we did not use the assumption that f(x) diverges to infinity 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 (see proof at http://www.imomath.com/index.php?options=686).

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) exists for all x in some interval containing a, except perhaps for x = a. Suppose, moreover, that \lim_{x\rightarrow a}f'(x) exists. Then f'(a) also exists, and

f'(a) = \lim_{x\rightarrow a}f'(x).


It suffices to 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\rightarrow a}h(x) = 0; obviously also \lim_{x\rightarrow a}g(x) = 0, since a polynomial function is always continuous everywhere. Applying l'Hopital's rule we conclude that f'(a) := \lim_{x\rightarrow a} \frac{f(x) - f(a)}{x - a} = \lim_{x\rightarrow a} \frac{h(x)}{g(x)} = \lim_{x\rightarrow a}f'(x).

See also



External links

  • l'Hôpital's rule at imomath.com
  • l'Hôpital's rule at PlanetMath
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.