Continuity of an extended rate of variation? Let $f:\mathbb R\to \mathbb R$ be a $C^1$ function. 

Then Prove or disprove that  $g:\mathbb R^2\to \mathbb R$  define by 
  $$g(x,y) = \begin{cases}\frac{f(x)-f(y)}{x-y}&\text{if $x\neq y$}\\
f'(x)&\text{if $x= y$}\end{cases}$$
  is a continuous function.

Note that $C^1$ Continuity must be crucial since a blatant counter example given by the function 
$$f(x) = \begin{cases}x^2\sin \frac{1}{x}&\text{if $x\neq 0$}\\
0&\text{if $x= 0$}\end{cases}$$ 
which differentiable on $\mathbb R$ but not $C^1$ because the derivative is not continuous at $x=0.$

first we see that g is continuous at $(x,y)$ such that $x\neq y$ now let $x_{0} = y_{0}$ and let $ (x,y)$ converge to $(x_{0},y_{0})$ 
we have $\frac{f(y)-f(x)}{y-x}= {f}'(c) $ such that $ x\leq {c} \leq y $ . and the conclusion follow since $ f$ is $C^{1}$ continuous 
