Definitions

# L'Hôpital's rule

In calculus, l'Hôpital's rule (also called Bernoulli's rule; often misspelled l'Hospital) uses derivatives to help compute limits with indeterminate forms. Application (or repeated application) of the rule often converts an indeterminate form to a determinate form, allowing easy computation 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 l'Analyse des Infiniment Petits pour l'Intelligence des Lignes Courbes (literal translation: Analysis of the Infinitely Small to Understand Curved Lines) (1696), the first book about differential calculus.

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

## Overview

### Introduction

In simple cases, l'Hôpital's rule states that for functions f(x) and g(x), if:

$lim_\left\{x to c\right\}f\left(x\right)=lim_\left\{x to c\right\}g\left(x\right)=0$,

or:

$lim_\left\{x to c\right\}f\left(x\right)=pmlim_\left\{x to c\right\}g\left(x\right)=pminfty$,

then:

$lim_\left\{xto c\right\}frac\left\{f\left(x\right)\right\}\left\{g\left(x\right)\right\} = lim_\left\{xto c\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\}$
where the prime (') denotes the derivative.

Among other requirements, for this rule to hold, the limit $lim_\left\{xto c\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\}$ must exist. Other requirements are detailed below, in the formal statement.

### Formal statement

When determining the limit of a quotient $f\left(x\right)/g\left(x\right)$ when both f and g approach 0, or g approaches infinity, l'Hôpital's rule states that if $f\text{'}\left(x\right)/g\text{'}\left(x\right)$ converges, then $f\left(x\right)/g\left(x\right)$ converges, and to the same limit. This differentiation often simplifies the quotient and/or converts it to a determinate form, allowing the limit to be determined more easily.

Symbolically let $mathbb\left\{R\right\}^*=mathbb\left\{R\right\}cup\left\{pminfty\right\}$. Suppose that $c in mathbb\left\{R\right\}^*$, that


lim_{xto c}{f'(x) over g'(x)} = A, A in mathbb{R}^* and that $g\text{'}\left(x\right) neq 0$ for all $xne c$ in an open interval (a,b) containing c (or with $b=infty$ if $c=infty$ or with $a=-infty$ if $c=-infty$). If

begin{cases} lim_{xto c}{f(x)} = lim_{xto c}g(x) = 0 ; mbox{or} lim_{xto c}
= lim_{xto c}{|g(x) = infty > end{cases} then
$lim_\left\{xto c\right\}\left\{f\left(x\right)over g\left(x\right)\right\}=A.$

l'Hôpital's rule also holds for one-sided limits.

Basic indeterminate forms (all others reduce to these):

$\left\{0over 0\right\} , ,qquad \left\{inftyoverinfty\right\}$

Other indeterminate forms:

$\left\{infty^0qquad 1^inftyqquad 0cdotinftyqquad 0^0qquadinfty - inftyqquad\right\}$

Note the requirement that the limit $lim_\left\{xto c\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\}$ exists. Differentiation of limits of this form can sometimes lead to limits that do not exist. In that case, l'Hôpital's rule cannot be applied. For instance if $f\left(x\right)=x+sin\left(x\right)$ and $g\left(x\right)=x$, then

$lim_\left\{xtoinfty\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\}=lim_\left\{xtoinfty\right\}\left(1+cos\left(x\right)\right)$

does not exist, whereas

$lim_\left\{xtoinfty\right\}frac\left\{f\left(x\right)\right\}\left\{g\left(x\right)\right\}=1.$

In practice one often uses the rule and, if the resulting limit exists, concludes that it was legitimate to use l'Hôpital's rule.

Note also the requirement that the derivative of g not vanish throughout an entire interval containing the point c. Without such a hypothesis, the conclusion is false. Thus one must not use l'Hôpital's rule if the denominator oscillates wildly near the point where one is trying to find the limit. For example if $f\left(x\right)=x+cos\left(x\right)sin\left(x\right)$ and $g\left(x\right)=e^\left\{sin\left(x\right)\right\}\left[x+cos\left(x\right)sin\left(x\right)\right]$, then

 $lim_\left\{xtoinfty\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\}$ $=lim_\left\{xtoinfty\right\}frac\left\{2cos^\left\{2\right\}\left\{x\right\}\right\}\left\{e^\left\{sin\left(x\right)\right\}cos\left(x\right)\left(x+sin\left(x\right)cos\left(x\right)+2cos\left(x\right)\right)\right\}$ $= lim_\left\{xtoinfty\right\}frac\left\{2cos\left(x\right)\right\}\left\{e^\left\{sin\left(x\right)\right\}\left(x+sin\left(x\right)cos\left(x\right)+2cos\left(x\right)\right)\right\}=0$

whereas

$lim_\left\{xtoinfty\right\}frac\left\{f\left(x\right)\right\}\left\{g\left(x\right)\right\}=lim_\left\{xtoinfty\right\}frac\left\{1\right\}\left\{e^\left\{sin\left(x\right)\right\}\right\}$

does not exist since $frac\left\{1\right\}\left\{e^\left\{sin\left(x\right)\right\}\right\}$ fluctuates between $e^\left\{-1\right\}$ and e.

## Examples

• Here is an example involving the sinc function, which has the form 0/0:

 $lim_\left\{x to 0\right\} mathrm\left\{sinc\right\}\left(x\right),$ $= lim_\left\{x to 0\right\} frac\left\{sin pi x\right\}\left\{pi x\right\},$ $= lim_\left\{x to 0\right\} frac\left\{sin x\right\}\left\{x\right\},$ $= lim_\left\{x to 0\right\} frac\left\{cos x\right\}\left\{1\right\} = frac\left\{1\right\}\left\{1\right\} = 1,$

However, it is simpler to observe that this limit is just the definition of the derivative of sin(x) at x = 0.

In fact this particular limit is needed in the most usual proof that the derivative of sin(x) is cos(x), but we cannot use l'Hôpital's rule to do this, as it would produce a circular argument.

• Here is a more elaborate example involving the indeterminate form 0/0. Applying the rule a single time still results in an indeterminate form. In this case, the limit may be evaluated by applying l'Hôpital's rule three times:

$lim_\left\{xto 0\right\} \left\{2sin x-sin 2x over x-sin x\right\}$ $=lim_\left\{xto 0\right\}\left\{2cos x-2cos 2x over 1-cos x\right\}$
$=lim_\left\{xto 0\right\}\left\{-2sin x +4sin 2x over sin x\right\}$
$=lim_\left\{xto 0\right\}\left\{-2cos x +8cos 2x over cos x\right\}$
$=\left\{-2cos 0 +8cos 0 over cos 0\right\}$
$=6,$

• Here is a classic case involving 0/0. Suppose $r > 0$, then

$lim_\left\{xto 0\right\} \left\{r^x - 1 over x\right\}$ $=lim_\left\{x to 0\right\}\left\{frac\left\{d\right\}\left\{dx\right\}r^x over frac\left\{d\right\}\left\{dx\right\}x\right\}$
$=lim_\left\{x to 0\right\}\left\{r^x ln r over 1\right\}$
$=ln r lim_\left\{x to 0\right\}\left\{r^x\right\}$
$=ln r!$

• Here is another case involving 0/0:

$lim_\left\{xto 0\right\}\left\{e^x-1-x over x^2\right\}$
=lim_{xto 0}{e^x-1 over 2x}

# lim_{xto 0}{e^x over 2}

{1 over 2}

• Here is a case of ∞/∞:


lim_{x to infty} frac{sqrt{x}}{ln(x)} = lim_{x to infty} frac{ 1/(2 sqrt{x}) }{1/x} = lim_{x to infty} frac{sqrt{x}}{2}
` = infty`

• This one involves ∞/∞. Assume n is a positive integer.

$lim_\left\{xtoinfty\right\} x^n e^\left\{-x\right\}$
=lim_{xtoinfty}{x^n over e^x} =lim_{xtoinfty}{nx^{n-1} over e^x} =nlim_{xtoinfty}{x^{n-1} over e^x}

Iterate the above until the exponent is 0. Then one sees that the limit is 0.

• This one also involves ∞/∞:

$lim_\left\{xto 0+\right\} \left(x ln x\right) =lim_\left\{xto 0+\right\}\left\{ln x over 1/x\right\}$
=lim_{xto 0+}{1/x over -1/x^2}

# lim_{xto 0+} -x

0

• The previous result can be used in the following case of the indeterminate form $0^0$: To compute $lim_\left\{xto 0\right\} x^x$, we rewrite $x^x$ as $e^\left\{x, ln x\right\}$ and get

$lim_\left\{xto 0\right\} x^x = e^\left\{lim_\left\{xto 0\right\} \left(x ln x \right)\right\} = e^0 = 1.$

 $lim_\left\{tto 0\right\}, mathrm\left\{sinc\right\}\left(f_0 t\right)cdot frac\left\{cosleft\left(pi alpha f_0 tright\right)\right\}\left\{left\left[1 - left\left(2 alpha f_0 tright\right)^2right\right]\right\}$ = left{lim_{tto 0}, mathrm{sinc}(f_0 t)right}cdot left. frac{cosleft(pi alpha f_0 tright)}{left[1 - left(2 alpha f_0 tright)^2right]} , right>_{t = 0} $= 1 cdot 1 = 1$

• And:

## Proofs of l'Hôpital's rule

### Proof by Cauchy's mean value theorem

The most common proof of l'Hôpital's rule uses Cauchy's mean value theorem.

#### With the indeterminate form 0 over 0

This is the case where $f\left(x\right) to 0$ and $g\left(x\right) to 0$.

First, define (or redefine) $f\left(c\right):=0$ and $g\left(c\right):=0$. This does not change the limit, since the limit does not depend on the value at the point $c$ (by definition).

Take $x$ to be some point close to $c$. According to Cauchy's mean value theorem there is a point $xi$ between $x$ and $c$ such that:


frac{f'(xi)}{g'(xi)} = frac{f(x) - f(c)}{g(x) - g(c)}

Since $f\left(c\right) = g\left(c\right) = 0$,

$frac\left\{f\text{'}\left(xi\right)\right\}\left\{g\text{'}\left(xi\right)\right\} = frac\left\{f\left(x\right)\right\}\left\{g\left(x\right)\right\}$

If $xto c$, then also $xi to c$ and


lim_{xto c}frac{f'(x)}{g'(x)} = lim_{xito c}frac{f'(xi)}{g'(xi)} = lim_{xto c}frac{f(x)}{g(x)}, as required.

#### With the indeterminate form infinity over infinity

This is the case where $|g\left(x\right)| to +infty$. In this case, we only sketch the argument.

Take points $x,y$ satisfying


frac{f'(xi)}{g'(xi)} = frac{f(x) - f(y)}{g(x) - g(y)},

where $xi$ is some point between $x$ and $y$. We rewrite that in the form


frac{f(x)}{g(x)} = frac{f(y)}{g(x)} + left [1 - frac{g(y)}{g(x)} right ] frac{f'(xi)}{g'(xi)}.

We can then first take $y$ so close to $c$ that the ratio $frac\left\{f\text{'}\left(xi\right)\right\}\left\{g\text{'}\left(xi\right)\right\}$ is very close to its limit as $xito c$ for all points $xi$ between $y$ and $c$. Next, as we let $xto c$, the terms $f\left(y\right)/g\left(x\right)$ and $g\left(y\right)/g\left(x\right)$ go to $0$, because $lim_\left\{xto c\right\}|g\left(x\right)|=infty$. The above equality therefore shows that for $x$ close to $c$, we have $f\left(x\right)/g\left(x\right)$ close to $frac\left\{f\text{'}\left(xi\right)\right\}\left\{g\text{'}\left(xi\right)\right\}$. Therefore,

$lim_\left\{xto c\right\} frac\left\{ f\left(x\right)\right\}\left\{g\left(x\right)\right\}=lim_\left\{xito c\right\}frac\left\{f\text{'}\left(xi\right)\right\}\left\{g\text{'}\left(xi\right)\right\}= lim_\left\{xto c\right\}frac\left\{f\text{'}\left(x\right)\right\}\left\{g\text{'}\left(x\right)\right\},$
as needed.

## Other applications

Many other indeterminate forms, such as 1, 00, ∞0, and $infty-infty$ can be calculated using l'Hôpital's rule.

For example, to handle a case of $infty-infty$, the difference of two functions are converted to a quotient:


lim_{x to infty} x - sqrt{x^2 - x} = lim_{x to infty} frac{ left(x + sqrt{x^2 - x}right) left(x - sqrt{x^2 - x}right) } { x + sqrt{x^2 - x} } quad


= lim_{x to infty} frac{x^2 - (x^2 - x)}{x + sqrt{x^2 - x}} quad


= lim_{x to infty} frac{x}{x + sqrt{x^2 - x}} quad


= lim_{x to infty} frac{1}{1 + frac{2x - 1}{2 sqrt{x^2 - x}}}

# frac{1}{1 + 1}

The rule can be used on indeterminate forms involving exponents by using logarithms to "move the exponent down." For example, with the indeterminate form 00:


lim_{x to 0} x^x = lim_{x to 0} exp(ln (x^x)) quad;;;$= lim_\left\{x to 0\right\} exp\left(x ln x\right) quad$;;;$= exp\left(lim_\left\{x to 0\right\} x ln x \right). quad$

It is valid to move the limit inside the exponential function, because it is a continuous function. Now the exponent x has been "moved down", so l'Hôpital's rule can be used to evaluate:

$lim_\left\{x to 0\right\} x ln x = 0$

as shown in an example above. Then:


lim_{x to 0} x^x = exp(0) = 1. quad

## Other methods of computing limits

Although l'Hôpital's rule is a powerful way of computing otherwise hard-to-compute limits, it is not always the easiest. Some limits are actually easier to compute using the Taylor series expansion.

For example


lim_{|x| to infty} x sin {1 over x} = lim_{|x| to infty} x left({1 over x} - {1 over x^3 cdot 3!} + {1 over x^5 cdot 5!} - cdots right) ;


= lim_{|x| to infty} 1 - {1 over x^2 cdot 3!} + {1 over x^4 cdot 5!} - cdots; =; 1. quad Some elementary algebraic manipulation, however, yields:

lim_{|x| to infty} {sin {1 over x} over {1 over x}}. And applying l'Hôpital's rule, we have:

L = lim_{|x| to infty} {{cos {1 over x} cdot {-1 over x^2}}over {-1 over x^2}}

= lim_{|x| to infty} cos{1 over x} and since the cosine function is continuous for all real numbers, the limit may go "inside" as the argument of cosine


# cos{left(lim_{|x| to infty} {1 over x} right)} = cos{0}

1. On the other hand, a simple substitution also allows the use of l'Hôpital's rule.

Let


mathrm{} u = {1 over x}. Therefore, as $x rightarrow infty$ , $u rightarrow 0^+.$

Therefore,


lim_{|x| to infty} x sin {1 over x} = lim_{|u| to 0^+} {1 over u} sin {u} = 1.

## Logical circularity

In some cases it may constitute circular reasoning to use l'Hôpital's rule to evaluate such limits as

$lim_\left\{hto 0\right\}\left\{\left(x+h\right)^n-x^n over h\right\}.$

If one uses the evaluation of the limit above for the purpose of proving that

$\left\{d over dx\right\} x^n=nx^\left\{n-1\right\},$

and one uses l'Hôpital's rule and the fact that

$\left\{d over dx\right\} x^n=nx^\left\{n-1\right\},$

in the evaluation of the limit, the argument uses the expected proof to prove itself — i.e. begging the question — and is therefore fallacious (even though the conclusion of the proof happens to be true).

Another popular mistake of this nature is the well-known limit

$lim_\left\{xto 0\right\} \left\{sin x over x\right\} = 1.$

Just as in the previous example, if one proves the differentiation rule for $sin\left(x\right)$ with the limit, as is often the case in most calculus books, then it is circular to apply l'Hôpital's rule to evaluate the same limit.

 $lim_\left\{tto frac\left\{1\right\}\left\{2alpha f_0\right\}\right\} mathrm\left\{sinc\right\}\left(f_0 t\right)cdot frac\left\{cosleft\left(pi alpha f_0 tright\right)\right\}\left\{left\left[1 - left\left(2 alpha f_0 tright\right)^2right\right]\right\}$ $= mathrm\left\{sinc\right\}left\left(frac\left\{1\right\}\left\{2alpha\right\}right\right)cdot lim_\left\{tto frac\left\{1\right\}\left\{2alpha f_0\right\}\right\} frac\left\{cosleft\left(pi alpha f_0 tright\right)\right\}\left\{left\left[1 - left\left(2 alpha f_0 tright\right)^2right\right]\right\}$ $= mathrm\left\{sinc\right\}left\left(frac\left\{1\right\}\left\{2alpha\right\}right\right)cdot left\left(frac\left\{-pi /2\right\}\left\{-2\right\}right\right)$ $= sinleft\left(frac\left\{pi\right\}\left\{2alpha\right\}right\right)cdot frac\left\{alpha\right\}\left\{2\right\}$