Finding point at which a function is differentiable. Let
$h(x) := x^{3}-x^{2}$ if $x \in \mathbb Q$
$h(x) := 2x-2x^{2}$ otherwise
Determine all $a$ at which $h$ is differentiable.
Answer:
We already know that $\lim_{x \to 0} h(x)$ exists only when $a = 0$ or $a = 1$. In particular if h is continuous at a, then $a=0$ or $a=1$. Hence, if h is differentiable at $a$, then $a=0$ or $a=1$.
To determine if $h'(0)$ exists, we consider $\lim_{x \to 0} (h(x)-h(0))/(x-0)$.
Now, $\lim_{x \to 0} (h(x)-h(0))/(x-0) = \lim_{x \to 0} (h(x))/(x) = 0$. 
Hence, $h'(0) exists$.
Take a sequence {$r_n$} of rationals in $\mathbb R$ \ {$1$} that converges to $1$.
Then, {$(h(r_n))/r_n-1$} = {$(r_n^{3}-r_n^{2})/(r_n-1)$} = {$r_n^{2}$} $\to 1$
Similarly, let {$t_n$} be a sequence in $\mathbb Q^{c}$ \ {$1$} that converges to $1$.
Then, {$(h(t_n))/(t_n-1)$} = {$(2(t_n)-2(t_n)^{2})/(t_n-1)$} = {$-2t_n$} $\to -2$
Hence, by the sequential criterion for limits, $\lim_{x \to 1} (h(x)-h(1))/(x-1)$ does not exist. 
Therefore, $h'(1)$ does not exist.
Is my solution correct?
 A: First, note that if $h$ is differentiable at some point $a$, then $h$ is continuous at $a$. Taking sequences of rationals and irrationals converging to $a$, you can obtain
$$h(a)=a^ 3-a^2=2a-2a^2$$
so $a=0$, $1$ or $-2$.
Your solution is not entirely correct, because $h$ is not differentiable at $0$. Let's check this: Take one sequence of rationals $q_n\to 0$ then
$$\lim_{n\to\infty}\frac{h(q_n)-h(0)}{q_n-0}=\lim_{n\to\infty}\frac{h(q_n)}{q_n}=\lim_{n\to\infty}\frac{q_n^ 3-q_n^2}{q_n}=\lim_{n\to\infty}q_n^2-q_n=0.$$
On the other hand, if we take a sequence of irrationals $i_n\to 0$,
$$\lim_{n\to\infty}\frac{h(i_n)-h(0)}{i_n-0}=\lim_{n\to\infty}\frac{h(i_n)}{i_n}=\lim_{n\to\infty}\frac{2i_n-2i_n^2}{i_n}=\lim_{n\to\infty}2-2i_n=2.$$
The proof that $h$ is not differentiable at $1$ is correct.
You can check that $h$ is not differentiable at $-2$ with arguments similar to $0$ (the limit over rationals will be $16$, but the limit over irrationals will be $10$).
A: This is not really an answer to your question (which is whether what you did is right). I am kind of "cheating", getting at the answer using shortcuts (and perhaps offering a different point of view to think about). 
First, let $g(x)=x^{3}-x^{2}$ and $f(x)=2x-2x^{2}$. 
(1). $h$ would be continuous at those $x$ for which $g(x)=f(x)$. Solving $x^{3}-x^{2}=2x-2x^{2}$, i.e. $x^{3}+x^{2}-2x=x(x^2+x-2)=x(x+2)(x-1)=0$ we obtain $x=-2,0,1$. 
(2). $h$ only has a chance to be differentiable at $x=-2,0,1$. If it were differentiable, its derivative would be the same as the derivative of $g$ and the derivative of $f$ at these points. (I am using that both $\Bbb Q$ and its complement are dense.) Note $g'(x)=3x^2-2x$ and $f'(x)=2-4x$. Solving $g'(x)=f'(x)$, i.e. $3x^2-2x =2-4x$ we obtain $3x^2+2x-2=0$ with solutions $x_{1,2}=\frac{-2\pm\sqrt{4+24}}{6}=\frac{-1\pm\sqrt{7}}{3}$. Since these solutions are not among $x=-2,0,1$, the given function $h$ is not differentiable at any point. Alternatively we could just evaluate $g'(x)$ and $f'(x)$ at $x=-2,0,1$. We have $g'(-2)=16\not=10=f'(-2)$, so $h$ is not differentiable at $-2$. Similarly $g'(0)=0\not=2=f'(0)$, and $g'(1)=1\not=-2=f'(1)$. 

