Zum Inhalt springen

# L'Hôspital's rule – Serlo

As a final application of the mean value theorem, more precisely the second mean value theorem, we want to derive L'Hospital's rule. This is a practical way to determine the limit of a quotient by separately differentiating numerator and denominator. The rule is named after the French mathematician Guillaume de l'Hôpital, but was first derived by the Swiss mathematician Johann Bernoulli.

## L’Hospital's rule

Theorem (L’Hospital's rule)

Let ${\displaystyle {\tilde {x}}\in \mathbb {R} \cup \lbrace -\infty ,\infty \rbrace }$ and ${\displaystyle I:={(a,{\tilde {x}})}}$ with ${\displaystyle a<{\tilde {x}}}$ or ${\displaystyle I:={({\tilde {x}},b)}}$ with ${\displaystyle b>{\tilde {x}}}$. Let ${\displaystyle f,g:I\to \mathbb {R} }$ be two differentiable functions where ${\displaystyle g'(x)\neq 0}$ for all ${\displaystyle x\in I}$. Further, suppose that the limit ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {f'(x)}{g'(x)}}=:q}$ exists and one of the following two statements is true:

1. ${\displaystyle \lim _{x\to {\tilde {x}}}{f(x)}=0}$ and ${\displaystyle \lim _{x\to {\tilde {x}}}{g(x)}=0}$
2. ${\displaystyle \lim _{x\to {\tilde {x}}}{f(x)},\lim _{x\to {\tilde {x}}}{g(x)}\in \lbrace -\infty ,\infty \rbrace }$.

Then, there is ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {f(x)}{g(x)}}=q}$.

Proof (L’Hospital's rule)

We first look at the case with ${\displaystyle {\tilde {x}}\in \mathbb {R} }$. Because ${\displaystyle \lim _{x\to {\tilde {x}}}{f(x)}=0}$ and ${\displaystyle \lim _{x\to {\tilde {x}}}{g(x)}=0}$ we can continue the functions ${\displaystyle f}$ and ${\displaystyle g}$ continuously. We obtain the functions ${\displaystyle {\hat {f}},{\hat {g}}:I\cup \lbrace {\tilde {x}}\rbrace \to \mathbb {R} }$ with ${\displaystyle {\hat {f}}(x):=f(x)}$ and ${\displaystyle {\hat {g}}(x):=g(x)}$ for all ${\displaystyle x\in I}$. Further we set ${\displaystyle {\hat {f}}({\tilde {x}}):=0}$ and ${\displaystyle {\hat {g}}({\tilde {x}}):=0}$.

We now look at any sequence ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$ which converges towards ${\displaystyle {\tilde {x}}}$. Since the functions ${\displaystyle {\hat {f}}}$ and ${\displaystyle {\hat {g}}}$ are continuous, we can apply the generalized mean value theorem. So there is a sequence ${\displaystyle (z_{n})_{n\in \mathbb {N} }}$, such that for all ${\displaystyle n\in \mathbb {N} }$ we have ${\displaystyle z_{n}\in {({\tilde {x}},x_{n})}}$ or ${\displaystyle z_{n}\in {(x_{n},{\tilde {x}})}}$ and

{\displaystyle {\begin{aligned}&{\frac {f(x_{n})}{g(x_{n})}}\\[0.3em]&{\color {Gray}\left\downarrow \ f(x_{n})={\hat {f}}(x_{n}){\text{ and }}g(x_{n})={\hat {g}}(x_{n}){\text{ for all }}n\in \mathbb {N} {\text{, since }}x_{n}\in I,{\hat {f}}({\tilde {x}})=0={\hat {g}}({\tilde {x}})\right.}\\[0.3em]=\ &{\frac {{\hat {f}}(x_{n})-{\hat {f}}({\tilde {x}})}{{\hat {g}}(x_{n})-{\hat {g}}({\tilde {x}})}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{generalized mean value theorem}}\right.}\\[0.3em]=\ &{\frac {{\hat {f}}'(z_{n})}{{\hat {g}}'(z_{n})}}\\[0.3em]=\ &{\frac {f'(z_{n})}{g'(z_{n})}}\\[0.3em]\end{aligned}}}

Somit folgt

{\displaystyle {\begin{aligned}&\lim _{n\to \infty }{\frac {f(x_{n})}{g(x_{n})}}\\[0.3em]=\ &\lim _{n\to \infty }{\frac {f'(z_{n})}{g'(z_{n})}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {f'(x)}{g'(x)}}\\[0.3em]=\ &q\end{aligned}}}

Since this does even hold for every arbitrary sequence ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$, there is in total ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {f(x)}{g(x)}}=q}$.

To-Do:

case 2

Now let us consider the case ${\displaystyle {\tilde {x}}\in \lbrace -\infty ,\infty \rbrace }$. To do this, we define the auxiliary functions ${\displaystyle {\tilde {f}},{\tilde {g}}:J\to \mathbb {R} }$ choosing a ${\displaystyle c\in I}$ with ${\displaystyle c>0}$ for ${\displaystyle {\tilde {x}}=\infty }$ or ${\displaystyle c<0}$ for ${\displaystyle {\tilde {x}}=-\infty }$. We set ${\displaystyle J:={(0,{\tfrac {1}{c}})}}$ or ${\displaystyle J:={({\tfrac {1}{c}},0)}}$. For all ${\displaystyle x\in J}$ we set ${\displaystyle {\tilde {f}}(x):=f({\tfrac {1}{x}})}$ and ${\displaystyle {\tilde {g}}(x):=g({\tfrac {1}{x}})}$.

In the sequencesden we consider only the case ${\displaystyle {\tilde {x}}=\infty }$, because the proof for ${\displaystyle {\tilde {x}}=-\infty }$ is analogous. There is:

{\displaystyle {\begin{aligned}&\lim _{x\to \infty }{f(x)}=\lim _{x\to \infty }{{\tilde {f}}({\tfrac {1}{x}})}=\lim _{x\to 0}{{\tilde {f}}(x)}\\[0.3em]&\lim _{x\to \infty }{g(x)}=\lim _{x\to \infty }{{\tilde {g}}({\tfrac {1}{x}})}=\lim _{x\to 0}{{\tilde {g}}(x)}\end{aligned}}}

We can therefore apply L'Hospital's rule for the case ${\displaystyle {\tilde {x}}=0}$, which we have already proved. There is:

{\displaystyle {\begin{aligned}&\lim _{x\to \infty }{\frac {f(x)}{g(x)}}\\[0.3em]&{\color {Gray}\left\downarrow \ \lim _{x\to \infty }{f(x)}=\lim _{x\to 0}{{\tilde {f}}(x)}{\text{ and }}\lim _{x\to \infty }{g(x)}=\lim _{x\to 0}{{\tilde {g}}(x)}\right.}\\[0.3em]=\ &\lim _{x\to 0}{\frac {{\tilde {f}}(x)}{{\tilde {g}}(x)}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{L’Hospital's rule}}\right.}\\[0.3em]=\ &\lim _{x\to 0}{\frac {{\tilde {f}}'(x)}{{\tilde {g}}'(x)}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{chain rule in enumerator and denominator, }}{\tilde {f}}(x)=f({\tfrac {1}{x}}),{\tilde {g}}(x)=g({\tfrac {1}{x}}){\text{ for all }}x{\text{ with }}{\tfrac {1}{x}}\in J\right.}\\[0.3em]=\ &\lim _{x\to 0}{\frac {-f'({\tfrac {1}{x}})x^{2}}{-g'({\tfrac {1}{x}})x^{2}}}\\[0.3em]=\ &\lim _{x\to 0}{\frac {f'({\tfrac {1}{x}})}{g'({\tfrac {1}{x}})}}\\[0.3em]=\ &\lim _{x\to \infty }{\frac {f'(x)}{g'(x)}}\\[0.3em]=\ &q\end{aligned}}}
To-Do:

theorem fertig schreiben

## Examples and applications

### Standard types ${\displaystyle {\tfrac {0}{0}}}$ and ${\displaystyle {\tfrac {\pm \infty }{\pm \infty }}}$

First, we will deal with the types where the rules can be applied directly.

Example (Limits via L’Hospital 1)

First, some commonly found application: find

${\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{x}}}$

There is ${\displaystyle \lim _{x\to 0}\sin(x)=\lim _{x\to 0}x=0}$. In addition, ${\displaystyle f(x)=\sin(x)}$ and ${\displaystyle g(x)=x}$ are differentiable on ${\displaystyle (0,\infty )}$ , and there is ${\displaystyle g'(0)=1\neq 0}$. Since further

${\displaystyle \lim _{x\to 0}{\frac {f'(x)}{g'(x)}}=\lim _{x\to 0}{\frac {\cos(x)}{1}}={\frac {\cos(0)}{1}}=1}$

exists, there is by the theorem von L’Hospital

${\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{x}}=1}$

In general we do not write this down in such detail. We check the requirements in our heads and write down the result as follows:

${\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{x}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {\cos(x)}{1}}=1}$

Hint

With the rule of L'Hospital the limit value ${\displaystyle \lim _{x\to 0}{\tfrac {\sin(x)}{x}}}$ can be calculated within "one line". We would like to point out, however, that when applying the rule, we use the derivative

${\displaystyle \sin '(x)=\lim _{h\to 0}{\frac {\sin(x+h)-\sin(x)}{h}}=\ldots =\sin(x)\cdot \underbrace {\lim _{h\to 0}{\frac {\cos(h)-1}{h}}} _{=0}+\cos(x)\cdot \underbrace {\lim _{h\to 0}{\frac {\sin(h)}{h}}} _{=1}=\cos(x)}$

It was therefore precisely this limit value that was needed to calculate it. Since we assume that the derivatives of the basic functions are known once they have been calculated, this is not a problem.

Exercise (Limits via L’Hospital)

Determine the following limits:

1. ${\displaystyle \lim _{x\to 0}{\frac {e^{x}-1}{x}}}$
2. ${\displaystyle \lim _{x\to 0}{\frac {\ln(1+x)}{x}}}$

Solution (Limits via L’Hospital)

Part 1:

${\displaystyle \lim _{x\to 0}{\frac {e^{x}-1}{x}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {e^{x}}{1}}=e^{0}=1}$

Part 2:

${\displaystyle \lim _{x\to 0}{\frac {\ln(1+x)}{x}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {\frac {1}{1+x}}{1}}={\frac {1}{1}}=1}$

Example (Limits via L’Hospital 2)

Next, we determine

${\displaystyle \lim _{x\to \infty }{\frac {\ln(x)}{x}}}$

There is ${\displaystyle \lim _{x\to \infty }\ln(x)=\infty =\lim _{x\to \infty }x}$. Since also the other conditions for the theorem of L'Hospital are fulfilled, there is

${\displaystyle \lim _{x\to \infty }{\frac {\ln(x)}{x}}\ {\overset {\text{L'H}}{=}}\ \lim _{x\to \infty }{\frac {\frac {1}{x}}{1}}=\lim _{x\to \infty }{\frac {1}{x}}=0}$

This limit value can be generalized for ${\displaystyle \alpha >0}$ to

${\displaystyle \lim _{x\to \infty }{\frac {\ln(x)}{x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {\frac {1}{x}}{\alpha x^{\alpha -1}}}=\lim _{x\to \infty }{\frac {1}{\alpha x^{\alpha }}}=0}$

Exercise (Limits via L’Hospital 2)

Determine for ${\displaystyle \alpha >0}$ the limit

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x}}}$

Solution (Limits via L’Hospital 2)

There is

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {\alpha e^{\alpha x}}{1}}=\lim _{x\to \infty }\alpha e^{\alpha x}=\infty }$

Sometimes it is also necessary to apply the rules of L'Hospital several times in a row before we reach the desired result.

Example (Limits via L’Hospital 3)

Next, we determine

${\displaystyle \lim _{x\to 0}{\frac {1-\cos(x)}{x^{2}}}}$

There is ${\displaystyle \lim _{x\to 0}1-\cos(x)=0=\lim _{x\to 0}x^{2}}$. Using L’Hospital, we obtain

${\displaystyle \lim _{x\to 0}{\frac {1-\cos(x)}{x^{2}}}\ {\overset {\text{L'H}}{=}}\ \lim _{x\to 0}{\frac {\sin(x)}{2x}}}$

Now again, ${\displaystyle \lim _{x\to 0}\sin(x)=0=\lim _{x\to 0}2x}$. Using L’Hospital again, we finally obtain

${\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{2x}}\ {\overset {\text{L'H}}{=}}\ \lim _{x\to 0}{\frac {\cos(x)}{2}}={\frac {1}{2}}}$

So all in all, there is

${\displaystyle \lim _{x\to 0}{\frac {1-\cos(x)}{x^{2}}}={\frac {1}{2}}}$

Exercise (Limits via L’Hospital 3)

Determine the limits

1. ${\displaystyle \lim _{x\to \infty }{\frac {e^{x}-x-1}{x^{2}}}}$
2. ${\displaystyle \lim _{x\to 0}{\frac {x^{3}}{\sin(x)-x}}}$

Solution (Limits via L’Hospital 3)

Part 1:

${\displaystyle \lim _{x\to \infty }{\frac {e^{x}-1-x}{x^{2}}}\ {\underset {\text{L.H.}}{\overset {\frac {\infty }{\infty }}{=}}}\ \lim _{x\to \infty }{\frac {e^{x}-1}{2x}}\ {\underset {\text{L.H.}}{\overset {\frac {\infty }{\infty }}{=}}}\ \lim _{x\to \infty }{\frac {e^{x}}{2}}=\infty }$

Part 2:

${\displaystyle \lim _{x\to 0}{\frac {x^{3}}{\sin(x)-x}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {3x^{2}}{\cos(x)-1}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {6x}{-\sin(x)}}\ {\underset {\text{L.H.}}{\overset {\frac {0}{0}}{=}}}\ \lim _{x\to 0}{\frac {6}{-\cos(x)}}={\frac {6}{-1}}=-6}$

### Type ${\displaystyle 0\cdot (\pm \infty )}$

Here, the rules of L'Hospital are not directly applicable. The "trick" is therefore to create a fraction by forming reciprocal values, and thus to obtain a limit value in the standard form ${\displaystyle {\tfrac {0}{0}}}$ or ${\displaystyle {\tfrac {\pm \infty }{\pm \infty }}}$.

Example (Limits via L’Hospital 4)

A standard example is the limit

${\displaystyle \lim _{x\to 0+}x\ln(x)}$

There is ${\displaystyle \lim _{x\to 0+}x=0}$ and ${\displaystyle \lim _{x\to 0+}\ln(x)=-\infty }$. We take the reciprocal value

${\displaystyle \lim _{x\to 0+}x\ln(x)=\lim _{x\to 0+}{\frac {\ln(x)}{\frac {1}{x}}}}$

Since there is ${\displaystyle \lim _{x\to 0+}{\tfrac {1}{x}}=\infty }$, we can indeed apply L’Hospital and obtain

${\displaystyle \lim _{x\to 0+}{\frac {\ln(x)}{\frac {1}{x}}}\ {\overset {\text{L'H}}{=}}\ \lim _{x\to 0+}{\frac {\frac {1}{x}}{-{\frac {1}{x^{2}}}}}=\lim _{x\to 0+}-x=0}$

Warning

The following term shift

${\displaystyle \lim _{x\to 0+}x\ln(x)=\lim _{x\to 0+}{\frac {x}{\frac {1}{\ln(x)}}}}$

renders an expression ${\displaystyle {\tfrac {0}{0}}}$. However, by applying the rule of L'Hospital,

${\displaystyle \lim _{x\to 0+}{\frac {x}{\frac {1}{\ln(x)}}}{\overset {\text{L'H}}{=}}\lim _{x\to 0+}{\frac {1}{-{\frac {1}{\ln(x)^{2}}}\cdot {\frac {1}{x}}}}=\lim _{x\to 0+}-x\ln(x)^{2}}$

This expression is now again of the type ${\displaystyle 0\cdot \infty }$, but has a more complicated form than the original one. So the trick does not always lead to success!

Hint

For two arbitrary functions ${\displaystyle f}$ and ${\displaystyle g}$ with respective properties, the re-formulation trick reads:

${\displaystyle \lim _{x\to x_{0}}f(x)\cdot g(x)=\lim _{x\to x_{0}}{\frac {f(x)}{\frac {1}{g(x)}}}}$

or

${\displaystyle \lim _{x\to x_{0}}f(x)\cdot g(x)=\lim _{x\to x_{0}}{\frac {g(x)}{\frac {1}{f(x)}}}}$

Depending on which of the two forms is used, the limit value can then be calculated more easily.

Exercise (Limits via L’Hospital 4)

Compute

1. ${\displaystyle \lim _{x\to 0+}x^{2}\ln(x)}$
2. ${\displaystyle \lim _{x\to 0+}x(\ln(x))^{2}}$
3. ${\displaystyle \lim _{x\to -\infty }xe^{x}}$

Solution (Limits via L’Hospital 4)

Part 1:

${\displaystyle \lim _{x\to 0+}x^{2}\ln(x)=\lim _{x\to 0+}{\frac {\ln(x)}{\frac {1}{x^{2}}}}\ {\underset {\text{L'H.}}{\overset {\frac {-\infty }{\infty }}{=}}}\ \lim _{x\to 0+}{\frac {\frac {1}{x}}{-{\frac {2}{x^{3}}}}}=\lim _{x\to 0+}-{\frac {1}{2}}x^{2}=0}$

Part 2:

${\displaystyle \lim _{x\to 0+}x(\ln(x))^{2}=\lim _{x\to 0+}{\frac {(\ln(x))^{2}}{\frac {1}{x}}}\ {\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\ \lim _{x\to 0+}{\frac {2\ln(x)\cdot {\frac {1}{x}}}{-{\frac {1}{x^{2}}}}}=\lim _{x\to 0+}{\frac {2\ln(x)}{-{\frac {1}{x}}}}\ {\underset {\text{L'H.}}{\overset {\frac {-\infty }{-\infty }}{=}}}\ \lim _{x\to 0+}{\frac {\frac {2}{x}}{\frac {1}{x^{2}}}}=\lim _{x\to 0+}2x=0}$

Part 3:

${\displaystyle \lim _{x\to -\infty }xe^{x}=\lim _{x\to -\infty }{\frac {x}{\frac {1}{e^{x}}}}=\lim _{x\to -\infty }{\frac {x}{e^{-x}}}\ {\underset {\text{L'H.}}{\overset {\frac {-\infty }{\infty }}{=}}}\ \lim _{x\to -\infty }{\frac {1}{-e^{-x}}}=\lim _{x\to -\infty }-e^{x}=0}$

### Type ${\displaystyle \infty -\infty }$

Next, we will deal with differences of limit values, both of which converge improperly towards ${\displaystyle \infty }$. These are often differences of fractional terms. By forming the principal denominator and grouping them into a fractional term, the expression can often be transformed such that the rules of L'Hospital are applicable.

Example (Limits via L’Hospital 5)

Consider the limit

${\displaystyle \lim _{x\to 0+}{\frac {1}{\sin(x)}}-{\frac {1}{x}}}$

Here we have ${\displaystyle \lim _{x\to 0+}{\tfrac {1}{\sin(x)}}=\lim _{x\to 0}{\tfrac {1}{x}}=\infty }$. So the limit value is of the described type ${\displaystyle \infty -\infty }$. By forming the principal denominator we obtain

${\displaystyle \lim _{x\to 0+}{\frac {1}{\sin(x)}}-{\frac {1}{x}}=\lim _{x\to 0+}{\frac {x-\sin(x)}{x\sin(x)}}}$

Since ${\displaystyle \lim _{x\to 0+}x\sin(x)=0=\lim _{x\to 0+}x-\sin(x)}$ we are able to apply L’Hospital and obtain

${\displaystyle \lim _{x\to 0+}{\frac {x-\sin(x)}{x\sin(x)}}\ {\overset {\text{L'H.}}{=}}\ \lim _{x\to 0+}{\frac {1-\cos(x)}{\sin(x)+x\cos(x)}}\ {\overset {\frac {0}{0}}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to 0+}{\frac {\sin(x)}{\cos(x)+\cos(x)-x\sin(x)}}={\frac {0}{1+1-0}}=0}$

Hint

For two arbitrary functions ${\displaystyle f}$ and ${\displaystyle g}$ , the re-formulation trick reads:

${\displaystyle \lim _{x\to x_{0}}{\frac {1}{f(x)}}-{\frac {1}{g(x)}}=\lim _{x\to x_{0}}{\frac {g(x)-f(x)}{f(x)g(x)}}}$

Exercise (Limits via L’Hospital 5)

Determine

1. ${\displaystyle \lim _{x\to 0+}{\frac {1}{x}}-{\frac {1}{e^{x}-1}}}$
2. ${\displaystyle \lim _{x\to 1}{\frac {1}{x-1}}-{\frac {1}{\ln(x)}}}$

Solution (Limits via L’Hospital 5)

Part 1: There is

${\displaystyle \lim _{x\to 0+}{\frac {1}{x}}-{\frac {1}{e^{x}-1}}=\lim _{x\to 0+}{\frac {e^{x}-1-x}{x(e^{x}-1)}}\ {\overset {\frac {0}{0}}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to 0+}{\frac {e^{x}-1}{e^{x}-1+xe^{x}}}\ {\overset {\frac {0}{0}}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to 0+}{\frac {e^{x}}{e^{x}+e^{x}+xe^{x}}}={\frac {1}{1+1+0}}={\frac {1}{2}}}$

Part 2: Here, we have

${\displaystyle \lim _{x\to 1}{\frac {1}{x-1}}-{\frac {1}{\ln(x)}}=\lim _{x\to 1}{\frac {\ln(x)-x+1}{(x-1)\ln(x)}}\ {\overset {\frac {0}{0}}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to 1}{\frac {{\frac {1}{x}}-1}{\ln(x)+(x-1){\frac {1}{x}}}}=\lim _{x\to 1}{\frac {\frac {1-x}{x}}{\frac {x\ln(x)+x-1}{x}}}=\lim _{x\to 1}{\frac {1-x}{x\ln(x)+x-1}}\ {\overset {\frac {0}{0}}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to 1}{\frac {-1}{\ln(x)+1+1}}={\frac {-1}{0+1+1}}=-{\frac {1}{2}}}$

### Types ${\displaystyle 0^{0}}$, ${\displaystyle 0^{\infty }}$, ${\displaystyle \infty ^{0}}$ and ${\displaystyle 1^{\infty }}$

If one of the cases described occurs, we use the trick we have already used in the calculation of derivative of generalized power functions: We first write ${\displaystyle f^{g}}$ as ${\displaystyle \exp \circ (g\cdot \ln \circ f)}$. Since ${\displaystyle \exp }$ is continuous on all of ${\displaystyle \mathbb {R} }$, the limit can be "pulled inside". The limit formed there is now very often of the kind ${\displaystyle 0\cdot \pm \infty }$ and can be calculated as described above with the rules of L'Hopital.

Example (Limits via L’Hospital 6)

A common example is the limit

${\displaystyle \lim _{x\to 0+}x^{x}}$

This is a limit of type ${\displaystyle 0^{0}}$. As described above we re-formulate it into

${\displaystyle \lim _{x\to 0+}x^{x}=\lim _{x\to 0+}\exp(x\ln(x))}$

If we pull the limit into the exponential function, we get the limit value

${\displaystyle \lim _{x\to 0+}x\ln(x)}$

This is of type ${\displaystyle 0\cdot (-\infty )}$. Above we calculated it as follows

${\displaystyle \lim _{x\to 0+}x\ln(x)=\lim _{x\to 0+}{\frac {\ln(x)}{\frac {1}{x}}}\ {\overset {\frac {-\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to 0+}{\frac {\frac {1}{x}}{-{\frac {1}{x^{2}}}}}=\lim _{x\to 0+}-x=0}$

Because of continuity of ${\displaystyle \exp }$ we hence get

${\displaystyle \lim _{x\to 0+}x^{x}=\lim _{x\to 0+}\exp(x\ln(x))=\exp(\lim _{x\to 0+}x\ln(x))=\exp(0)=1}$

Hint

The limit ${\displaystyle \lim _{x\to 0+}x^{x}}$ is the main reason for setting ${\displaystyle 0^{0}=1}$ . It makes the function ${\displaystyle f:\mathbb {R} _{0}^{+}\to \mathbb {R} ,\ f(x)={\begin{cases}x^{x}&{\text{ for }}x\neq 0,\\1&{\text{ for }}x=0\end{cases}}}$ continuous at zero.

Hint

For two arbitrary functions ${\displaystyle f}$ and ${\displaystyle g}$ , the re-formulation trick reads:

${\displaystyle \lim _{x\to x_{0}}f(x)^{g(x)}=\lim _{x\to x_{0}}\exp[\ln(f(x))g(x)]}$

Exercise (Limits via L’Hospital 6)

Compute the following limits

1. ${\displaystyle \lim _{x\to \infty }x^{\frac {1}{x}}}$
2. ${\displaystyle \lim _{x\to 0+}x^{\sin(x)}}$

Solution (Limits via L’Hospital 6)

Part 1:

${\displaystyle \lim _{x\to \infty }x^{\frac {1}{x}}=\lim _{x\to \infty }\exp \left({\frac {\ln(x)}{x}}\right)\ {\underset {\text{continuous}}{\overset {\exp }{=}}}\ \exp \left(\lim _{x\to \infty }{\frac {\ln(x)}{x}}\right)\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \exp \left(\lim _{x\to \infty }{\frac {\frac {1}{x}}{1}}\right)=\exp \left(\lim _{x\to \infty }{\frac {1}{x}}\right)=\exp(0)=1}$

Part 2:

{\displaystyle {\begin{aligned}\lim _{x\to 0+}x^{\sin(x)}&=\lim _{x\to 0+}\exp \left(\sin(x)\ln(x)\right)\ {\underset {\text{continuous}}{\overset {\exp }{=}}}\ \exp \left(\lim _{x\to 0+}\sin(x)\ln(x)\right)=\exp \left(\lim _{x\to 0+}{\frac {\ln(x)}{\frac {1}{\sin(x)}}}\right)\ {\overset {\frac {-\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \exp \left(\lim _{x\to 0+}{\frac {\frac {1}{x}}{-{\frac {1}{\sin ^{2}(x)}}\cdot \cos(x)}}\right)\\&=\exp \left(\lim _{x\to 0+}-{\frac {\sin ^{2}(x)}{x\cos(x)}}\right)\ {\overset {\frac {0}{0}}{\underset {\text{L'H}}{=}}}\ \exp \left(\lim _{x\to 0+}-{\frac {2\sin(x)\cos(x)}{\cos(x)-x\sin(x)}}\right)=\exp \left({\frac {0}{1-0}}\right)=\exp(0)=1\end{aligned}}}

## Some warnings

However, it is not always useful to apply the rule of L'Hospital. In particular, it should not be applied if the conditions are not met. In this case, the hasty application of the rule may give a false result. We will discuss some warning examples to illustrate this.

### L’Hospital proofs can get tedious - there are also other ways

#### Growth of exponential and logarithm functions

Let us consider the limit value

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x^{k}}}}$ for ${\displaystyle \alpha >0}$ and ${\displaystyle k\in \mathbb {N} }$

This is of the type ${\displaystyle {\tfrac {\infty }{\infty }}}$ and L'Hospital is therefore applicable, which results in

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x^{k}}}{\overset {\text{L'H.}}{=}}\lim _{x\to \infty }{\frac {\alpha e^{\alpha x}}{kx^{k-1}}}}$

The limit is now again of type ${\displaystyle {\tfrac {\infty }{\infty }}}$. Repeating the rule, we obtain

${\displaystyle \lim _{x\to \infty }{\frac {\alpha e^{\alpha x}}{kx^{k-1}}}{\overset {\text{L'H.}}{=}}\lim _{x\to \infty }{\frac {\alpha ^{2}e^{\alpha x}}{k(k-1)x^{k-2}}}}$

When applying the rule of L'Hospital, we see the following pattern: the enumerator remains the same except for the pre-factor, but this does not change the divergence behaviour towards ${\displaystyle \infty }$. In the denominator the power of ${\displaystyle x}$ decreases by one in every step. If we apply the rule of L'Hospital ${\displaystyle k}$ times, we hence get

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x^{k}}}{\overset {\text{L'H.}}{=}}\lim _{x\to \infty }{\frac {\alpha e^{\alpha x}}{kx^{k-1}}}{\overset {\text{L'H.}}{=}}\lim _{x\to \infty }{\frac {\alpha ^{2}e^{\alpha x}}{k(k-1)x^{k-2}}}{\overset {\text{L'H.}}{=}}\ldots =\lim _{x\to \infty }{\frac {\alpha ^{k}e^{\alpha x}}{k!x^{0}}}=\lim _{x\to \infty }\underbrace {\frac {\alpha ^{k}}{k!}} _{\text{constant}}\underbrace {e^{\alpha x}} _{\to \infty }=\infty }$

But we could have achieved this result much faster and more elegantly. We have already shown above by only one application of L'Hospital

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {\alpha e^{\alpha x}}{1}}=\lim _{x\to \infty }\alpha e^{\alpha x}=\infty }$

for all ${\displaystyle \alpha >0}$. So we get

${\displaystyle \lim _{x\to \infty }{\frac {e^{\alpha x}}{x^{k}}}=\lim _{x\to \infty }\left({\frac {e^{{\frac {\alpha }{k}}x}}{x}}\right)^{k}=\infty }$

since ${\displaystyle {\tilde {\alpha }}={\tfrac {\alpha }{k}}>0}$.

Hint

The limit value states that every exponential function grows faster than every power function, no matter how large the power is.

Exercise (Limits via L’Hospital 7)

Determine for ${\displaystyle \alpha >0}$ and ${\displaystyle k\in \mathbb {N} }$ the limit

${\displaystyle \lim _{x\to \infty }{\frac {(\ln(x))^{k}}{x^{\alpha }}}}$

by

1. ${\displaystyle k}$-fold application of the rule of L'Hospital.
2. One-fold application of the rule of L'Hospital and smart re-formulation.

Solution (Limits via L’Hospital 7)

Part 1: The limit value is of type ${\displaystyle {\tfrac {\infty }{\infty }}}$ and L'Hospital is applicable. There is

${\displaystyle \lim _{x\to \infty }{\frac {(\ln(x))^{k}}{x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {k(\ln(x))^{k-1}\cdot {\frac {1}{x}}}{\alpha x^{\alpha -1}}}=\lim _{x\to \infty }{\frac {k(\ln(x))^{k-1}}{\alpha x^{\alpha }}}}$

The limit value is again of the type ${\displaystyle {\tfrac {\infty }{\infty }}}$, the power in the numerator decreases by one, that in the denominator remains the same. After ${\displaystyle k}$-fold application of L'Hospital we obtain

${\displaystyle \lim _{x\to \infty }{\frac {(\ln(x))^{k}}{x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\lim _{x\to \infty }{\frac {k(\ln(x))^{k-1}}{\alpha x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\lim _{x\to \infty }{\frac {k(k-1)(\ln(x))^{k-2}}{\alpha ^{2}x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ldots =\lim _{x\to \infty }{\frac {k!(\ln(x))^{0}}{\alpha ^{k}x^{\alpha }}}=\lim _{x\to \infty }\underbrace {\frac {k!}{\alpha ^{k}}} _{\text{constant}}\underbrace {\frac {1}{x^{\alpha }}} _{\to 0}=0}$

Part 2: There is

${\displaystyle \lim _{x\to \infty }{\frac {\ln(x)}{x^{\alpha }}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {\frac {1}{x}}{\alpha *x^{\alpha -1}}}=\lim _{x\to \infty }{\frac {1}{\alpha *x^{\alpha }}}=0}$

for all ${\displaystyle k\in \mathbb {N} }$. Hence

${\displaystyle \lim _{x\to \infty }{\frac {(\ln(x))^{k}}{x^{\alpha }}}=\lim _{x\to \infty }\left({\frac {\ln(x)}{x^{\frac {\alpha }{k}}}}\right)^{k}=0^{k}=0}$

As ${\displaystyle {\tilde {\alpha }}={\tfrac {\alpha }{k}}>0}$.

Hint

The limit value says that the logarithmic function grows slower than any power function, no matter how small the power is.

#### Growth of polynomial functions

Let us now consider the following limit value of a rational function for ${\displaystyle x\to \infty }$:

${\displaystyle \lim _{x\to \infty }{\frac {x^{3}-4x+1}{x^{3}-3x^{2}+2x-4}}}$

Here we have, because of ${\displaystyle \lim _{x\to \infty }x^{3}-4x+1=\infty =\lim _{x\to \infty }x^{3}-3x^{2}+2x-4}$ the type ${\displaystyle {\tfrac {\infty }{\infty }}}$, and by applying the rule of L'Hospital three times we obtain

${\displaystyle \lim _{x\to \infty }{\frac {x^{3}-4x+1}{x^{3}-3x^{2}+2x-4}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {3x^{2}-4}{3x^{2}-6x+2}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {6x}{6x-6}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H}}{=}}}\ \lim _{x\to \infty }{\frac {6}{6}}=1}$

Alternatively, the limit value can be calculated without L'Hospital by excluding and then shortening the highest power (${\displaystyle x^{3}}$):

${\displaystyle \lim _{x\to \infty }{\frac {x^{3}-4x+1}{x^{3}-3x^{2}+2x-4}}=\lim _{x\to \infty }{\frac {x^{3}(1-{\frac {4}{x^{2}}}+{\frac {1}{x^{3}}})}{x^{3}(1-{\frac {3}{x}}+{\frac {2}{x^{2}}}-{\frac {4}{x^{3}}})}}=\lim _{x\to \infty }{\frac {1-{\frac {4}{x^{2}}}+{\frac {1}{x^{3}}}}{1-{\frac {3}{x}}+{\frac {2}{x^{2}}}-{\frac {4}{x^{3}}}}}={\frac {1-0+0}{1-0+0-0}}=1}$

If now in general ${\displaystyle p(x)=x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}$ and ${\displaystyle q(x)=x^{n}+b_{n-1}x^{n-1}+\ldots +b_{1}x^{1}+b_{0}}$ are normalized polynomials, then there is again

${\displaystyle \lim _{x\to \infty }{\frac {p(x)}{q(x)}}=1}$

If we want to show this with the rule of L'Hospital, we have to apply it a total of ${\displaystyle n}$ times, and get

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {p(x)}{q(x)}}&=\lim _{x\to \infty }{\frac {x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{x^{n}+b_{n-1}x^{n-1}+\ldots +b_{1}x^{1}+b_{0}}}\\[0.3em]&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {nx^{n-1}+a_{n-1}(n-1)x^{n-2}+\ldots +a_{1}}{nx^{n-1}+b_{n-1}(n-1)x^{n-2}+\ldots +b_{1}}}\\[0.3em]&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {n(n-1)x^{n-2}+a_{n-1}(n-1)(n-2)x^{n-3}+\ldots +a_{2}}{n(n-1)x^{n-2}+b_{n-1}(n-1)(n-2)x^{n-3}+\ldots +b_{2}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{L’Hospital }}(n-2){\text{-fold}}\right.}\\[0.3em]&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {n(n-1)\cdot \ldots \cdot 2\cdot 1\cdot x^{0}}{n(n-1)\cdot \ldots \cdot 2\cdot 1\cdot x^{0}}}\\[0.3em]&=\lim _{x\to \infty }{\frac {n!}{n!}}\\[0.3em]&=\lim _{x\to \infty }1\\[0.3em]&=1\end{aligned}}}

To calculate the limit without L'Hospital, we can again factor out the highest power, i.e. ${\displaystyle x^{n}}$, and then calculate the limit value:

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {p(x)}{q(x)}}&=\lim _{x\to \infty }{\frac {x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{x^{n}+b_{n-1}x^{n-1}+\ldots +b_{1}x^{1}+b_{0}}}\\[0.3em]&=\lim _{x\to \infty }{\frac {x^{n}\cdot \left(1+{\frac {a_{n-1}}{x}}+\ldots +{\frac {a_{1}}{x^{n-1}}}+{\frac {a_{0}}{x^{n}}}\right)}{x^{n}\cdot \left(1+{\frac {b_{n-1}}{x}}+\ldots +{\frac {b_{1}}{x^{n-1}}}+{\frac {b_{0}}{x^{n}}}\right)}}\\[0.3em]&=\lim _{x\to \infty }{\frac {1+\overbrace {\frac {a_{n-1}}{x}} ^{\to 0}+\ldots +\overbrace {\frac {a_{1}}{x^{n-1}}} ^{\to 0}+\overbrace {\frac {a_{0}}{x^{n}}} ^{\to 0}}{1+\underbrace {\frac {b_{n-1}}{x}} _{\to 0}+\ldots +\underbrace {\frac {b_{1}}{x^{n-1}}} _{\to 0}+\underbrace {\frac {b_{0}}{x^{n}}} _{\to 0}}}\\[0.3em]&={\frac {1+0+\ldots +0+0}{1+0+\ldots +0+0}}\\[0.3em]&=1\end{aligned}}}

Exercise (Limits of rational functions)

Show for ${\displaystyle a_{n},b_{m}>0}$ that

${\displaystyle \lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{m}x^{m}+b_{m-1}x^{m-1}+\ldots +b_{1}x^{1}+b_{0}}}={\begin{cases}\infty &{\text{ if }}n>m,\\{\frac {a_{n}}{b_{n}}}&{\text{ if }}n=m,\\0&{\text{ if }}n

Solution (Limits of rational functions)

Fall 1: ${\displaystyle n>m}$

1st way: without L’Hospital

We factor out the greatest power ${\displaystyle x^{n}}$, and obtain

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{m}x^{m}+b_{m-1}x^{m-1}+\ldots +b_{1}x^{1}+b_{0}}}&=\lim _{x\to \infty }{\frac {x^{n}\cdot \left(a_{n}+a_{n-1}x^{-1}+\ldots +a_{1}x^{1-n}+a_{0}x^{-n}\right)}{x^{n}\cdot \left(b_{m}x^{m-n}+b_{m-1}x^{m-n+1}+\ldots +b_{1}x^{1-n}+b_{0}x^{-n}\right)}}\\[0.3em]&=\lim _{x\to \infty }{\frac {x^{n}\cdot \left(a_{n}+{\frac {a_{n-1}}{x}}+\ldots +{\frac {a_{1}}{x^{n-1}}}+{\frac {a_{0}}{x^{n}}}\right)}{x^{n}\cdot \left({\frac {b_{m}}{x^{n-m}}}+{\frac {b_{m-1}}{x^{n-m-1}}}+\ldots +{\frac {b_{1}}{x^{n-1}}}+{\frac {b_{0}}{x^{n}}}\right)}}\\[0.3em]&=\lim _{x\to \infty }{\frac {a_{n}+\overbrace {\frac {a_{n-1}}{x}} ^{\to 0}+\ldots +\overbrace {\frac {a_{1}}{x^{n-1}}} ^{\to 0}+\overbrace {\frac {a_{0}}{x^{n}}} ^{\to 0}}{\underbrace {\frac {b_{m}}{x^{n-m}}} _{\to 0}+\underbrace {\frac {b_{m-1}}{x^{n-m-1}}} _{\to 0}+\ldots +\underbrace {\frac {b_{1}}{x^{n-1}}} _{\to 0}+\underbrace {\frac {b_{0}}{x^{n}}} _{\to 0}}}\\[0.3em]&={\frac {a_{n}+0+\ldots +0+0}{0+0+\ldots +0+0}}\\[0.3em]&{\overset {\frac {a_{n}}{0+}}{=}}+\infty \end{aligned}}}

2nd way: with L’Hospital

We apply the rule of L'Hospital ${\displaystyle m}$ times, and get

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{m}x^{m}+b_{m-1}x^{m-1}+\ldots +b_{1}x^{1}+b_{0}}}&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {a_{n}nx^{n-1}+a_{n-1}(n-1)x^{n-2}+\ldots +a_{1}}{b_{m}mx^{m-1}+b_{m-1}(m-1)x^{m-2}+\ldots +b_{1}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{L’Hospital }}(m-1){\text{-fold}}\right.}\\[0.3em]&=\lim _{x\to \infty }{\frac {n(n-1)\cdot \ldots \cdot (n-m)x^{n-m}}{m!x^{0}}}\\[0.3em]&{\overset {\frac {+\infty }{n!}}{=}}+\infty \end{aligned}}}

Fall 2: ${\displaystyle n=m}$

1st way: without L’Hospital

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{n}x^{n}+b_{n-1}x^{n-1}+\ldots +b_{1}x^{1}+b_{0}}}&=\lim _{x\to \infty }{\frac {x^{n}\cdot \left(a_{n}+{\frac {a_{n-1}}{x}}+\ldots +{\frac {a_{1}}{x^{n-1}}}+{\frac {a_{0}}{x^{n}}}\right)}{x^{n}\cdot \left(b_{n}+{\frac {b_{n-1}}{x}}+\ldots +{\frac {b_{1}}{x^{n-1}}}+{\frac {b_{0}}{x^{n}}}\right)}}\\[0.3em]&=\lim _{x\to \infty }{\frac {a_{n}+{\frac {a_{n-1}}{x}}+\ldots +{\frac {a_{1}}{x^{n-1}}}+{\frac {a_{0}}{x^{n}}}}{b_{n}+{\frac {b_{n-1}}{x}}+\ldots +{\frac {b_{1}}{x^{n-1}}}+{\frac {b_{0}}{x^{n}}}}}\\[0.3em]&={\frac {a_{n}+0+\ldots +0+0}{b_{n}+0+\ldots +0+0}}\\[0.3em]&={\frac {a_{n}}{b_{n}}}\end{aligned}}}

2nd way: with L’Hospital

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{n}x^{n}+b_{n-1}x^{n-1}+\ldots +b_{1}x^{1}+b_{0}}}&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {a_{n}nx^{n-1}+a_{n-1}(n-1)x^{n-2}+\ldots +a_{1}}{b_{n}nx^{n-1}+b_{n-1}(n-1)x^{n-2}+\ldots +b_{1}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{L’Hospital }}(n-1){\text{-fold}}\right.}\\[0.3em]&=\lim _{x\to \infty }{\frac {n!a_{n}x^{0}}{n!b_{n}x^{0}}}\\[0.3cm]&={\frac {a_{n}}{b_{n}}}\end{aligned}}}

Fall 3: ${\displaystyle n

1st way: without L’Hospital

We factor out the greatest power ${\displaystyle x^{m}}$, and obtain

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{m}x^{m}+b_{m-1}x^{m-1}+\ldots +b_{1}x^{1}+b_{0}}}&=\lim _{x\to \infty }{\frac {x^{m}\cdot \left({\frac {a_{n}}{x^{m-n}}}+{\frac {a_{n-1}}{x^{m-n-1}}}+\ldots +{\frac {a_{1}}{x^{m-1}}}+{\frac {a_{0}}{x^{m}}}\right)}{x^{m}\cdot \left(b_{m}+{\frac {b_{m-1}}{x}}+\ldots +{\frac {b_{1}}{x^{m-1}}}+{\frac {b_{0}}{x^{m}}}\right)}}\\[0.3em]&=\lim _{x\to \infty }{\frac {{\frac {a_{n}}{x^{m-n}}}+{\frac {a_{n-1}}{x^{m-n-1}}}+\ldots +{\frac {a_{1}}{x^{m-1}}}+{\frac {a_{0}}{x^{m}}}}{b_{m}+{\frac {b_{m-1}}{x}}+\ldots +{\frac {b_{1}}{x^{m-1}}}+{\frac {b_{0}}{x^{m}}}}}\\[0.3em]&={\frac {0+0+\ldots +0+0}{b_{m}+0+\ldots +0+0}}\\[0.3em]&=0\end{aligned}}}

2nd way: with L’Hospital

We apply the rule of L'Hospital ${\displaystyle n}$ times, and get

{\displaystyle {\begin{aligned}\lim _{x\to \infty }{\frac {a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x^{1}+a_{0}}{b_{m}x^{m}+b_{m-1}x^{m-1}+\ldots +b_{1}x^{1}+b_{0}}}&{\underset {\text{L'H.}}{\overset {\frac {\infty }{\infty }}{=}}}\lim _{x\to \infty }{\frac {a_{n}nx^{n-1}+a_{n-1}(n-1)x^{n-2}+\ldots +a_{1}}{b_{m}mx^{m-1}+b_{m-1}(m-1)x^{m-2}+\ldots +b_{1}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{L’Hospital }}(n-1){\text{-fold}}\right.}\\[0.3em]&=\lim _{x\to \infty }{\frac {n!x^{0}}{m(m-1)\cdot \ldots \cdot (m-n)x^{m-n}}}\\[0.3em]&{\overset {\frac {n!}{\infty }}{=}}0\end{aligned}}}

### L’Hospital proof might fail

In this section we will present some examples of limit values where the rule of L'Hospital "fails". This can happen because the rule of L'Hospital is a sufficient but not a necessary condition for the existence of the limit value ${\displaystyle \lim _{x\to a}{\tfrac {f(x)}{g(x)}}}$.

#### infinite loops

Sometimes the rule of L'Hospital can go in an "infinite loop". An example is

${\displaystyle \lim _{x\to \infty }{\frac {e^{x}+e^{-x}}{e^{x}-e^{-x}}}}$

This limit is of the type ${\displaystyle {\tfrac {\infty }{\infty }}}$, and L'Hospital is applicable. If we do so, we will obtain

${\displaystyle \lim _{x\to \infty }{\frac {e^{x}+e^{-x}}{e^{x}-e^{-x}}}\ {\overset {\text{L'H.}}{=}}\ \lim _{x\to \infty }{\frac {e^{x}-e^{-x}}{e^{x}+e^{-x}}}}$

The resulting limit value is now again of the type ${\displaystyle {\tfrac {\infty }{\infty }}}$. If we look more closely, we see that the enumerator and denominator have been changed by the use of L'Hospital. If we now apply the rule again, the result is

${\displaystyle \lim _{x\to \infty }{\frac {e^{x}-e^{-x}}{e^{x}+e^{-x}}}\ {\overset {\text{L'H.}}{=}}\ \lim _{x\to \infty }{\frac {e^{x}+e^{-x}}{e^{x}-e^{-x}}}}$

The original limit value is therefore not changed. The rule of L'Hospital therefore does not help us with this limit value! The reason is that exponentials do not change under differentiation. However, there is a relatively simple way to reach the destination without L'Hospital:

If we factor out ${\displaystyle e^{x}}$ from the numerator and denominator, and then shorten it, we get

${\displaystyle \lim _{x\to \infty }{\frac {e^{x}+e^{-x}}{e^{x}-e^{-x}}}=\lim _{x\to \infty }{\frac {e^{x}(1-e^{-2x})}{e^{x}(1+e^{-2x})}}=\lim _{x\to \infty }{\frac {1-e^{-2x}}{1+e^{-2x}}}={\frac {1-\lim _{x\to \infty }e^{-2x}}{1+\lim _{x\to \infty }e^{-2x}}}={\frac {1+0}{1-0}}=1}$

Exercise (Limits without L’Hospital 1)

Determine the limit

${\displaystyle \lim _{x\to \infty }{\frac {x}{\sqrt {x^{2}+1}}}}$

What is the problem in applying the rule of L'Hospital?

Solution (Limits without L’Hospital 1)

By factoring out ${\displaystyle x^{2}}$ in the denominator we obtain

${\displaystyle \lim _{x\to \infty }{\frac {x}{\sqrt {x^{2}+1}}}=\lim _{x\to \infty }{\frac {x}{\sqrt {x^{2}\cdot \left(1+{\frac {1}{x^{2}}}\right)}}}=\lim _{x\to \infty }{\frac {x}{{\sqrt {x^{2}}}\cdot {\sqrt {1+{\frac {1}{x^{2}}}}}}}=\lim _{x\to \infty }{\frac {x}{x\cdot {\sqrt {1+{\frac {1}{x^{2}}}}}}}=\lim _{x\to \infty }{\frac {1}{\underbrace {\sqrt {1+{\frac {1}{x^{2}}}}} _{\to {\sqrt {1+0}}}}}={\frac {1}{\sqrt {1}}}=1}$

The application of the rule of L'Hospital leads into an endless loop, because

${\displaystyle \lim _{x\to \infty }{\frac {x}{\sqrt {x^{2}+1}}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to \infty }{\frac {1}{\frac {2x}{2{\sqrt {x^{2}+1}}}}}=\lim _{x\to \infty }{\frac {\sqrt {x^{2}+1}}{x}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H.}}{=}}}\ \lim _{x\to \infty }{\frac {\frac {2x}{2{\sqrt {x^{2}+1}}}}{1}}=\lim _{x\to \infty }{\frac {x}{\sqrt {x^{2}+1}}}\ {\overset {\frac {\infty }{\infty }}{\underset {\text{L'H.}}{=}}}\ \ldots }$

#### L’Hospital makes divergence worse

It may also happen that the use of L'Hospital actually "makes the situation worse". In other words, a limit value that exists can be transformed by applying the rule into a limit value that no longer exists. Therefore always note: From ${\displaystyle \lim _{x\to a}{\tfrac {f'(x)}{g'(x)}}=c}$ we get ${\displaystyle \lim _{x\to a}{\tfrac {f(x)}{g(x)}}=c}$, but not vice versa. In particular, the fact that ${\displaystyle \lim _{x\to a}{\tfrac {f'(x)}{g'(x)}}}$ does not exist, does not imply that ${\displaystyle \lim _{x\to a}{\tfrac {f(x)}{g(x)}}}$ does not exist. Let us look at

${\displaystyle \lim _{x\to \infty }{\frac {2x+\sin(x)}{2x-\sin(x)}}}$

There is ${\displaystyle 2x\pm \sin(x)\geq 2x-1\to \infty }$. Therefore we have a type ${\displaystyle {\tfrac {\infty }{\infty }}}$ . Application of L'Hospital now renders

${\displaystyle \lim _{x\to \infty }{\frac {2x+\sin(x)}{2x-\sin(x)}}\ {\overset {\text{L'H.}}{=}}\ \lim _{x\to \infty }{\frac {2+\cos(x)}{2-\cos(x)}}}$

Now we have a problem because this limit value does not exist. Let us look at the sequences ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$ with

${\displaystyle x_{n}=n\pi }$

This certainly diverges to ${\displaystyle \infty }$. However, there is

${\displaystyle \lim _{n\to \infty }{\frac {2+\cos(x_{n})}{2-\cos(x_{n})}}=\lim _{n\to \infty }{\frac {n\pi +(-1)^{n+1}}{n\pi -(-1)^{n+1}}}}$

This limit value does not exist (not even improperly), since ${\displaystyle (-1)^{n+1}}$ diverges. This means that L'Hospital is inapplicable here too. That the original limit value does exist can be seen from the following conversion trick: Because of ${\displaystyle \lim _{x\to \infty }{\tfrac {\sin(x)}{x}}=0}$ there is

${\displaystyle \lim _{x\to \infty }{\frac {2x+\sin(x)}{2x-\sin(x)}}=\lim _{x\to \infty }{\frac {x(2+{\frac {\sin(x)}{x}})}{x(2-{\frac {\sin(x)}{x}})}}=\lim _{x\to \infty }{\frac {2+{\frac {\sin(x)}{x}}}{2-{\frac {\sin(x)}{x}}}}={\frac {2+0}{2-0}}=1}$

Exercise (Limits without L’Hospital 2)

Determine

${\displaystyle \lim _{x\to 0}{\frac {x^{2}\sin({\tfrac {1}{x}})}{x+\sin(x)}}}$

What is the problem in applying the rule of L'Hospital?

Solution (Limits without L’Hospital 2)

First there is with a simple re-formulation trick

${\displaystyle \lim _{x\to 0}{\frac {x^{2}\sin({\tfrac {1}{x}})}{x+\sin(x)}}=\lim _{x\to 0}{\frac {x\cdot x\cdot \sin({\tfrac {1}{x}})}{x+\sin(x)}}=\lim _{x\to 0}{\frac {x\cdot \sin({\tfrac {1}{x}})}{{\tfrac {1}{x}}\cdot (x+\sin(x))}}=\lim _{x\to 0}{\frac {x\cdot \sin({\tfrac {1}{x}})}{{\tfrac {1}{x}}\cdot (x+\sin(x))}}=\lim _{x\to 0}{\frac {x\cdot \sin({\tfrac {1}{x}})}{1+{\tfrac {\sin(x)}{x}}}}}$

Further, on the one hand ${\displaystyle \lim _{x\to 0}x\cdot \sin({\tfrac {1}{x}})=0}$, which follows directly from the estimation ${\displaystyle 0\leq \left|x\cdot \sin({\tfrac {1}{x}})\right|\leq |x|{\overset {x\to 0}{\to }}0}$. On the other hand ${\displaystyle \lim _{x\to 0}{\tfrac {\sin(x)}{x}}=1}$, which we have shown with the rule of L'Hospital above.

In total we get

${\displaystyle \lim _{x\to 0}{\frac {x^{2}\sin({\tfrac {1}{x}})}{x+\sin(x)}}=\lim _{x\to 0}{\frac {\overbrace {x\cdot \sin({\tfrac {1}{x}})} ^{\to 0}}{1+\underbrace {\tfrac {\sin(x)}{x}} _{\to 1}}}={\frac {0}{1+1}}=0}$

If we apply the rule of L'Hospital, which is allowed since the limit value is of the type ${\displaystyle {\tfrac {0}{0}}}$, we obtain

${\displaystyle \lim _{x\to 0}{\frac {x^{2}\sin({\tfrac {1}{x}})}{x+\sin(x)}}{\underset {\text{L'H.}}{\overset {\frac {0}{0}}{=}}}\lim _{x\to 0}{\frac {2x\sin({\tfrac {1}{x}})+x^{2}\cos({\tfrac {1}{x}})\cdot (-{\tfrac {1}{x^{2}}})}{1+\cos(x)}}=\lim _{x\to 0}{\frac {\overbrace {2x\sin({\tfrac {1}{x}})} ^{\to 0}-\overbrace {\cos({\tfrac {1}{x}})} ^{(*)}}{1+\underbrace {\cos(x)} _{\to 1}}}}$

This limit now diverges because the (${\displaystyle *}$) expression for ${\displaystyle x\to 0}$ diverges. Namely, for the null sequence ${\displaystyle x_{n}={\frac {1}{n\pi }}}$ there is ${\displaystyle \cos({\tfrac {1}{x_{n}}})=\cos(n\pi )=(-1)^{n+1}}$. So the application of L'Hospital was again unsuccessful!

### L’Hospital may render a wrong result

This can happen whenever the rule is applied although the conditions not are met. An example is

${\displaystyle \lim _{x\to \pi }{\frac {\sin(x)}{x}}}$

Look carefully, in this case ${\displaystyle x}$ converges towards ${\displaystyle \pi }$, not ${\displaystyle 0}$! Since enumerator and denominator are continuous in ${\displaystyle \pi }$, there is

${\displaystyle \lim _{x\to \pi }{\frac {\sin(x)}{x}}={\frac {\sin(\pi )}{\pi }}={\frac {0}{\pi }}=0}$

L'Hospital is not applicable in the case of ${\displaystyle {\frac {0}{\pi }}}$ . If you apply the rule anyway, you will get the false result

${\displaystyle \lim _{x\to \pi }{\frac {\sin(x)}{x}}\ {\color {Red}{\overset {\text{false}}{=}}}\ \lim _{x\to \pi }{\frac {\cos(x)}{1}}={\frac {\cos(\pi )}{1}}={\frac {-1}{1}}=-1}$

Therefore you should always check first whether the rule of L'Hospital is applicable or whether it is even necessary at all.

Exercise (Limits without 3)

Determine the limits

1. ${\displaystyle \lim _{x\to 0-}{\frac {\cos(x)}{x}}}$
2. ${\displaystyle \lim _{x\to 0+}x^{\frac {1}{x}}}$

What are the limits resulting from the incorrect application of the L'Hospital rule?

Solution (Limits without 3)

Part 1: Inserting results in

${\displaystyle \lim _{x\to 0-}{\frac {\overbrace {\cos(x)} ^{\to \cos(0)=1}}{\underbrace {x} _{\to 0-}}}=-\infty }$

Since the limit value is of the type ${\displaystyle {\frac {1}{0}}}$, L'Hospital is not applicable. If we apply the rule anyway, we get the false result

${\displaystyle \lim _{x\to 0-}{\frac {\cos(x)}{x}}\ {\color {Red}{\overset {\text{false}}{=}}}\ \lim _{x\to 0-}{\frac {-\sin(x)}{1}}={\frac {-\sin(0)}{1}}={\frac {0}{1}}=0}$

Part 2: Since the limit value is of the type ${\displaystyle 0^{\infty }}$, we first use our standard re-formulation trick

${\displaystyle \lim _{x\to 0+}x^{\frac {1}{x}}=\lim _{x\to 0+}e^{\ln(x)\cdot {\frac {1}{x}}}=\lim _{x\to 0+}e^{\frac {\ln(x)}{x}}}$

For the expression in the exponent there is now ${\displaystyle \lim _{x\to 0+}{\frac {\overbrace {\ln(x)} ^{\to -\infty }}{\underbrace {x} _{\to 0+}}}=-\infty }$. Because of ${\displaystyle \lim _{x\to -\infty }e^{x}=0}$ the result is

${\displaystyle \lim _{x\to 0+}x^{\frac {1}{x}}=\lim _{x\to 0+}e^{\frac {\ln(x)}{x}}=0}$

In Exponent, L'Hospital is again not applicable. If we apply the rule anyway, we get

${\displaystyle \lim _{x\to 0+}{\frac {\ln(x)}{x}}\ {\color {Red}{\overset {\text{false}}{=}}}\ \lim _{x\to 0+}{\frac {\frac {1}{x}}{1}}=\lim _{x\to 0+}{\frac {1}{x}}=+\infty }$

Because of ${\displaystyle \lim _{x\to \infty }e^{x}=+\infty }$ the following false result follows

${\displaystyle \lim _{x\to 0+}x^{\frac {1}{x}}=\lim _{x\to 0+}e^{\frac {\ln(x)}{x}}\ {\color {Red}{\overset {\text{false}}{=}}}\ +\infty }$

## Implication: sufficient criterion for differentiability

Theorem (Criterion for differentiability)

Let ${\displaystyle I\subseteq \mathbb {R} }$ be an open interval and ${\displaystyle a\in I}$. Further let ${\displaystyle f:I\to \mathbb {R} }$ be continuous in ${\displaystyle I}$ and differentiable in ${\displaystyle I\setminus \{a\}}$. In addition, let there be ${\displaystyle \lim \limits _{x\to a}f'(x)=c}$. Then f is differentiable also at ${\displaystyle a}$ and there is ${\displaystyle f'(a)=c}$.

Proof (Criterion for differentiability)

We have to show:

${\displaystyle f'(a)=\lim _{h\to 0}{\frac {f(a+h)-f(a)}{h}}=c}$

Now is ${\displaystyle \lim _{h\to 0}f(a+h)-f(a){\overset {f{\text{ continuous}}}{=}}f(a)-f(a)=0}$ and ${\displaystyle \lim _{h\to 0}h=0}$. Furthermore, ${\displaystyle {\tilde {f}}(h)=f(a+h)-f(a)}$ and ${\displaystyle {\tilde {g}}(h)=h}$ are differentiable for ${\displaystyle h\neq 0}$, and ${\displaystyle {\tilde {g}}'(h)=1\neq 0}$. With the rule of L'Hospital we obtain

${\displaystyle \lim _{h\to 0}{\frac {f(a+h)-f(a)}{h}}=\lim _{h\to 0}{\frac {f'(a+h)}{1}}{\overset {\lim \limits _{x\to a}f'(x)=c}{=}}c}$

Thus ${\displaystyle f}$ is differentiable at ${\displaystyle a}$ with ${\displaystyle f'(a)=c}$.

Alternative proof (Criterion for differentiability)

We can also use the mean value theorem to show

${\displaystyle f'(a)=\lim _{x\to a}{\frac {f(x)-f(a)}{x-a}}=c}$

Let for this be ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$ a sequence in ${\displaystyle I}$ with ${\displaystyle \lim _{n\to \infty }x_{n}=a}$. Then ${\displaystyle f}$ according to the precondition for all ${\displaystyle n\in \mathbb {N} }$ is continuous on ${\displaystyle [a,x_{n}]}$ (or ${\displaystyle [x_{n},a]}$) and differentiable on ${\displaystyle (a,x_{n})}$ (or ${\displaystyle (x_{n},a)}$). According to the mean value theorem there is for all ${\displaystyle n\in \mathbb {N} }$ a ${\displaystyle \xi _{n}\in (a,x_{n})}$ (or ${\displaystyle (x_{n},a)}$) with

${\displaystyle {\frac {f(x_{n})-f(a)}{x_{n}-a}}=f'(\xi _{n})}$

Since now ${\displaystyle x_{n}\to a}$ and ${\displaystyle \xi _{n}\in [a,x_{n}]\iff a\leq \xi _{n}\leq x_{n}}$ (or ${\displaystyle \xi _{n}\in [x_{n},a]\iff x_{n}\leq \xi _{n}\leq a}$), there is also ${\displaystyle \xi _{n}\to a}$. Because of ${\displaystyle \lim _{x\to a}f'(x)=c}$ it follows that ${\displaystyle \lim _{n\to \infty }f'(\xi _{n})=c}$. So we get

${\displaystyle \lim _{n\to \infty }{\frac {f(x_{n})-f(a)}{x_{n}-a}}=\lim _{n\to \infty }f'(\xi _{n})=c}$

Since ${\displaystyle (x_{n})}$ with ${\displaystyle x_{n}\to a}$ was arbitrary, we obtain

${\displaystyle f'(a)=\lim _{x\to a}{\frac {f(x)-f(a)}{x-a}}=c}$

Hint

A function that fulfils the criterion from the theorem is not only differentiable at the point ${\displaystyle a}$. Because of ${\displaystyle \lim _{x\to a}f'(x)=c=f'(a)}$ the derivative function is even continuous in ${\displaystyle a}$. Therefore the criterion is sufficient and not necessary for the differentiability in ${\displaystyle a}$.

Question: Give an example of a differentiable function that does not satisfy the conditions of the theorem.

We are looking for a differentiable function whose derivative is not continuous at one point. An example (among many) is the function

${\displaystyle f:\mathbb {R} \to \mathbb {R} ,\ f(x)={\begin{cases}x^{2}\sin({\tfrac {1}{x}})&{\text{ for }}x\neq 0,\\0&{\text{ for }}x=0.\end{cases}}}$

It has at ${\displaystyle a=0}$ the derivative ${\displaystyle f'(0)=0}$, but is not continuous there, as the limit

${\displaystyle \lim _{x\to 0 \atop x\neq 0}f'(x)=\lim _{x\to 0 \atop x\neq 0}\left[2x\sin({\tfrac {1}{x}})-\cos({\tfrac {1}{x}})\right]}$

does not exist.

Exercise (Differentiability of the Si-function)

Let

${\displaystyle f:\mathbb {R} \to \mathbb {R} ,\ f(x)={\begin{cases}{\frac {\sin(x)}{x}}&{\text{ for }}x\neq 0,\\1&{\text{ for }}x=0\end{cases}}}$

Show, without using the differential quotient, that ${\displaystyle f}$ is differentiable at zero and calculate the derivative ${\displaystyle f'(0)}$.

Solution (Differentiability of the Si-function)

Step 1: ${\displaystyle f}$ is continuous at zero

By L’Hospital there is

${\displaystyle \lim _{x\to 0}f(x)=\lim _{x\to 0}{\frac {\sin(x)}{x}}{\underset {\text{l.H.}}{\overset {\tfrac {0}{0}}{=}}}\lim _{x\to 0}{\frac {\cos(x)}{1}}=1=f(0)}$

So ${\displaystyle f}$ is continuous at zero.

Step 2: ${\displaystyle f}$ is differentiable on ${\displaystyle \mathbb {R} \setminus \{0\}}$

Since ${\displaystyle \sin }$ and ${\displaystyle x\mapsto x}$ are differentiable on ${\displaystyle \mathbb {R} \setminus \{0\}}$, the function ${\displaystyle f}$ is also differentiable there, by the quotient rule. Further there is for ${\displaystyle x\neq 0}$:

${\displaystyle f'(x)={\frac {\cos(x)\cdot x-\sin(x)\cdot 1}{x^{2}}}={\frac {x\cos(x)-\sin(x)}{x^{2}}}}$

Step 3: ${\displaystyle f}$ is differentiable at zero

We use the criterion from the previous theorem. (Because of Step 1 and 2, it is applicable.) There is

${\displaystyle \lim _{x\to 0}f'(x)=\lim _{x\to 0}{\frac {x\cos(x)-\sin(x)}{x^{2}}}{\underset {\text{l.H.}}{\overset {\tfrac {0}{0}}{=}}}\lim _{x\to 0}{\frac {\cos(x)-x\sin(x)-\cos(x)}{2x}}=\lim _{x\to 0}{\frac {-x\sin(x)}{2x}}{\underset {\text{l.H.}}{\overset {\tfrac {0}{0}}{=}}}\lim _{x\to 0}{\frac {-\sin(x)-x\cos(x)}{2}}=0}$

According to the criterion, ${\displaystyle f}$ is differentiable at zero with ${\displaystyle f'(0)=0}$.