Extending a function continuously Let $f:\mathbb{R}\to \mathbb{R}$ be continuous in an interval around some real $c\in (a,b)$. Construct $g:\Bbb{Q}\setminus \{0\}\to \mathbb{R}$ as :
$$g(s):=\frac{f(c+s)-f(c)}{s}\quad s\in \mathbb{Q}\setminus \{0\}$$
Now show $\displaystyle \lim_{s\to 0}g(s)$ exists iff $f$ is differentiable at $c$.
If $f^\prime(c)$ exists then this is trivial. Because we can take rational sequences $\{s_n\}\to 0$ and then $\dfrac{f(c+s_n)-f(c)}{s_n}$ exists and thus $g(s_n)$ converges to $f^\prime(c)$ so the limit exists. But suppose $\displaystyle \lim_{s\to 0}g(s)=\ell$. Then I tried to use Caratheodory's theorem and define a function
$$\Phi(h):=\dfrac{f(h)-f(c)}{h-c}\text{ if } h\neq c\text{ and } \ell \text{ otherwise}$$
But I can't prove $\Phi$ is continuous at $h=c$. If it were then we would be done. but how to do this? Can someone help? Thanks a lot.

My approach is motivated by imagining the graph of $f$. Being differentiable means having the graph squeezed within an arbitrarily small angle with vertex $(c,f(c))$. So, if the "rational" (dense) part of the graph is so squeezed, and the function is continuous (not just at $c$ but in its neighborhood too), then the irrational part will be squeezed too.
Formally: we know that for every $\epsilon$ there is $\delta$ such that 
$$ |f(c+s)-f(s)-ls| \le \epsilon |s|,\quad \forall s\in \mathbb Q\cap (-\delta,\delta) $$
Both sides are continuous functions of $s$. Thus, a nonstrict inequality that holds on a dense subset of $(-\delta,\delta)$ actually  holds on the whole interval:
$$ |f(c+s)-f(s)-ls| \le \epsilon |s|,\quad \forall s\in  (-\delta,\delta) $$ 
And now you have $f'(c)=\ell$.
