[Math] If $f'(a)$ exists, does $f'(a^+)$ and $f'(a^-)$ exist

calculusderivatives

Is it true that

If $f(x)$ is differentiable at $a$, then both $f'(a^+)$ and $f'(a^-)$ exist and $f'(a^+)=f'(a^-)=f'(a)$.

My answer is NO.

Consider the function
$$
f(x)=\begin{cases}
x^2\sin\dfrac{1}{x}&\text{for $x\ne0$}\\[1ex]
0&\text{for $x=0$}
\end{cases}
$$

$f'(0)$ can be found by

\begin{align} \lim_{x \to 0} \dfrac{f(x) – f(0)}{x-0} & = \lim_{x \to 0} \dfrac{f(x) – 0}{x} & \textrm{ as } f(0) = 0 \\ & = \lim_{x \to 0} \dfrac{x^2 \sin\left(\frac{1}{x}\right)}{x} & \\
& = \lim_{x \to 0} x \sin\left(\frac{1}{x}\right) & \end{align}

Now we can use the Squeeze Theorem. As $-1 \leq \sin\left(\frac{1}{x}\right) \leq 1$, we have that $$0 = \lim_{x \to 0} x \cdot -1 \leq \lim_{x \to 0} x \sin\left(\frac{1}{x}\right) \leq \lim_{x \to 0} x \cdot 1 = 0$$

Therefore, $\lim_{x \to 0} x \sin\left(\frac{1}{x}\right) = 0$ and we have $f'(0)=0$.

However,
$$
f'(x)=\begin{cases}
-\cos\dfrac{1}{x}+2x\sin\dfrac{1}{x}&\text{for $x\ne0$}\\[1ex]
0&\text{for $x=0$}
\end{cases}
$$
$f'(0^+)$ nor $f'(0^-)$ exists as $x\to 0$.


Is my answer correct?

I have found some pages related to this question.

Is $f'$ continuous at $0$ if $f(x)=x^2\sin(1/x)$

Calculating derivative by definition vs not by definition

Differentiability of $f(x) = x^2 \sin{\frac{1}{x}}$ and $f'$

$f'$ exists, but $\lim \frac{f(x)-f(y)}{x-y}$ does not exist

Thanks.

Best Answer

Your working is correct. I assume you mean $$f'(a^{+}) = \lim_{x \to a^{+}}f'(x), f'(a^{-}) = \lim_{x \to a^{-}}f'(x)$$ Just to clarify notation, $f'(a^{+})$ does not mean right hand derivative of $f$ at $a$ but rather it means right hand limit of the derived function $f'$. Similar remark applies to $f'(a^{-})$. I believe OP is using these symbols in the manner I have explained above.

Existence of a derivative at a point does not necessarily mean that it is continuous at that point. The example you have given in your post is a classic example of such a scenario when $f'$ exists but is not continuous.

What is important is to know that a derivative can not have jump discontinuity. Thus if $f'(a^{+}), f'(a^{-})$ exist and $f$ is continuous at $a$ then $f'(a)$ also exists and $f'(a) = f'(a^{+}) = f'(a^{-})$. Note that in your example $f'(a)$ exists but both the limits $f'(a^{+}), f'(a{-})$ do not exist. Had they existed $f'$ would have been continuous at $a$.