Derivative Definition proofs Let $f : \Bbb R \to \Bbb R$ be defined by 
$$f(x)=\begin{cases}x^2, & \text{if $x$ is rational} \\ 0, & \text{if $x$ is irrational} \end{cases}$$
Show that $f$ is differentiable at $x = 0$ and find $f'(0)$.
Kind of confused as to how to approach this.
 A: The other posted answer seems that it is only addressing on finding $f'(0)$ by means of taking the limit $x \to 0$ and applying the Squeeze Theorem, rather than showing that $f(x)=x^2$ is differentiable at $x=0$. I like the other answer for its brevity, but I want to also address that first part of your problem.
To show that $f(x)=x^2$ is differentiable at $x=0$, first recall the definition of a function's differentiability a given point:

Definition: The function $f : \mathbb{R} \to \mathbb{R}$ is differentiable at $x=c$ if, for all $\epsilon > 0$, there exists a $\delta > 0$ such that if $|x-c| < \delta$ then $$\left|\frac{f(x)-f(c)}{x-c} \right|<\epsilon.$$

We also employ the observation that $|f(x)| \le x^2$, since $f(x)$ is either $0$ or $x^2$.
If we choose $\delta=\epsilon$, then $|x-0|<\delta$ implies $$\left|\frac{f(x)-f(0)}{x-0} \right|=\left|\frac{f(x)-0^2}{x-0} \right|=\left|\frac{f(x)}x\right|\le\left|\frac{x^2}x \right|=|x|=|x-0|<\delta=\epsilon.$$
Hence, $f(x)=x^2$ is differentiable at $x=0$.
A: hint: $0 \leq \left|\dfrac{f(x)-f(0)}{x-0}\right| = \left|\dfrac{f(x)}{x}\right| \leq |x|$
