5. Let $f: \mathbb{R} \to \mathbb{R}$ be defined by
$$
f(x) = \begin{cases}
x^2 \sin(\frac{1}{x}), & x \ne 0 \\
0, & x = 0
\end{cases}
$$
(a) Show that $f$ is differentiable at each $x \ne 0$. (Use without proof the fact that $\sin$ is differentiable and $\sin' = \cos$.)
(b) Use the definition of a derivative to show that $f$ is differentiable at $x = 0$ and that $f'(0) = 0$.
(c) Show that $f'$ is not continuous at $x = 0$.
6. Let $f: \mathbb{R} \to \mathbb{R}$ be the same function as in Question 5 and $g: \mathbb{R} \to \mathbb{R}$ be defined by $g(x) = x$ for $x \in \mathbb{R}$.
(a) Calculate $f(\frac{1}{n\pi})$ for $n = \pm 1, \pm 2, \pm 3, \dots$
(b) Explain why $\lim_{x \to 0} \frac{g(f(x)) - g(f(0))}{f(x) - f(0)}$ is meaningless; that is, fails to exist.