# L'Hôpital's Rule

Suppose there are continuous functions \(f(x)\) and \(g(x)\) that are both zero at \(x=a\). Then, the limit \(\displaystyle \lim_{x \to a}{\frac{f(x)}{g(x)}}\) cannot be found, since substituting \(x=a\) yields \(0/0\) which cannot be evaluated. We use \(0/0\) as a notation for an expression known as an indeterminate form. In some cases, limits that lead to indeterminate forms may be evaluated by cancellation or rearrangement of terms (see Limits by Factoring for examples). However, this does not always work. For example, how would you evaluate \(\displaystyle \lim_{x \to 0}{\frac{\sin{x}}{x}}\)? Obviously, inserting \(x=0\) will yield an indeterminate form of \(0/0\) and in this case, you can neither use algebraic manipulation nor rearrangement of terms to reduce this expression into a form that yields a valid limit.

Under certain circumstances, we can use a powerful theorem called **L'Hôpital's rule** to evaluate the limits that lead to indeterminate forms.

#### Contents

## L'Hopital Rule

L'Hopital's rule:

Suppose \(f\) and \(g\) are differentiable functions such that

- \(g'(x) \neq 0\) on an open interval \(I\) containing \(a\),
- \(\displaystyle \lim_{x\to a} f(x) = 0 \text{ and } \displaystyle \lim_{x\to a} g(x) = 0,\) or \( \displaystyle \lim_{x\to a} f(x) = \pm \infty \text{ and }\displaystyle \lim_{x\to a} g(x) = \pm \infty , \)
- \(\displaystyle \lim_{x\to a} \frac{f'(x)}{g'(x)} \) exists, then \[\lim_{x\to a} \frac{f(x)}{g(x)} = \lim_{x\to a} \frac{f'(x)}{g'(x)}.\ _\square \]

We have\[\begin{align} \frac{f'(a)}{g'(a)} &= \frac{\lim_{x \to a}{\frac{f(x) - f(a)}{x - a}}}{\lim_{x \to a}{\frac{g(x) - g(a)}{x - a}}} = \lim_{x \to a}{\frac{\frac{f(x)-f(a)}{x-a}}{\frac{g(x)-g(a)}{x-a}}} \\ &= \lim_{x \to a}{\frac{f(x)-f(a)}{g(x)-g(a)}} = \lim_{x \to a}{\frac{f(x) - 0}{g(x) - 0}} = \lim_{x \to a}{\frac{f(x)}{g(x)}}. \ _\square \end{align}\]

## Basic Examples

## Evaluate

\[\lim_{x \to 0}{\frac{\sin{x}}{x}}.\]

Directly applying \(x=0\) leads the limit to an indeterminate form. Since both the term in the numerator and the term in the denominator are zero at \(x = 0\) and since \(\sin{x}\) and \(x\) are both differentiable at \(x=0\), we can use L'Hôpital's rule:

\[\lim_{x \to 0}{\frac{\sin{x}}{x}} = \left| \frac{\cos{x}}{1}\right|_{x = 0} = \frac{1}{1} = 1 .\ _\square\]

## Evaluate

\[\lim_{x \to 0}{\frac{\sqrt{x+9}-3}{x}}.\]

Once again, directly applying \(x=0\) produces an indeterminate form. Let the expression in the numerator be \(f(x),\) and the expression in the denominator \(g(x)\). Since \(f(0)\) and \(g(0)\) are both zero and \(f(x)\) and \(g(x)\) are both differentiable at \(x=0\), we can use L'Hôpital's rule:

\[\lim_{x \to 0}{\frac{\sqrt{x+9}-3}{x}} = \left|\frac{\frac{1}{2\sqrt{x+9}}}{1}\right|_{x=0} = \frac{1}{6}.\ _\square\]

## Calculate \(\displaystyle{ \lim_{x\to \infty } \frac{\ln(x)}{x^{\frac{1}{3}}} }. \)

Since \(\ln(x) \to \infty\) and \(x^{\frac{1}{3}} \to \infty \) as \(x \to \infty\), we can use L'Hopital's rule:

\[ \lim_{x\to \infty } \frac{\ln(x)}{x^{\frac{1}{3}}} = \lim_{x\to \infty } \frac{\frac{1}{x}}{\frac{1}{3}x^{\frac{-2}{3}}} . \]

Simplifying the expression, we obtain

\[ \lim_{x\to \infty } \frac{3}{x^\frac{1}{3}} = 0. \ _\square \]

## Intermediate Examples

So far we have looked at evaluating limits that reduce to the indeterminate form \[\frac{0}{0} \text{ or } \frac{\infty}{\infty}.\] But how would we evaluates limits that reduce to \(0\times\infty?\) We can deal with such forms by writing them as quotients or rearranging them. The following identity is helpful: \[f \times g = \frac{f}{\frac{1}{g}} .\]

## Evaluate \(\displaystyle{ \lim_{x\to 0^+ } x\ln(x)}. \)

We have

\[ \lim_{x\to 0^+}{ x\ln(x) } = \lim_{x\to 0^+} \frac{\ln(x)}{\frac{1}{x}} = \lim_{x\to 0^+} \frac{x^{-1}}{-x^{-2}} = 0. \ _\square \]

## Evaluate \[\lim_{x \to \infty}{x \sin{\frac{1}{x}}}.\]

Directly applying \(x=0\) gives an indeterminate form of \(\infty \cdot 0\). This form of limit cannot be evaluated just like the case of \(0/0\). This seemingly formidable problem can be solved by introducing a variable substitution, \(x = \frac{1}{y}\). Using the substitution, the limit expression is changed as: \[\lim_{y \to 0^{+}}{\frac{1}{y} \sin{y}} = 1.\ _\square\]

## Repeated Application of L'Hopital's Rule - Basic

In the case where application of L'Hôpital's rule yields an indeterminate form, if the resulting limit expression meets the conditions necessary to use L'Hôpital's rule, it can be used again. This can be quite confusing to understand. Let's look at the example below to see what this means.

## Evaluate

\[\lim_{x \to 0}{\frac{x - \sin{x}}{x^3}}.\]

Let \(f(x)=x - \sin{x}\) and \(g(x)=x^3.\) Since \(f(0) = g(0) = 0\), and \(f(x)\) and \(g(x)\) are both differentiable at \(x=0\), we can use L'Hôpital's rule as follows:

\[\lim_{x \to 0}{\frac{x - \sin{x}}{x^3}} = \lim_{x \to 0}{\frac{1 - \cos{x}}{3x^2}} = \frac{0}{0}.\]

The resulting expression yields an indeterminate form of \(0/0\). However, the term meets the criteria required to use L'Hôpital's rule:

\[ \begin{align} \lim_{x \to 0}{\frac{1 - \cos{x}}{3x^2}} &= \lim_{x \to 0}{\frac{\sin{x}}{6x}} = \frac{0}{0}\\ \\ & \Rightarrow \lim_{x \to 0}{\frac{\cos{x}}{6}} = \frac{1}{6}. \ _\square \end{align}\]

## Evaluate

\[ \lim_{x\to0} \frac{\tan(123x)}{\tan(456x)}. \]

Because the limit is in the form of \( \frac00 \), we can apply L'Hôpital's rule. The derivative of \(\tan x \) is \(\sec^2 x \), and thus by the chain rule, \( \frac d{dx} \tan Ax = A \sec^2 Ax \) for some constant \(A\). Thus, the limit becomes

\[ \lim_{x\to0} \frac{123\sec^2(123x)}{456\sec^2(456x)} = \frac{123\sec^2(0)}{456\sec^2(0)} = \frac{41}{152}. \ _\square \]

Note:We can also solve this limit by using the approximation \( \tan x \approx x \) for relatively small \(x\).

## Evaluate the limit

\[ \lim_{x\to0} \frac{\sin x}{\tan x}.\]

Note that the limit is indeed in the form of \( \frac00.\) However, we can simplify the given expression by noting that \( \tan x = \frac{\sin x}{\cos x} \). So by taking their ratio, we are left with \(\cos x, \) and its limit when \(x\) approaches \(0\) is simply \(1. \ _\square\)

## Repeated Application of L'Hopital's Rule - Intermediate

## Evaluate the limit

\[\lim_{x\to0} \frac{1-\cos x^2}{x^4}.\]

Since the limit has the form of \( \frac00 \) when \(x=0\), L'Hôpital's rule is applicable. Since \( \frac d{dx} (1- \cos x^2) = 2x \sin x^2,\) we have

\[\begin{eqnarray} \displaystyle \lim_{x\to0} \frac{1-\cos x^2}{x^4} \displaystyle &=& \lim_{x\to0} \frac{2x\sin x^2}{4x^3} \\ \displaystyle &=& \lim_{x\to0} \frac24 \cdot \frac{\sin x^2}{x^2} \\ \displaystyle &=& \lim_{x^2\to0} \frac12 \cdot \frac{\sin x^2}{x^2} \\ \displaystyle &=& \frac12 \lim_{y\to0} \cdot \frac{\sin y}{y} \\ \displaystyle &=& \frac12 \cdot 1 = \frac12. \ _\square \end{eqnarray} \]

## Given that \(A,B\) and \(C\) are finite constants such that \( \displaystyle \lim_{x\to0} \frac{\sin x +Ax + Bx^3}{x^5} = \frac1C ,\) evaluate \(A\times B\times C\).

We first note that the limit is of the form \( \frac00\) when \(x=0\), so L'Hôpital's rule is applicable:

\[\begin{align} \lim_{x\to0} \frac{\sin x +Ax + Bx^3}{x^5} &=\lim_{x\to0} \frac{ \frac d{dx} \left[\sin x +Ax + Bx^3 \right] } { \frac d{dx} (x^5) } \\ &=\lim_{x\to0} \frac{ \frac d{dx} \left[\cos x +A +3Bx^2 \right] } { 5x^4 }. \end{align}\]

If \(A \ne -1\), the limit equals to \( \frac A0 ,\) which cannot be equals to a finite constant \(C.\) Hence \(A \) is forced to take the value of \(-1 \). Continue by applying the rule a few more times to obtain

\[\begin{align} \lim_{x\to0} \frac{\sin x +Ax + Bx^3}{x^5} &=\lim_{x\to0} \frac{\cos x +A +3Bx^2 } { 5x^4 } \\ &=\lim_{x\to0} \frac{-\sin x + 6Bx}{20x^3} \\ &=\lim_{x\to0} \frac{-\cos x + 6B}{60x^2}. \end{align} \]

Similarly, as above, \(6B \) is forced to take a value of \(1,\) so \(B = \frac16 \). Then we have

\[\begin{align} \lim_{x\to0} \frac{\sin x +Ax + Bx^3}{x^5} &=\lim_{x\to0} \frac{-\cos x + 1}{60x^2} \\ &=\lim_{x\to0} \frac{\sin x}{120x} \\ &=\lim_{x\to0} \frac{\cos x}{120} = \frac1{120}. \end{align} \]

Hence, \(\frac1C = \frac1{120} \) or \(C = 120,\) implying \[A \times B \times C = -1 \times \frac16 \times 120 = -20. \ _\square\]

## Problem Solving

Let \(f(x) = x e^2\) and \(g(x) = x^{\ln x},\) and let \(\alpha\) and \(\beta\) with \(\alpha < \beta\) be the two roots of \(f(x)-g(x) = 0.\) Also, let

\[ l= \lim_{x \rightarrow \beta} \ \dfrac{f(x)-c\beta}{g(x)-\beta^2}. \]

Then what is the value of \(c-l?\)

**Note:** Try my set.

**Details and Assumptions**

You may use the approximation \( e \approx 2.7183 .\)