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.
In mathematics, more specifically calculus, L'Hôpital's rule or L'Hospital's rule (French:[lopital]) is a theorem which provides a technique to evaluate limits of indeterminate forms. 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 FrenchmathematicianGuillaume de l'Hôpital. Although the rule is often attributed to 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 differentiable on an open intervalI except possibly at a point c contained in I, if for all x in I with x ≠ c, and exists, then
The differentiation of the numerator and denominator often simplifies the quotient or converts it to a limit that can be evaluated directly.
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 on I except possibly at c. It is also assumed that 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
or
then
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 fdiverges 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
The hypothesis that appears most commonly in the literature, but some authors sidestep this hypothesis by adding other hypotheses elsewhere. One method[5] 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.[c] Another method[6] is to require that both f and g be differentiable everywhere on an interval containing c.
Examples
Here is a basic example involving the exponential function, which involves the indeterminate form 0/0 at x = 0:
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:
Here is an example involving ∞/∞:
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 ∞/∞:
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 (since only principal is being repaid); this is consistent with the formula for non-zero interest rates:
One can also use L'Hôpital's rule to prove the following theorem. If f is twice-differentiable in a neighborhood of x, then
Sometimes L'Hôpital's rule is invoked in a tricky way: suppose f(x) + f′(x) converges as x → ∞ and that converges to positive or negative infinity. Then:
and so, exists and
The result remains true without the added hypothesis that converges to positive or negative infinity, but the justification is then incomplete.
Cases where theorem cannot be applied
All four conditions for L'Hôpital's rule are necessary:
If one of the above conditions is not satisfied, L'Hôpital's rule is not always valid, so it cannot be applied.
Form is not indeterminate
The necessity of can be seen by considering the counterexample where and and .
Condition is not satisfied since and . This means that the form is not indeterminate.
Conditions and are satisfied by and . Condition is also satisfied with .
But, L'Hôpital's rule fails in this case, because .
Derivative of denominator is zero
The necessity of the condition that near can be seen by the following counterexample due to Otto Stolz.[7] Let and Then there is no limit for as However,
which tends to 0 as . Further examples of this type were found by Ralph P. Boas Jr.[8]
Limit of derivatives does not exist
The requirement that the limit
exists is necessary. Without this condition, or may exhibit undamped oscillations as approaches , in which case L'Hôpital's rule does not apply. For example, if , and , then
this expression does not approach a limit as goes to , since the cosine function oscillates between 1 and −1. But working with the original functions, can be shown to exist:
In a case such as this, all that can be concluded is that
so that if the limit of f/g exists, then it must lie between the inferior and superior limits of f′/g′. (In the example above, this is true, since 1 indeed lies between 0 and 2.)
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:
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:
It is valid to move the limit inside the exponential function because the exponential function is continuous. Now the exponent has been "moved down". The limit is of the indeterminate form 0 · ∞, but as shown in an example above, l'Hôpital's rule may be used to determine that
Thus
Complications
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:
Two applications can lead to a return to the original expression that was to be evaluated:
This situation can be dealt with by substituting 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:
Alternatively, the numerator and denominator can both be multiplied by at which point L'Hôpital's rule can immediately be applied successfully:[9]
An arbitrarily large number of applications may never lead to an answer even without repeating:
This situation too can be dealt with by a transformation of variables, in this case :
Again, an alternative approach is to multiply numerator and denominator by before applying L'Hôpital's rule:
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:
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.
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), with both functions continuous, i.e., the locus of points of the form [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 the tangent to the curve at the point [g(c), f(c)] = [0,0]. The tangent to the curve at the point [g(t), f(t)] is given by [g′(t), f′(t)]. 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.
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 , and that . Then
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 .
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 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 be the open interval in the hypothesis with endpoint c. Considering that on this interval and g is continuous, can be chosen smaller so that g is nonzero on .[d]
For each x in the interval, define and as 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 , Cauchy's mean value theorem ensures that for any two distinct points x and y in there exists a between x and y such that . Consequently, for all choices of distinct x and y in the interval. The value 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 .
The definition of will result in an extended real number, and so it is possible for them to take on the values . In the following two cases, will establish bounds on the ratio .
Case 1:
For any x in the interval , and point y between x and c,
and therefore as y approaches c, and become zero, and so
Case 2:
For every x in the interval , define . For every point y between x and c,
As y approaches c, both and become zero, and therefore
The limit superior and limit inferior are necessary since the existence of the limit of f/g has not yet been established.
In case 1, the squeeze theorem establishes that exists and is equal to L. In the case 2, and the squeeze theorem again asserts that , and so the limit 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.[10]
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.
Corollaries
Criterion for differentiability
A simple but very useful consequence of L'Hopital's rule is a well-known criterion for differentiability. It states that, for a function , if:
• is continuous at , in other words, ;
• exists for all in some open interval containing , except possibly for ; and
• exists ;
then also exists, and
.
In other words, is also continuous at .
Proof
Consider the functions and . The continuity of f at a tells us that . Moreover, since a polynomial function is always continuous everywhere. Applying L'Hopital's rule shows that .
Existence of ratio of derivatives
L'Hôpital's rule can also be extended to establish the existence and value of .
Two functions and are said to be asymptotic to each other at a point , denoted as as , if and only if (de Bruijn 1981, §1.4) harv error: no target: CITEREFde_Bruijn1981 (help)
Both the log-gamma function and satisfy the criteria for the corollary above. Therefore, the derivative of the log-gamma function, otherwise known as the digamma function, is asymptotic to
^In the 17th and 18th centuries, the name was commonly spelled "l'Hospital", and he himself spelled his name that way. However, French spellings have been altered: the silent 's' has been removed and replaced with the circumflex over the preceding vowel. The former spelling is still used in English where there is no circumflex.
^"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."[2]
^The functional analysis definition of the limit of a function does not require the existence of such an interval.
^Since g is nonzero and 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 g in the interval between the zeros such that . 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.
^
The limits and both exist as they feature nondecreasing and nonincreasing functions of x, respectively.
Consider a sequence . Then , as the inequality holds for each i; this yields the inequalities
The next step is to show . Indeed, fix a sequence of numbers such that , and a sequence . For each i, choose such that , by the definition of . Thus as desired.
The argument that is similar.
References
^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.
Chatterjee, Dipak (2005), Real Analysis, PHI Learning Pvt. Ltd, ISBN81-203-2678-4
Krantz, Steven G. (2004), A handbook of real variables. With applications to differential equations and Fourier analysis, Boston, MA: Birkhäuser Boston Inc., pp. xiv+201, doi:10.1007/978-0-8176-8128-9, ISBN0-8176-4329-X, MR2015447
Lettenmeyer, F. (1936), "Über die sogenannte Hospitalsche Regel", Journal für die reine und angewandte Mathematik, 174: 246–247, doi:10.1515/crll.1936.174.246
Wazewski, T. (1949), "Quelques démonstrations uniformes pour tous les cas du théorème de l'Hôpital. Généralisations", Prace Mat.-Fiz. (in French), 47: 117–128, MR0034430
Brown, James Ward (2009), Complex Variables and Applications, McGraw-Hill Higher Education, ISBN978-0-07-305194-9