Is my proof of differentiability correct?
Exercise: Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be defined by $$f(x) =\begin{cases}x^2 & x \in \mathbb{Q} \\x^3 & x \in \mathbb{R - Q} \end{cases}$$ for $x \in \mathbb{R}$. Using only the limit definition of derivatives, determine whether or not $f$ is differentiable at $0$.
I think it is. Consider the difference quotient function $\phi:(-1, 1) - \{0\} \rightarrow \mathbb{R}$ defined by $$\phi(x) = \frac{f(x) - f(0)}{x - 0}$$ for $x \in (-1, 1) - \{0\}$. On this domain, we can say that $$\phi(x) = \begin{cases}x & x \in \mathbb{Q} \\x^2 & x \in \mathbb{R - Q} \end{cases}$$ and $0 <|\phi(x)| \leq |x|$ on $(-1, 1)$ so $\lim_{x \to 0}\phi(x) = 0$ since $\lim_{x \to 0} |x| = 0$ implies $\lim_{x \to 0}|\phi(x)| = 0$. Hence, $f$ is differentiable at $0$ and $f'(0) = 0$.
Solution 1:
Your proof is fully correct, good job. For $x\in(-1,1)$ we have $|x^2|\le|x|$, so $$ -|x|\le \phi(x)\le |x| $$ (for $x\in(-1,1)$, $x\ne0$) and the squeeze theorem yields that $\lim\limits_{x\to0}\phi(x)=0$.