Why is this function only differentiable at zero? In my analysis class, we had the following function: 
$$f: \mathbb{R} \to \mathbb{R}: x \mapsto \begin{cases}
x^2 & \text{ if } x \in \mathbb{Q}\\ -x^2 & \text{elsewhere}.\end{cases}$$
At zero, I can see that this function is differentiable: indeed, we have that 
$$\lim_{h \to 0}\Big|{\frac{f(h) -f (0)}{h}}\Big| = \lim_{h \to 0}|h| = 0$$
by continuity of the absolute-value function and therefore, the limit of $h \to 0$ of the quotients also equals zero.
My course notes then state that this function is nowhere differentiable except at zero. At this point, I only know about continuity and the definition of differentiability. Another example of my course notes used a sequence converging to zero, such that the quotient in the definition of derivative does not converge or has no limit. Therefore, I tried doing the same, but without result... Any hints on how to solve this?
Note that I do know that this function is not continuous (except at zero), but I have not seen the result (differentiable implies continuous) yet, so I'm sure the lecture notes do not intend to use this result...
 A: Consider the point $1$, for instance. In order to prove that $f$ is not differentiable there, you have to prove that the limit $\lim_{x\to1}\frac{f(x)-1}{x-1}$ doesn't exist. Note that there are numbers arbitrarily close to $1$ whose square is irrational. For such a point $x$, $f(x)$ is close to $-1$, and therefore $\left\lvert\frac{f(x)-1}{x-1}\right\rvert$ must be a very large number. It is not hard to formalize this in order to prove that the limit $\lim_{x\to1}\frac{f(x)-1}{x-1}$ doesn't exist indeed.
The argument is similar at the other points of $\mathbb{R}\setminus\{0\}$.
A: If you compute the limit
$$\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}$$ using a subsequence of rationals and a subsequence of irrationals, you will converge to $2x_0$ and $-2x_0$ respectively, which are different numbers. This shows that the limit does not exist when $x_0\ne0.$

Erratum:
As commented by José, the above reasoning is not right. If $x_0$ is rational, then the limit via the irrationals does not exist, and similarly if $x_0$ is rational the limit via the irrationals does not exist.
So in both cases, the limit does not exist.
