Example application of l'Hôpital's rule tof(x) =sin(x) andg(x) =−0.5x: the functionh(x) =f(x)/g(x) is undefined atx = 0, but can be completed to a continuous function on all ofR by definingh(0) =f′(0)/g′(0) = −2.
L'Hôpital's rule (/ˌloʊpiːˈtɑːl/,loh-pee-TAHL), also known asBernoulli's rule, is a mathematical theorem that allows evaluatinglimits ofindeterminate forms usingderivatives. 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 mathematicianGuillaume 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 mathematicianJohann Bernoulli.
L'Hôpital's rule states that for functionsf andg which are defined on an openintervalI anddifferentiable on for a (possibly infinite)accumulation pointc ofI, if and for allx in, and exists, then
The differentiation of the numerator and denominator often simplifies the quotient or converts it to a limit that can be directly evaluated bycontinuity.
The general form of l'Hôpital's rule covers many cases. Letc andL beextended real numbers: real numbers, as well as positive and negative infinity. LetI be anopen interval containingc (for a two-sided limit) or an open interval with endpointc (for aone-sided limit, or alimit at infinity ifc is infinite).
Assumption 1: On, the real-valued functionsf andg aredifferentiable with.
Assumption 2:, a finite or infinite limit.
If either orthenAlthough we have writtenx →c throughout, the limits may also be one-sided limits (x →c+ orx →c−), whenc is a finite endpoint ofI.
In the second case b), the hypothesis thatfdiverges to infinity is not necessary; in fact, it is sufficient that
The hypothesis that appears most commonly in the literature, but some authors sidestep this hypothesis by adding other hypotheses which imply. For example,[4] one may require in the definition of the limit that the function must be defined everywhere on an interval.[c] Another method[5] is to require that bothf andg be differentiable everywhere on an interval containingc.
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. The fact that is an open interval is grandfathered in from the hypothesis of theCauchy's mean value theorem. The notable exception of the possibility of the functions being not differentiable at exists because l'Hôpital's rule only requires the derivative to exist as the function approaches; the derivative does not need to be taken at.
For example, let ,, and. In this case, is not differentiable at. However, since is differentiable everywhere except, then still exists. Thus, since
The necessity of the condition that near can be seen by the following counterexample due toOtto Stolz.[6] Let and Then there is no limit for as However,
which tends to 0 as, although it is undefined at infinitely many points. Further examples of this type were found byRalph P. Boas Jr.[7]
The requirement that the limit exists is essential; if it does not exist, the original limit may nevertheless exist. Indeed, as approaches, the functions or may exhibit many oscillations of small amplitude but steep slope, which do not affect but do prevent the convergence of.
For example, if, and, thenwhich does not approach a limit since cosine oscillates infinitely between1 and−1. But the ratio of the original functions does approach a limit, since the amplitude of the oscillations of becomes small relative to:
In a case such as this, all that can be concluded is that
so that if the limit of exists, then it must lie between the inferior and superior limits of . In the example, 1 does indeed lie between 0 and 2.)
Note also that by thecontrapositive form of the Rule, if does not exist, then also does not exist.
In the following computations, each application of l'Hôpital's rule is indicated by the symbol.
Here is a basic example involving the exponential function, which involves the indeterminate form0/0 atx = 0:
This is a more elaborate example involving0/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 (ifn is an integer) or negative (ifn is fractional) to conclude that the limit is zero.
Here is an example involving the indeterminate form0 · ∞ (see below), which is rewritten as the form∞/∞:
Here is an example involving themortgage repayment formula and0/0. LetP be the principal (loan amount),r the interest rate per period andn the number of periods. Whenr 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. Iff is twice-differentiable in a neighborhood ofx and its second derivative is continuous on this neighborhood, then
Sometimes l'Hôpital's rule is invoked in a tricky way: suppose converges asx → ∞ and that converges to positive or negative infinity. Then:and so, exists and (This result remains true without the added hypothesis that converges to positive or negative infinity, but the justification is then incomplete.)
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: This situation can be dealt with by substituting and noting thaty goes to infinity asx 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:[8]
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 logical fallacy is to use L'Hôpital's rule to prove the value of a derivative by computing the limit of adifference quotient. Since applying l'Hôpital requires knowing the relevant derivatives, this amounts tocircular reasoning orbegging the question, assuming what is to be proved. For example, consider the proof of the derivative formula forpowers ofx:
Applying L'Hôpital's rule and finding the derivatives with respect toh yieldsnxn−1 as expected, but this computation requires the use of the very formula that is being proven. Similarly, to prove, applying L'Hôpital requires knowing the derivative of at, which amounts to calculating in the first place; a valid proof requires a different method such as thesqueeze theorem.
Other indeterminate forms, such as1∞,00,∞0,0 · ∞, and∞ − ∞, can sometimes be evaluated using L'Hôpital's rule. We again indicate applications of L'Hopital's rule by.
For example, to evaluate a limit involving∞ − ∞, convert the difference of two functions to a quotient:
L'Hôpital's rule can be used on indeterminate forms involvingexponents by usinglogarithms to "move the exponent down". Here is an example involving the indeterminate form00:
It is valid to move the limit inside theexponential function because this function iscontinuous. Now the exponent has been "moved down". The limit is of the indeterminate form0 · ∞ dealt with in an example above: L'Hôpital may be used to determine that
Thus
The following table lists the most common indeterminate forms and the transformations which precede applying l'Hôpital's rule:
Consider theparametric curve in thexy-plane with coordinates given by the continuous functions and, thelocus of points, and suppose. The slope of the tangent to the curve at is the limit of the ratio ast →c. The tangent to the curve at the point is thevelocity vector with slope. 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.
The proof of L'Hôpital's rule is simple in the case wheref andg arecontinuously differentiable at the pointc 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 andcosine,exponential functions), so this special case covers most applications.
Suppose thatf andg are continuously differentiable at a real numberc, that, and that. Then
This follows from the difference quotient definition of the derivative. The last equality follows from the continuity of the derivatives atc. 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.
The following proof is due toTaylor (1952), where a unified proof for the and indeterminate forms is given. Taylor notes that different proofs may be found inLettenmeyer (1936) andWazewski (1949).
Letf andg be functions satisfying the hypotheses in theGeneral form section. Let be the open interval in the hypothesis with endpointc. Considering that on this interval andg is continuous, can be chosen smaller so thatg is nonzero on.[d]
For eachx in the interval, define and as ranges over all values betweenx andc. (The symbols inf and sup denote theinfimum andsupremum.)
From the differentiability off andg on,Cauchy's mean value theorem ensures that for any two distinct pointsx andy in there exists a betweenx andy such that. Consequently, for all choices of distinctx andy in the interval. The valueg(x)-g(y) is always nonzero for distinctx andy in the interval, for if it was not, themean value theorem would imply the existence of ap betweenx andy such thatg'(p)=0.
The definition ofm(x) andM(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) andM(x) will establish bounds on the ratiof/g.
Case 1:
For anyx in the interval, and pointy betweenx andc,
and therefore asy approachesc, and become zero, and so
Case 2:
For everyx in the interval, define. For every pointy betweenx andc,
Asy approachesc, both and become zero, and therefore
Thelimit superior andlimit inferior are necessary since the existence of the limit off/g has not yet been established.
In case 1, thesqueeze theorem establishes that exists and is equal toL. In the case 2, and the squeeze theorem again asserts that, and so the limit exists and is equal toL. This is the result that was to be proven.
In case 2 the assumption thatf(x) diverges to infinity was not used within the proof. This means that if |g(x)| diverges to infinity asx approachesc and bothf andg satisfy the hypotheses of L'Hôpital's rule, then no additional assumption is needed about the limit off(x): It could even be the case that the limit off(x) does not exist. In this case, L'Hopital's theorem is actually a consequence of Cesàro–Stolz.[9]
In the case when |g(x)| diverges to infinity asx approachesc andf(x) converges to a finite limit atc, then L'Hôpital's rule would be applicable, but not absolutely necessary, since basic limit calculus will show that the limit off(x)/g(x) asx approachesc must be zero.
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 thatf is continuous ata, and that exists for allx in some open interval containinga, except perhaps for. Suppose, moreover, that exists. Then also exists and
In particular,f' is also continuous ata.
Thus, if a function is not continuously differentiable near a point, the derivative must have an essential discontinuity at that point.
Consider the functions and. The continuity off ata tells us that. Moreover, since a polynomial function is always continuous everywhere. Applying L'Hopital's rule shows that.
^In the 17th and 18th centuries, the name was commonly spelled "l'Hospital", and he himself spelled his name that way. Since then, French spellings havechanged: the silent 's' has beenremoved and replaced with acircumflex over the preceding vowel.
^"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.
^Sinceg' is nonzero andg is continuous on the interval, it is impossible forg to be zero more than once on the interval. If it had two zeros, themean value theorem would assert the existence of a pointp in the interval between the zeros such thatg'(p) = 0. So eitherg is already nonzero on the interval, or else the interval can be reduced in size so as not to contain the single zero ofg.
^The limits and both exist as they feature nondecreasing and nonincreasing functions ofx, respectively.Consider a sequence. Then, as the inequality holds for eachi; this yields the inequalitiesThe next step is to show. Fix a sequence of numbers such that, and a sequence. For eachi, choose such that, by the definition of. Thus as desired.The argument that is similar.
^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. Retrieved21 December 2008.
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,1936 (174):246–247,doi:10.1515/crll.1936.174.246,S2CID199546754
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