1. ## Proving differentiability

Let f(x)=
x^2 if x rational
0 if x is irrational
Prove f is differentiable at 0

f(0)=0
So at $\displaystyle x=0$
$\displaystyle lim_{h\rightarrow0}=\frac{f(0+h)-f(0)}{h}$
$\displaystyle lim_{h\rightarrow0}=\frac{f(h)}{h}$
Case 1: h rational, then
$\displaystyle lim_{h\rightarrow0}=\frac{h^2}{h}=h=0$
Case 2: h irrational
$\displaystyle lim_{h\rightarrow0}=\frac{0}{h}=0$
Hence
$\displaystyle lim_{h\rightarrow0}=\frac{f(0+h)-f(0)}{h}$
and f is differentiable at 0
QED

Am I expressing this proof correctly? Are all my steps rigorous?

2. This isn't quite right - you can't just pick and choose which values of $\displaystyle h$ you attain. A cleaner way to do this is to use the Sandwich theorem, combined with taking the limit from the right and from the left. First, from the right, we have $\displaystyle h>0$. Then, $\displaystyle 0\leq f(h)\leq h^2$. Dividing by $\displaystyle h$ gives $\displaystyle 0\leq \frac{f(h)}{h}\leq h$. Taking the limit as $\displaystyle h\to 0^+$ shows that $\displaystyle \frac{f(h)}{h}\to 0$.

I'll leave the left-hand approach to you. Good luck.