L'Hopital's Rule

Introduction Mean Value Theorem Taylor Series L'Hopital's Rule
Embodied Symbolic Formal
Embodied
Symbolic
Formal



In introductory calculus we learned that we may use differentiation to sketch the graphs of functions.

Practically, we may instead plot graphs numerically with/without the aid of computers.

Find out the value of the desired function at a point by calculation or by using graphs of simpler functions, then repeat for as many points as you like.




Examples.

  1. $y=\sin x+\cos x$.


  2. $y=x \sin x$.

The following functions are undefined at $x=0$.

Therefore, we cannot find their limits at $x=0$ using "direct substitution".

However, we may still guess the limits by looking at their graphs.


  1. $\displaystyle \lim\limits_{x\to 0}x \ln x=$


  2. $\displaystyle \lim\limits_{x\to 0}\frac{\ln \sin 2x}{\ln \sin x}=$


  3. $\displaystyle \lim\limits_{x\to 0}\frac{\ln (1+x)-x\cos x}{x^2}=$

We learned two limit theorems:

$$\lim_{x\to 0} \frac{\sin x}{x}=1, \quad \lim_{x\to 0} \frac{e^x-1}{x}=1$$

Why are they true?


Hint:




Let $h(x)=\frac{f(x)}{g(x)}$.

Intuitively, we want to write $\lim\limits_{x\to a}h(x)=\frac{\lim\limits_{x\to a}f(x)}{\lim\limits_{x\to a}g(x)}$. $\quad \quad \quad \textbf{(1)}$

However, if $\lim\limits_{x\to a}f(x)=\lim\limits_{x\to a}g(x)=0, \textbf{(1)}$ clearly does not hold.

Not only is the expression $\frac{0}{0}$ undefined, we are also unable to make any conclusion on $\lim\limits_{x\to a}h(x)$.


The following demonstrates two examples where $\lim\limits_{x\to a}f(x)=\lim\limits_{x\to a}g(x)=0$ in both examples but $\lim\limits_{x\to a}h(x)$ are clearly different.

  1. $f(x)=\sin x, g(x)=x, x\to 0, \lim\limits_{x\to 0}\frac{f(x)}{g(x)}=1$.
  2. $f(x)=-\sin x, g(x)=x, x\to 0, \lim\limits_{x\to 0}\frac{f(x)}{g(x)}=-1$.

When $\lim\limits_{x\to a}f(x)=\lim\limits_{x\to a}g(x)=0$, the limit $\lim\limits_{x\to a}\frac{f(x)}{g(x)}$ is said to lead to $\frac{0}{0}$ (an indeterminate form).

Other indeterminate forms are $\dfrac{\infty}{\infty},~0 \times \infty,~\infty - \infty,~0^0,~1^{\infty}~{\rm{and}}~\infty^{0}$.

In this part, we shall explore how different indeterminate forms can be converted into $\frac{0}{0}$ form.

  1. $\frac{\infty}{\infty}, \quad 0\times \infty, \quad \infty - \infty$ forms.

    A. $ \quad \frac{f(x)}{\frac{1}{g(x)}}$ B. $ \quad \frac{\frac{1}{g(x)}-\frac{1}{f(x)}}{\frac{1}{f(x)g(x)}}$ C. $ \quad \frac{\frac{1}{g(x)}}{\frac{1}{f(x)}}$

    indeterminate form (before) $\lim\limits_{x\to a}f(x)$ $\lim\limits_{x\to a}g(x)$ target limit $\lim\limits_{x\to a}h(x)$ transformation indeterminate form (after)
    $\frac{\infty}{\infty}$ $\infty$ $\infty$ $h(x)=\frac{f(x)}{g(x)}$ $h(x)=$ $\frac{0}{0}$
    $0\times \infty$ $0$ $\infty$ $h(x)=f(x)g(x)$ $h(x)=$ $\frac{0}{0}$
    $\infty - \infty$ $\infty$ $\infty$ $h(x)=f(x)-g(x)$ $h(x)=$ $\frac{0}{0}$


  2. $0^0, \quad 1^\infty, \quad \infty^0$ forms.

    Note that if $\displaystyle \lim_{x\to a} \ln h(x)=L$, then $\displaystyle \lim_{x\to a} h(x)=e^L$.

    indeterminate form (before) $\lim\limits_{x\to a}f(x)$ $\lim\limits_{x\to a}g(x)$ target limit $\lim\limits_{x\to a}h(x)$ transformation indeterminate form (after)
    $0^0$ $0$ $0$ $h(x)=f(x)^{g(x)}$ $\ln h(x)=g(x) \ln f(x)$ $0 \times \infty$
    $1^\infty$ $1$ $\infty$ $h(x)=f(x)^{g(x)}$ $\ln h(x)=g(x) \ln f(x)$ $\infty \times 0$
    $\infty^0$ $\infty$ $0$ $h(x)=f(x)^{g(x)}$ $\ln h(x)=g(x) \ln f(x)$ $0 \times \infty$



Exercises.

Determine whether the following limits are indeterminate. For those that are indeterminate, identify their indeterminate forms. (work out how to convert them into $\frac{0}{0}$ form by yourself!)

  1. $\lim\limits_{x\to 0}x^x$
  2. $\lim\limits_{x\to 0}\frac{5\sin x-7 \sin 2x+3\sin 3x}{\tan x-x}$
  3. $\lim\limits_{x\to 1}(1-x)\tan(\frac{\pi x}{2})$
  4. $\lim\limits_{x\to 0}(\frac{1}{x^2}-\csc^2 x)$
  5. $\lim\limits_{x\to 0}\frac{\sin x - \cos x}{\sin x + \cos x}$
  6. $\lim\limits_{x\to 0}\frac{\ln x}{\cot x}$
  7. $\lim\limits_{x\to 0}\frac{\ln(1+x^2)}{1-\cos x}$
  8. $\lim\limits_{x\to 0}\frac{e^x+\ln (1-x)-1}{\tan x-x}$
  9. $\lim\limits_{x\to \frac{\pi}{2}}(\tan x)^{\cos x}$

In this part, we shall explore how Taylor series expansions lead to the result of L'Hopital's Rule. (For a proof, visit part 9)

Examples.

Expand $\sin x, \quad \cos x, \quad \sin ^2 x, \quad \cos ^2 x, \quad \ln (1+x)$ and $e^x$ as Taylor series around $x=0$. Hence, find the following limits.

  1. $\lim\limits_{x\to 0} \frac{x-\sin x}{x^3}$.
  2. $\lim\limits_{x\to 0}\frac{x \cos x-\ln(1+x)}{x^2}$.
  3. $\lim\limits_{x\to 0} \frac{\cos x-\ln(1+x)+\sin x -1}{e^x-(1+x)}$.
  4. $\lim\limits_{x\to 0} (\frac{1}{x^2}-\cot^2 x)$.
  5. $\lim\limits_{x\to 0} \frac{x^{1/2}\tan x}{(e^x-1)^{3/2}}$.

Solution.

Taylor series expansions:

  1. $x-\frac{x^2}{2}+\frac{x^3}{6}+\cdots$
  2. $1+x+\frac{x^2}{2}+\frac{x^3}{6}+\cdots$
  3. $1-x^2+\frac{x^4}{3}-\frac{2x^6}{45}+\cdots$
  4. $x^2-\frac{x^4}{3}+\frac{2x^6}{45}-\cdots$
  5. $x-\frac{x^3}{6}+\frac{x^5}{120}-\cdots$
  6. $1-\frac{x^2}{2}+\frac{x^4}{24}-\cdots$
$\sin x$ $\cos x$ $\sin ^2 x$ $\cos ^2 x$ $\ln (1+x)$ $e^x$



In this part, we will try to visualize the meaning of L'Hopital's Rule.


L'Hopital's Rule ($\frac{0}{0}$ form) states that if $\lim\limits_{x\to a}f(x)=\lim\limits_{x\to a}g(x)=0$, then $\lim\limits_{x\to a}\frac{f(x)}{g(x)}=\lim\limits_{x\to a}\frac{f'(x)}{g'(x)}$.

Examples.

  1. $f(x)=\sin x, g(x)=x, a=0$. Then $\lim\limits_{x\to 0}\frac{\sin x}{x}=\lim\limits_{x\to 0}\frac{\cos x}{1}=1$.
  2. $f(x)=e^x-1, g(x)=x, a=0$. Then $\lim\limits_{x\to 0}\frac{e^x-1}{x}=\lim\limits_{x\to 0}\frac{e^x}{1}=1$.

In this part, we shall see how L'Hopital's Rule can be used to evaluate limits.


Exercises.

Find the values of the following limits. (Try to solve them by yourself before reading the solution! Hint: see part 5)

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

  2. $\lim\limits_{x\to 0} \frac{\cos x-\ln(1+x)+\sin x -1}{e^x-(1+x)}$

  3. $\lim\limits_{x\to 0} \frac{\ln x}{\cot x}$

  4. $\lim\limits_{x\to 1} (1-x)\tan(\frac{\pi x}{2})$

  5. $\lim\limits_{x\to 0}(\frac{1}{x^2}-\csc^2 x)$

  6. $\lim\limits_{x\to 0}x^x$

  7. $\lim\limits_{x\to \frac{\pi}{2}} (\tan x)^{\cos x}$

Theorem. (L'Hopital's Rule, $\frac{0}{0}$ form)



Let $f(x)$ and $g(x)$ be differentiable functions in a neighbourhood of $x=a$ such that $f(a)=g(a)=0$. Then $\displaystyle \lim_{x\to a} \frac{f(x)}{g(x)}=\lim_{x\to a} \frac{f'(x)}{g'(x)}.$

Proof.

By Taylor's Theorem,

$$\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f(a)+(x-a)f'(a)+\frac{(x-a)^2}{2!}f''(c)}{g(a)+(x-a)g'(a)+\frac{(x-a)^2}{2!}g''(c)}$$

Since $f(a)=g(a)=0$,

$$\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{(x-a)f'(a)+\frac{(x-a)^2}{2!}f''(c)}{(x-a)g'(a)+\frac{(x-a)^2}{2!}g''(c)}$$

Dividing both the numerator and the denominator by $(x-a)$,

\begin{align} \lim_{x\to a}\frac{f(x)}{g(x)} & = \lim_{x\to a}\frac{f'(a)+\frac{(x-a)}{2!}f''(c)}{g'(a)+\frac{(x-a)}{2!}g''(c)} \\ & = \frac{f'(a)}{g'(a)} \\ & = \lim_{x\to a}\frac{f'(x)}{g'(x)}. \end{align}



Theorem. (L'Hopital's Rule, $\frac{\infty}{\infty}$ form)

Let $f(x)$ and $g(x)$ be differentiable functions in a neighbourhood of $x=a$ such that $\displaystyle \lim_{x\to a}f(x)=\lim_{x\to a}g(x)=\infty$. Then $\displaystyle \lim_{x\to a} \frac{f(x)}{g(x)}=\lim_{x\to a} \frac{f'(x)}{g'(x)}.$

Proof.

Write $\lim_{x\to a} \frac{f(x)}{g(x)}=\alpha$.

Case 1: $\alpha$ is neither zero nor infinite.

Rewriting the limit into $\frac{0}{0}$ form and applying the previous theorem,

\begin{align} \lim_{x\to a}\frac{f(x)}{g(x)} & =\lim_{x\to a}\frac{\frac{1}{g(x)}}{\frac{1}{f(x)}} \\ & = \lim_{x\to a} \frac{\frac{g'(x)}{(g(x))^2}}{\frac{f'(x)}{(f(x))^2}} \\ & = \lim_{x\to a} \left( \frac{f(x)}{g(x)} \right)^2 \frac{g'(x)}{f'(x)} \\ & = \left( \lim_{x\to a} \frac{f(x)}{g(x)} \right)^2 \left(\lim_{x\to a} \frac{g'(x)}{f'(x)} \right) \\ \end{align} which gives \begin{align} \alpha & = \alpha^2 \lim\limits_{x\to a} \frac{g'(x)}{f'(x)} \end{align}

Case 2: $\alpha=0$. Then

\begin{align} \alpha + 1 & = \lim\limits_{x\to a} \frac{f(x)+g(x)}{g(x)} \\ & = \lim\limits_{x\to a} \frac{f'(x)+g'(x)}{g'(x)} & \textbf{(*)} \\ & = \lim\limits_{x\to a} \frac{f'(x)}{g'(x)} +1 \end{align}

Case 3: $\alpha$ is infinite. Then we consider

\begin{align} \frac{1}{\alpha} & = \lim\limits_{x\to a}\frac{g(x)}{f(x)} \\ & = \lim\limits_{x\to a}\frac{g'(x)}{f'(x)} & \textbf{(#)} \\ \end{align} Hence in all 3 cases, we have $\displaystyle \alpha = \lim\limits_{x\to a}\frac{f'(x)}{g'(x)}$.

Exercises.

  1. In the above proof, why does the equality relation $\textbf{(*)}$ hold?
  2. In the above proof, why does the equality relation $\textbf{(#)}$ hold?