Example Find the limit of the following function.

$\displaystyle \lim_{x \to 0}\frac{\sin{x} - x\cos{x}}{\sin{x} - x} $

Answer L'Hospital's Theorem Let $f(x)$ and $g(x)$ be continuous on $[a,b]$ and differentiable on $(a,b)$. If $f(a) = g(a) = 0$ and $\displaystyle{\lim_{x \rightarrow a + 0} \frac{f^{\prime}(x)}{g^{\prime}(x)} = l}$ exists, then $\displaystyle{\lim_{x \rightarrow a + 0} \frac{f(x)}{g(x)} = l}$.

This is indeterminate form of $\displaystyle{\frac{0}{0}}$. Then differentiate the numerator and denominator separately, we have

$\displaystyle \lim_{x \rightarrow 0}\frac{x\sin{x}}{\cos{x} - 1}. $

This is again indeterminate form of $\displaystyle{\frac{0}{0}}$. So, differentiate the numerator and denominator separately, we have

$\displaystyle \lim_{x \rightarrow 0}\frac{\sin{x} + x\cos{x}}{-\sin{x}}. $

This is again indeterminate form of $\displaystyle{\frac{0}{0}}$. So, differentiate the numerator and denominator separately, we have

$\displaystyle \lim_{x \rightarrow 0}\frac{2\cos{x} - x\sin{x}}{-\cos{x}} = \frac{2}{-1} = -2. $

Now apply L'Hospital's Theorem, we have

$\displaystyle \lim_{x \rightarrow 0}\frac{\sin{x} - x\cos{x}}{\sin{x} - x} = -2 $

To find the limit by L'Hospital's Theorem, we usually write in the following way.

$\displaystyle \lim_{x \rightarrow 0}\frac{\sin{x} - x\cos{x}}{\sin{x} - x}$ $\displaystyle =$ $\displaystyle \big(\frac{0}{0}\big)$  
  $\displaystyle \stackrel{*}{=}$ $\displaystyle \lim_{x \rightarrow 0}\frac{x\sin{x}}{\cos{x} - 1} = \big(\frac{0}{0}\big)$  
  $\displaystyle \stackrel{*}{=}$ $\displaystyle \lim_{x \rightarrow 0}\frac{2\cos{x} - x\sin{x}}{-\cos{x}} = \frac{2}{-1} = -2. $