# L'Hopital's Theorem

## Introduction

Differential calculus can be of help when evaluating limits of the form $$\frac{0}{0}$$, $$\frac{\infty}{\infty}$$, $$0\cdot \infty$$, $$\infty^0$$, and $$0^0$$. L’Hopital’s theorem is a result that simplifies calculation of limits of fractions $$\lim_{x\to a}\frac{f(x)}{g(x)}$$ where $$f$$ and $$g$$ are functions such that $$\lim_{x\to a}f(x)=\lim_{x\to a}g(x)=0$$.

The limits of the form $$\lim_{x\to a}f(x) g(x)$$ where one of $$f$$ and $$g$$ converges to $$0$$ and the other to $$\infty$$ can be re-written in the form $$\lim_{x\to a}\frac{f(x)}{\frac1{g(x)}}$$ or $$\lim_{x\to a}\frac{g(x)}{\frac1{f(x)}}$$, so the main task is to develop a method to tackle the problems of evaluating limits of fractions.

The limits of the form $$\lim f(x)^{g(x)}$$ can be treated using $$f(x)^{g(x)}=e^{\ln \left(f(x)^{g(x)}\right)}=e^{g(x)\ln f(x)}$$. Thus, evalution of limits of that type also reduces to evaluation of $$g(x)\ln f(x)=\frac{\ln f(x)}{\frac1{g(x)}}$$.

This presentation of L’Hopital’s theorem starts with precise statement of the theorem followed by examples on how to use it and how not to use it. In the end we present the proof that relies on a discrete version of L’Hopital’s theorem known as Cesaro-Stolz lemma.

## Statement of the theorem and applications

L’Hopital’s theorem

Assume that $$f$$ and $$g$$ are differentiable functions on an open interval containing real number $$a$$. Assume that $$g\neq 0$$ on that interval. Assume that $$\displaystyle \lim_{x\to a} \frac{f^{\prime}(x)}{g^{\prime}(x)}=L$$ for some real number $$L$$ and assume that one of the following two conditions is satisfied:

• (a) $$\displaystyle \lim_{x\to a}g(x)=+\infty$$.

• (b) $$\displaystyle \lim_{x\to a}f(x)=\lim_{x\to a}g(x)=0$$.

Then $$\displaystyle \lim_{x\to a}\frac{f(x)}{g(x)}=L$$.

Example 1 Evaluate the limit $$\displaystyle \lim_{x\to 0}\frac{\sin x}{x}$$.

Example 2 Evaluate the limit $$\displaystyle \lim_{x\to 0}\frac{1-\cos x}{x^2}$$.

The preceding two examples are the simplest applications of L’Hopital’s theorem. In the development of the fundamentals of mathematical analysis it is not correct to use l’Hopital’s theorem to establish the previous two limits. Using L’Hopital’s theorem to prove that $$\sin x/x\to 1$$ would create a logical error called circular reasoning. Namely, the evaluation of the limit $$\lim_{x\to0}\frac{\sin x}x$$ requires us to know that the derivative of $$\sin x$$ is equal to $$\cos x$$. This result was proved using the fact that $$\lim_{x\to 0}\frac{\sin x}x=1$$.

However, if we know that $$(\sin x)^{\prime}=\cos x$$, then Example 1 is a correct application of L’Hopital’s theorem to prove that $$\displaystyle \lim_{x\to 0}\frac{\sin x}x=1$$. The trouble is that all those who know that $$(\sin x)^{\prime}=\cos x$$ probably already know that $$\frac{\sin x}x\to 1$$ as $$x\to 0$$.

Example 3 Evaluate the limit $$\displaystyle \lim_{x\to 0}x^x$$.

## Cases when L’Hopital’s theorem cannot be applied

It is important to verify all the conditions of the L’Hopital’s theorem. The following example shows that it is possible that $$\displaystyle \lim \frac{f^{\prime}(x)}{g^{\prime}(x)}$$ does not exist, while $$\displaystyle \lim\frac{f(x)}{g(x)}$$ does.

Consider $$f(x)=x+\cos x$$ and $$g(x)=x$$. Since $$\cos x\in [-1,1]$$, we have that $$\displaystyle \frac{f(x)}{g(x)}\in \left[ 1-\frac1x, 1+\frac1x\right]$$ for $$x > 0$$, and by squeeze theorem the limit of the fraction $$\frac{f(x)}{g(x)}$$ is equal to $$1$$. However, $$f^{\prime}(x)=-\sin x$$ and $$g^{\prime}(x)=1$$, hence $$\displaystyle \lim_{x\to 0}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ does not exist.

## Proof of L’Hopital’s theorem

We will first prove a discrete version of the L’Hopital’s theorem: the case when instead of functions we are dealing with sequences. We may see a sequence $$(a_n)_{n=1}^{\infty}$$ as a special case of a function. The finite difference $$\frac{a_{n+1}-a_n}{(n+1)-n}$$ plays a role that derivative plays when studying functions.

Cesaro-Stolz’s theorem

Assume that $$(x_n)_{n=1}^{\infty}$$ and $$(y_n)_{n=1}^{\infty}$$ are two sequences of real numbers such that $$y_n$$ is increasing and $$\lim_{n\to\infty}y_n=+\infty$$.

• (a) The following three inequalities hold: $\liminf \frac{x_{n+1}-x_n}{y_{n+1}-y_n}\leq \liminf\frac{x_n}{y_n}\leq \limsup\frac{x_n}{y_n}\leq \limsup \frac{x_{n+1}-x_n}{y_{n+1}-y_n}.$

• (b) Assume that $$\displaystyle\lim_{n\to\infty}\frac{x_{n+1}-x_n}{y_{n+1}-y_n}=L$$. Then the limit $$\displaystyle \lim_{n\to\infty}\frac{x_n}{y_n}$$ exists and is equal to $$L$$.

L’Hopital’s theorem

Assume that $$f$$ and $$g$$ are differentiable functions on an open interval containing real number $$a$$. Assume that $$g\neq 0$$ and $$g^{\prime}\neq 0$$ on that interval. Assume that $$\displaystyle \lim_{x\to a} \frac{f^{\prime}(x)}{g^{\prime}(x)}=L$$ for some real number $$L$$ and assume that one of the following two conditions is satisfied:

• (a) $$\displaystyle \lim_{x\to a}g(x)=+\infty$$.

• (b) $$\displaystyle \lim_{x\to a}f(x)=\lim_{x\to a}g(x)=0$$.

Then $$\displaystyle \lim_{x\to a}\frac{f(x)}{g(x)}=L$$.

## Practice problems

Problem 1. Determine the following limit: $$\displaystyle \lim_{x\to0}\frac{ \sin\left(5x^2\right)}{x^2}$$.

Problem 2. Determine the following limit: $$\displaystyle \lim_{x\to0}\frac{ e^{8x}-1}{x}$$.

Problem 3. Determine the following limit: $$\displaystyle \lim_{x\to0}\frac{ 3^{x}-1}{x}$$.

Problem 4. Determine the real number $$\alpha$$ such that the function $$\displaystyle h(x)=\frac{-3x +3\sin x +\alpha x^3}{x^5}$$ has a non-zero finite limit as $$x$$ approaches $$0$$.

Problem 5. Among the following pairs of functions, determine the pair $$(f,g)$$ for which $$\displaystyle \lim_{x\to +\infty}\frac{f(x)}{g(x)}$$ does exist, but $$\displaystyle \lim_{x\to +\infty}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ does not. This pair can serve as an example where l’Hopital’s theorem cannot be applied.
• (A) $$\displaystyle f(x)=x\cos x$$, $$\displaystyle g(x)=3x$$
• (B) $$\displaystyle f(x)=x+\frac{\sin x}x$$, $$\displaystyle g(x)=3x$$
• (C) $$\displaystyle f(x)=x^2+3x+5$$, $$\displaystyle g(x)=3x^2-17$$
• (D) $$\displaystyle f(x)=x+\sin x$$, $$\displaystyle g(x)=3x$$
• (E) Such pair of functions does not exist, according to L’Hopital’s theorem.