Solution: We recall that a function \( f: \mathbb{R} \to \mathbb{R} \) is differentiable at a point \( x = a \) if the limit
\[
f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}
\]
exists.
-
To show that \( f \) is differentiable at \( x = 0 \), we will find the derivative of \( f \) at \( x = 0 \) by using the definition of the derivative:
\[
f'(0) = \lim_{h \to 0} \frac{f(h) - f(0)}{h}.
\]
Substituting \( f(h) = h^2 \sin\left(\frac{1}{h}\right) \) and \( f(0) = 0 \), we get:
\[
f'(0) = \lim_{h \to 0} \frac{h^2 \sin\left(\frac{1}{h}\right)}{h} = \lim_{h \to 0} h \sin\left(\frac{1}{h}\right).
\]
Since \( \left\vert \sin\left(\frac{1}{h}\right) \right\vert \leq 1 \) for all \( h \neq 0 \), we have:
\[
0 \leq \left\vert h \sin\left(\frac{1}{h}\right) \right\vert \leq |h|.
\]
By the Sandwich Theorem,
\[
\lim_{h \to 0} h \sin\left(\frac{1}{h}\right) = 0.
\]
Thus, \( f'(0) = 0 \), and \( f \) is differentiable at \( x = 0 \).
-
Note that the derivative of \( f \) is given by:
\[
f'(x) =
\begin{cases}
2x \sin\left(\frac{1}{x}\right) - \cos\left(\frac{1}{x}\right), &\text{ if } x \neq 0 ;\\
0, &\text{ if } x = 0.
\end{cases}
\]
We will show that the limit of \( f'(x) \) as \( x \to 0 \) does not exist. Consider the sequences \( x_n = \frac{1}{(2n + 1)\pi} \) and \( y_n = \frac{1}{2 n \pi } \). Note that the sequences $\left( x_n \right) $ and $\left( y_n \right) $ converges to $0$. Then:
\begin{align*}
\lim_{n \to \infty} f'(x_n) & = \lim_{n \to \infty} \left[ 2\cdot \frac{1}{(2n+1)\pi} \sin((2n +1)\pi) - \cos((2n+1)\pi) \right] \\
& = -1, \text{ and } \\[1ex]
\lim_{n \to \infty} f'(y_n) & = \lim_{n \to \infty} \left[ 2\cdot \frac{1}{2 \pi n} \sin(2 \pi n) - \cos(2 \pi n) \right] = 1.
\end{align*}
Since the limit of \( f'(x) \) as \( x \to 0 \) does not exist, \( f' \) is not continuous at \( x = 0 \).