[Math] Can we apply L’Hospital’s rule where the derivative is not continuous

continuityderivativeslimits

My doubt arises due to the following :

We know that the definition of the derivative of a function at a point $x=a$, if it is differentiable at $a$, is:
$$f'(a) = \lim_{h \rightarrow 0} \frac {f(a+h) – f(a)}{h}$$

Suppose that the function $f(x)$ is differentiable in a finite interval $[c,d]$ and $a \in (c,d) $

So, we can apply L'Hospital's rule. On differentiating numerator and denominator with respect to $h$, we get:
$$f'(a) = \lim_{h \rightarrow 0} \frac {f(a+h) – f(a)}{h} = \lim_{h \rightarrow 0} \frac {f'(a+h)}{1}$$
Which implies that
$$f'(a) = \lim_{h \rightarrow 0} f'(a+h)$$
Which means that the function $f'(x)$ is continuous at $x=a$

But this not necessarily true. A function may have a derivative everywhere but its derivative may not be continuous at some point. One of many counterexamples is:
$$f(x) = \begin{cases} 0 \text{ ; if x=0} \\ x^2 \sin \frac{1}{x} \text{; if x $\neq$ 0 } \end{cases}$$
Whose derivative isn't continuous at $0$

So, is something wrong with what I have done ? Or is it necessary that for applying L'Hospital's rule, the function's derivative must be a continuous function?

If the latter is true, why does that condition appear in the proof for L'Hospital's rule ?

Best Answer

L'Hospital's rule says under certain conditions: IF $\lim_{h\to 0} \frac{f'(h)}{g'(h)}=c$ exists, then also $\lim_{h\to 0} \frac{f(h)}{g(h)}=c$. It does not say anything about the existence of the former limit.

Related Question