# .

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. However, it is believed that the rule was discovered by the Swiss mathematician Johann Bernoulli.

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:

If

$$\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 x ≠ c,

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 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$$

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.$$

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. 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 limit exist

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.$$

Examples

Here is an example involving the sinc function and the indeterminate form 0⁄0:

\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 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{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 0⁄0. 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 0⁄0:

$$\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.$$

Here is an example involving the impulse response of a raised-cosine filter and 0⁄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.

L'Hôpital's rule can be used to find the limiting form of a function. In the field of choice under uncertainty, the von Neumann-Morgenstern utility function

$$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.$$

Complications

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:

$$\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.$$

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.$$

Thus

$$\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 t → c is the slope of tangent to the curve at the point [0, 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)-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}.

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$$

and

$$\lim_{x\rightarrow c}(\liminf_{y\in S_x} \frac{f(y)}{g(y)})=\liminf_{x\rightarrow c}\frac{f(x)}{g(x)} and \lim_{x\rightarrow c}(\limsup_{y\in S_x} \frac{f(y)}{g(y)})=\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 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.

l'Hôpital controversy

References

Chatterjee, Dipak (2005), Real Analysis, PHI Learning Pvt. Ltd, ISBN 8-1203-2678-4
Krantz, Steven G. (2004), A handbook of real variables, Boston, MA: Birkhäuser Boston Inc., pp. xiv+201, ISBN 0-8176-4329-X, MR2015447
Lettenmeyer, F. (1936), "Über die sogenannte Hospitalsche Regel", Journal für die reine und angewandte Mathematik 174: 246−247
Taylor, A. E. (1952), "L'Hospital's rule", Amer. Math. Monthly 59: 20−24, ISSN 0002-9890, MR0044602
Wazewski, T. (1949), "Quelques démonstrations uniformes pour tous les cas du théorème de l'Hôpital. Généralisations" (in French), Prace Mat.-Fiz. 47: 117−128, MR0034430

Notes

^ O'Connor, John J.; Robertson, Edmund F. "De L'Hopital biography". The MacTutor History of Mathematics archive. Scotland: School of Mathematics and Statistics, University of St Andrews. Retrieved 21 December 2008.
^ l’Hospital, Analyse des infiniment petits… , pages 145-146: “Proposition I. Problême. Soit une ligne courbe AMD (AP = x, PM = y, AB = a [see Figure 130] ) telle que la valeur de l’appliquée y soit exprimée par une fraction, dont le numérateur & le dénominateur deviennent chacun zero lorsque x = a, c’est à dire lorsque le point P tombe sur le point donné B. On demande quelle doit être alors la valeur de l’appliquée BD. [Solution: ]…si l’on prend la difference du numérateur, & qu’on la divise par la difference du denominateur, apres avoir fait x = a = Ab ou AB, l’on aura la valeur cherchée de l’appliquée bd ou BD.” Translation : “Let there be a curve AMD (where AP = X, PM = y, AB = a) such that the value of the ordinate y is expressed by a fraction whose numerator and denominator each become zero when x = a; that is, when the point P falls on the given point B. One asks what shall then be the value of the ordinate BD. [Solution: ]… if one takes the differential of the numerator and if one divides it by the differential of the denominator, after having set x = a = Ab or AB, one will have the value [that was] sought of the ordinate bd or BD.”
^ Weisstein, Eric W., "L'Hospital's Rule" from MathWorld.
^ The functional analysis definition of the limit of a function does not require the existence of this connected interval.
^ Since g' is nonzero and g is continuous on the interval, it is impossible for g to be zero more than once on the interval. If it had two zeros, the mean value theorem would assert the existence of a point p in the interval between the zeros such that g' (p)=0. So either g is already nonzero on the interval, or else the interval can be reduced in size so as not to contain the single zero of g.