Let $\phi \in C^1(\Bbb R; \Bbb R) $ and $f: \Bbb R^2 \to \Bbb R;$
$f(x,y)=\begin{cases} \frac{\phi(x) - \phi(y)}{x-y} & x \not = y\\ \phi'(x) & x=y \end{cases}$
Show that $f$ is continuous.
My attempt:
Clearly $f$ is continous on $\Bbb R^2 \backslash \{(x,y) \in \Bbb R^2:x=y\}$ since $\phi$ is continuous and the expression $\frac{\phi(x) - \phi(y)}{x-y}$ is well defined for $x \not = y$.
Continuitiy at $x = y$ :
Let $\mathbf q_n = (x_n, y_n)$ be a sequence such that $\mathbf q_n \to (c,c)$ for a $c \in \Bbb R^2$.
I need to show that
$$f(\lim_{n\to \infty}\mathbf q_n) = \lim_{n\to \infty} f(\mathbf q_n)$$
Using the definition of $f$ we get
$$f(\lim_{n\to \infty}\mathbf q_n) = f(c,c) = \phi'(c) = \lim_{x\to c} \frac{\phi(x)-\phi(c)}{x-c} $$ and
$$ \lim_{n\to \infty} f(\mathbf q_n) = \lim_{n\to \infty} \frac{\phi(x_n)-\phi(y_n)}{x_n-y_n}$$
which leads to equality immediately if $\mathbf q_n = (x_n, c)$.
Here I am not sure how to continue, I tried to use L'Hôpital on the last expression and got $$\lim_{n\to \infty} \frac{\phi(x_n)-\phi(y_n)}{x_n-y_n} = \lim_{n\to \infty} \frac{\frac{d}{dn}(\frac{d}{d \phi}(x_n \cdot \phi(x_n) - y_n \cdot \phi(y_n))}{\frac{d}{dn}(x_n - y_n)}$$
But that does not seem to go anywhere.
How should I proceed to prove continuity?
Edit:
Using the suggestion from @J.G:
Let $h_n = y_n - x_n$. Then
$$\lim_{n\to \infty} \frac{\phi(x_n)-\phi(y_n)}{x_n-y_n} = \lim_{n\to \infty} \frac{\phi(x_n)-\phi(x_n + h_n)}{-h_n} = \lim_{n\to \infty} \frac{\phi(x_n + h_n)-\phi(x_n)}{h_n}$$
Can I just set this expression equal to $$ \lim_{h\to 0} \frac{\phi(c + h)-\phi(c)}{h} ?$$
I feel like I am almost there.
Hint:$$\lim_{y\to x}f(x,y)=\lim_{y\to x}\frac{\phi(x) - \phi(y)}{x-y}=\phi'(x)$$