A student came to me with the following problem.
Construct a function $g \colon {\Bbb R}\to {\Bbb R}$ such that the function $f \colon {\Bbb R}^2 \to {\Bbb R}$ defined by $$ f(x,y)= \begin{cases} \frac{e^{x^2}-e^{y^2}}{x-y} &\text{if $x \neq y$} \\ g(x) &\text{if $x=y$} \end{cases} $$ is continuous. Is the function $f$ differentiable at the origin?
It is immediate to find the unique $g$ that could solve the problem. However, the student was in trouble since he was unable to check that this function $g$ was an actual solution. The computation of $$\lim_{(x,y) \to (x_0,x_0)} \frac{e^{x^2}-e^{y^2}}{x-y}$$ is intuitive, but the student could not prove rigorously his conjecture. The same for the limit $$\lim_{(x,y) \to (0,0)} \frac{f(x,y)-f(0,0)-\nabla f(0,0)\cdot (x,y)}{\sqrt{x^2+y^2}}.$$
I suggested the use of some Taylor expansion of the exponential around zero, but I wonder if there is some straightforward approach. Actually, the definition of $f$ is given as a "incremental ratio" of a smooth function, and I guess there is a general result about the extension of the incremental ratio to the diagonal of $\mathbb{R}^2$. Any suggestion is welcome.
For the first part in order to make things simpler, fixed $y=x_0$, we can refer to the limit of a single variable
$$\lim_{x \to x_0} \frac{ e^{x^2}-e^{x_0^2} }{x-x_0}$$
which by definition of derivative for $h(x)=e^{x^2}$ leads to $g(x)=h'(x)=2xe^{x^2}$.
For the second part, that is
$$\lim_{(x,y) \to (0,0)} \frac{f(x,y)-f(0,0)-\nabla f(0,0)\cdot (x,y)}{\sqrt{x^2+y^2}} =\lim_{(x,y) \to (0,0)} \frac{ e^{x^2}-e^{y^2}-(x^2-y^2) }{(x-y)\sqrt{x^2+y^2}} $$
to avoid Taylor's expansion we can use that
$$\lim_{t\to 0} \frac{e^t-1-t}{\frac{t^2}2}=1$$
which can be easily shown by l'Hospital and therefore
$$\frac{ e^{x^2}-e^{y^2}-(x^2-y^2) }{(x-y)\sqrt{x^2+y^2}}=$$ $$=\frac{ e^{x^2}-1-x^2 }{\frac{x^4}2 } \frac{ \frac{x^4}2 }{(x-y)\sqrt{x^2+y^2}} -\frac{ e^{y^2}-1-y^2 }{\frac{y^4}2 }\frac{ \frac{y^4}2 }{(x-y)\sqrt{x^2+y^2}}\to1\cdot 0-1\cdot 0=0$$