# L'Hôpital's rule

In calculus, l'Hôpital's rule (alternately, l'Hospital's rule) 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 Analyse des infiniment petits pour l'intelligence des lignes courbes (1696), the first book to be written on the differential calculus. It is likely, however, that the result was originally due to Johann Bernoulli, upon whose lectures the text was largely based.

## Overview

When determining the limit of a quotient f(x)/g(x) when both f and g approach 0, or f and g approach infinity, L'Hôpital's rule states that quotient of f′ and g′ has the same limit (if the limit exists), provided that g′ is nonzero throughout some interval containing the point in question. 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 {R} ^{*}=\mathbb {R} \cup \{\pm \infty \}$ . Suppose that $c\in \mathbb {R} ^{*}$ , that

$\lim _{x\to c}{f'(x) \over g'(x)}=A,A\in \mathbb {R} ^{*}$ and that $g'(x)\neq 0$ for all $x\neq 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 _{x\to c}{f(x)}=\lim _{x\to c}g(x)=0\\{\mbox{or}}\\\lim _{x\to c}{|g(x)|}=+\infty \end{cases}}$ then

$\lim _{x\to c}{f(x) \over g(x)}=A.$ L'Hôpital's rule also holds for one-sided limits.

Basic indeterminate forms (all others reduce to these):

${0 \over 0}\qquad {\infty \over \infty }$ Other indeterminate forms:

${\infty \qquad 0\cdot \infty \qquad 0^{0}\qquad \infty -\infty \qquad \infty }$ Note the requirement that the limit $\lim _{x\to c}{\frac {f'(x)}{g'(x)}}$ 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(x)=x+\sin(x)$ and $g(x)=x$ , then

$\lim _{x\to \infty }{\frac {f'(x)}{g'(x)}}=\lim _{x\to \infty }(1+\cos(x))$ does not exist, whereas

$\lim _{x\to \infty }{\frac {f(x)}{g(x)}}=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(x)=x+\cos(x)\sin(x)$ and $g(x)=e^{\sin(x)}(x+\cos(x)\sin(x))$ , then

$\lim _{x\to \infty }{\frac {f'(x)}{g'(x)}}={\frac {2\cos ^{2}{x}}{e^{\sin(x)}\cos(x)(x+\sin(x)\cos(x)+2\cos(x))}}=\lim _{x\to \infty }{\frac {2\cos(x)}{e^{\sin(x)}(x+\sin(x)\cos(x)+2\cos(x))}}=0$ whereas

$\lim _{x\to \infty }{\frac {f(x)}{g(x)}}=\lim _{x\to \infty }{\frac {1}{e^{\sin(x)}}}$ does not exist since ${\frac {1}{e^{\sin(x)}}}$ fluctuates between $e^{-1}$ and e.

## Examples

• Here is an example involving the sinc function, which has the form 0/0 :
$\lim _{x\to 0}{\frac {\sin x}{x}}=\lim _{x\to 0}{\frac {\cos x}{1}}={\frac {1}{1}}=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 _{x\to 0}{2\sin x-\sin 2x \over x-\sin x}$ $=\lim _{x\to 0}{2\cos x-2\cos 2x \over 1-\cos x}$ $=\lim _{x\to 0}{-2\sin x+4\sin 2x \over \sin x}$ $=\lim _{x\to 0}{-2\cos x+8\cos 2x \over \cos x}$ $={-2\cos 0+8\cos 0 \over \cos 0}$ $=6\,.$ • Here is another case involving 0/0.
$\lim _{x\to 0}{e^{x}-1-x \over x^{2}}=\lim _{x\to 0}{e^{x}-1 \over 2x}=\lim _{x\to 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 _{x\to \infty }x^{n}e^{-x}=\lim _{x\to \infty }{x^{n} \over e^{x}}=\lim _{x\to \infty }{nx^{n-1} \over e^{x}}=n\lim _{x\to \infty }{x^{n-1} \over e^{x}}.$ Iterate the above until the exponent is 0. Then one sees that the limit is 0.
• This one involves ∞/∞.
$\lim _{x\to 0+}x\ln x=\lim _{x\to 0+}{\ln x \over 1/x}=\lim _{x\to 0+}{1/x \over -1/x^{2}}=\lim _{x\to 0+}-x=0$ $\lim _{x\to 0}{\frac {\sin \left(\pi f_{0}t\right)\cos \left(\pi \alpha f_{0}t\right)}{\pi f_{0}t\left[1-\left(2\alpha f_{0}t\right)^{2}\right]}}={\frac {\pi f_{0}}{\pi f_{0}}}=1.$ ## Proof

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

1) The case when $f(x)\to 0,g(x)\to 0$ First, we expand continuously (or redefine) $f(x)$ and $g(x)$ by $0$ for $x=c$ . This doesn't change the limit since the limit doesn't depend on the value in the point (by definition).

According to Cauchy's mean value theorem there is a constant $\xi$ in $c<\xi such that:

${f'(\xi ) \over g'(\xi )}={f(c+h)-f(c) \over g(c+h)-g(c)}$ Since $f(c)=g(c)=0$ ,

${f'(\xi ) \over g'(\xi )}={f(c+h) \over g(c+h)}$ If $h\to 0$ then $\xi \to c$ and

$\lim _{x\to c}{f'(x) \over g'(x)}=\lim _{h\to 0}{f'(\xi ) \over g'(\xi )}=\lim _{h\to 0}{f(c+h) \over g(c+h)}=\lim _{x\to c}{f(x) \over g(x)}$ 2) The case when $|g(x)|\to +\infty$ Let $x . Then using Cauchy's mean value theorem:

${f'(\xi ) \over g'(\xi )}={f(x)-f(y) \over g(x)-g(y)}$ We rewrite that in the form

${f(x) \over g(x)}={f(y) \over g(x)}+\left[1-{g(y) \over g(x)}\right]{f'(\xi ) \over g'(\xi )}$ and then by the discussion of the two cases

${\begin{cases}\lim _{x\to c}{f'(x) \over g'(x)}=B\in \mathbb {R} \\\\\lim _{x\to c}{f'(x) \over g'(x)}=\pm \infty \end{cases}}$ we show that the limit of f(x)/g(x) tends to the same when $x\to c$ and $h\to 0$ .

### Other proofs

There are more intuitive proofs of the rule. If

$\lim _{x\to a}{\frac {f(x)}{g(x)}}$ tends to the indeterminate form 0/0, then the rule can be proven with a local linearity argument. If it tends to the indeterminate form ${\infty }/{\infty }$ , then this can be converted to 0/0 form using the identity :${\frac {f(x)}{g(x)}}={\frac {1/g(x)}{1/f(x)}}.$ By assuming this limit equals L, and taking the derivative of the numerator and denominator, it can be proven that $L=\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$ .

## Other applications

Many other indeterminate forms, such as $1^{\infty }$ , $\infty ^{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 is 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}}={\frac {1}{2}}\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$ ## Logical circularity

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

$\lim _{h\to 0}{(x+h)^{n}-x^{n} \over h}.$ If one uses the evaluation of the limit above for the purpose of proving that

${d \over dx}x^{n}=nx^{n-1}\,$ and one uses l'Hôpital's rule and the fact that

${d \over dx}x^{n}=nx^{n-1}\,$ in the evaluation of the limit, then the argument is circular and therefore fallacious.