# Calculus/L'Hôpital's Rule
## L'Hôpital's Rule

Occasionally, one comes across a limit which results in ${\frac {0}{0}}$ or ${\frac {\infty }{\infty }}$ , which are called indeterminate limits. However, it is still possible to solve these by using L'Hôpital's rule. This rule is vital in explaining how other limits can be derived.
If ${\frac {f(a)}{g(a)}}$ exists, where $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=0$ or $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=\infty$ , the limit $\lim _{x\to a}{\frac {f(x)}{g(x)}}$ is said to be indeterminate.
All of the following expressions are indeterminate forms.
    ${\frac {0}{0}},{\frac {\pm \infty }{\pm \infty }},\infty -\infty ,0\cdot \infty ,0^{0},\infty ^{0},1^{\infty }$
These expressions are called indeterminate because you cannot determine their exact value in the indeterminate form. Depending on the situation, each indeterminate form could evaluate to a variety of values.

   ### Theorem

   If $\lim _{x\to a}{\frac {f(x)}{g(x)}}$ is indeterminate of type ${\frac {0}{0}}$ or ${\frac {\pm \infty }{\pm \infty }}$ ,
   then $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$, where $a\in {\overline {\mathbb {R} }}$.
   In other words, if the limit of the function is indeterminate, the limit equals the derivative of the top over the derivative of the bottom. If that is indeterminate, L'Hôpital's rule can be used again until the limit isn't ${\frac {0}{0}}$ or ${\frac {\infty }{\infty }}$ .

### Proof of the 0/0 case

Suppose that for real functions $f$ and $g$, $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=0$ and that $\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$ exists. Thus $f'(x)$ and $g'(x)$ exist in an interval $(a-\delta ,a+\delta )$ around $a$ , but maybe not at $a$ itself. Thus, for any $x\in (a-\delta ,a+\delta )$ , in any interval $[x,a]$ or $[a,x]$, $f$ and $g$ are continuous and differentiable, with the possible exception of $a$. Define
    ${\begin{array}{l}F(x)={\begin{cases}f(x)&x\neq a\\\lim \limits _{x\to a}f(x)&x=a\end{cases}}\\G(x)={\begin{cases}g(x)&x\neq a\\\lim \limits _{x\to a}g(x)&x=a\end{cases}}\end{array}}$
Note that $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\frac {F(x)}{G(x)}}$ , $\lim _{x\to a}{\frac {f'(x)}{g'(x)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$, and that $F,G$ are continuous in any interval $[a,x]$ or $[x,a]$ and differentiable in any interval $(a,x)$ or $(x,a)$ when $x\in (a-\delta ,a+\delta )$.
Cauchy's Mean Value Theorem (see 3.9) tells us that ${\frac {F(x)-F(a)}{G(x)-G(a)}}={\frac {F'(c)}{G'(c)}}$ for some $c\in (a,x)$ or $c\in (x,a)$ . Since $F(a)=G(a)=0$ , we have ${\frac {F(x)}{G(x)}}={\frac {F'(c)}{G'(c)}}$ for $x,c\in (a-\delta ,a+\delta )$.
Since $c\in (x,a)$ or $c\in (a,x)$ , by the squeeze theorem
    $\lim _{x\to a}x=a\quad \Rightarrow \quad \lim _{x\to a}c=a$
This implies
    $\lim _{x\to a}{\frac {F'(c)}{G'(c)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$
So taking the limit as $x\to a$ of the last equation gives $\lim _{x\to a}{\frac {F(x)}{G(x)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$, which is equivalent to the more commonly used form $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$.

## Examples
### Example 1

Find $\lim _{x\to 0}{\frac {\sin(x)}{x}}$
Since plugging in 0 for x results in ${\frac {0}{0}}$ , use L'Hôpital's rule to take the derivative of the top and bottom, giving:
    $\lim _{x\to 0}{\frac {{\frac {d}{dx}}\left(\sin(x)\right)}{{\frac {d}{dx}}(x)}}=\lim _{x\to 0}{\frac {\cos(x)}{1}}$
Plugging in 0 for x gives 1 here. Note that it is logically incorrect to prove this limit by using L'Hôpital's rule, as the same limit is required to prove that the derivative of the sine function exists: it would be a form of begging the question, or circular reasoning. An alternative way to prove this limit equal one is using squeeze theorem.

### Example 2

Find $\lim _{x\to 0}x\cot(x)$
First, you need to rewrite the function into an indeterminate limit fraction:
    $\lim _{x\to 0}{\frac {x}{\tan(x)}}$
Now it's indeterminate. Take the derivative of the top and bottom:
    $\lim _{x\to 0}{\frac {1}{\sec ^{2}(x)}}$
Plugging in 0 for $x$ once again gives 1.

### Example 3

Find $\lim _{x\to \infty }{\frac {4x+22}{5x+9}}$
This time, plugging in $\infty$ for x gives you ${\frac {\infty }{\infty }}$ . So using L'Hôpital's rule gives:
    $\lim _{x\to \infty }{\frac {4}{5}}$
Therefore, ${\frac {4}{5}}$ is the answer.

### Example 4

Find $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}$
Plugging the value of x into the limit yields
    $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=1^{\infty }$ (indeterminate form).
Let $k=\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=1^{\infty }$
    $\ln(k)$ $=\lim _{x\to \infty }\ln \left(1+{\frac {1}{x}}\right)^{x}$ $=\lim _{x\to \infty }x\ln \left(1+{\frac {1}{x}}\right)$ $=\lim _{x\to \infty }{\frac {\ln \left(1+{\frac {1}{x}}\right)}{\frac {1}{x}}}={\frac {\ln(1)}{\frac {1}{x}}}={\frac {0}{0}}$
We now apply L'Hôpital's rule by taking the derivative of the top and bottom with respect to $x$.
    $\ln(k)=\lim _{x\to \infty }{\frac {\ln \left(1+{\frac {1}{x}}\right)}{\frac {1}{x}}}=\lim _{x\to \infty }{\frac {{\frac {d}{dx}}\left[\ln \left(1+{\frac {1}{x}}\right)\right]}{{\frac {d}{dx}}\left({\frac {1}{x}}\right)}}=\lim _{x\to \infty }{\frac {x}{x+1}}$
Since
    $\lim _{x\to \infty }{\frac {x}{x+1}}={\frac {\infty }{\infty }}$
We apply L'Hôpital's rule once again
    $\ln(k)=\lim _{x\to \infty }{\frac {x}{x+1}}=\lim _{x\to \infty }{\frac {1}{1}}=1$
Therefore
    $k=e$
And
    $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=e$
Similarly, this limit also yields the same result
    $\lim _{x\to \infty }\left(1+x\right)^{\frac {1}{x}}=e$

#### Note

This does not prove that $1^{\infty }=e$ because using the same method,
    $\lim _{x\to \infty }\left(1+{\frac {2}{x}}\right)^{x}=1^{\infty }=e^{2}$

## Exercises

Evaluate the following limits using L'Hôpital's rule:
$\lim _{x\to 0}{\frac {x+\tan(x)}{\sin(x)}}$
$2$
$2$
$\lim _{x\to \pi }{\frac {x-\pi }{\sin(x)}}$
$-1$
$-1$
$\lim _{x\to 0}{\frac {\sin(3x)}{\sin(4x)}}$
${\frac {3}{4}}$
${\frac {3}{4}}$
$\lim _{x\to \infty }{\frac {x^{5}}{e^{5x}}}$
$0$
$0$
$\lim _{x\to 0}{\frac {\tan(x)-x}{\sin(x)-x}}$
$-2$
$-2$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References