Showing that $f(x)=x^2$ for $x \in \mathbb{Q}$ and $f(x)=0$ for $x \not\in \mathbb{Q}$ is differentiable in $x=0$ I am supposed to show that $f(x) = x^2$ for $x$ in the rationals and $f(x) = 0$ for $x$ in the irrationals is differentiable at $x = 0$ and I am supposed to find the derivative of $f(x)$ at $x = 0$.
Is my proof correct or not?
My proof:
consider limit as $h\rightarrow0$ of $\frac{f(0 + h) - f(0)}h$ 
then we have limit as $h\rightarrow0$ of $\frac{h^2 - 0^2}h$
and then we get limit as $h\rightarrow0$ of $\frac{h^2}h
=$ limit as $h\rightarrow0$ of $h= 0 = $ the derivative of $f(x)$ at $0$

Perhaps another way of looking at this is the following. As stated elsewhere, your goal is to compute
$$
\lim_{h\to 0} \frac{f(h) - f(0)}{h} = \lim_{h\to 0} \frac{f(h)}{h}
$$
and to show that this is equal to zero. The issue of course is that you must pay attention to the fact that your function is not defined by just one formula, but by cases depending on the rationality of $h$.
We can try deal with this case-wise, but in my opinion a simpler way to address this is to use inequalities!
Note that for all real numbers $h$, we have that $0 \leq f(h) \leq h^2$. If we divide by $h$, this reads $0 \leq f(h)/h \leq h$. Consequently, we have that
$$
0 = \lim_{h\to 0} 0 \leq \lim_{h \to 0} \frac{f(h)}{h} \leq \lim_{h\to 0} h = 0
$$
and so by the squeeze theorem, it follows that our desired limit is zero.
