$$ f(x,y)= \left\{ \begin{array}{lcc} \frac{e^{-|x-y|}}{1+|x-y|} & , & x\neq y \\ \\ \hspace{0.6cm} 1 & , & x = y \\ \end{array} \right. $$ $f$ is rewritten as follow $$ f(x,y)= \left\{ \begin{array}{lcc} \frac{e^{-x+y}}{1+x-y} & , & x>y \\ \\ \frac{e^{x-y}}{1-x+y} & , & x<y \\ \\ \hspace{0.5cm}1 & , & x=y \\ \end{array} \right. $$ For $x-y>0 \iff x>y$
$$ \lim_{ (x,y) \to (y,y) } \frac{e^{-x+y}}{1+x-y} = 1 $$
For $x-y<0 \iff x<y$ $$ \lim_{ (x,y) \to (y,y) } \frac{e^{x-y}}{1-x+y} = 1 $$
Then $f$ is continuos at the points $x=y$.
$$ \frac{\partial f}{\partial x}= \left\{ \begin{array}{lcc} -\frac{e^{\left(-x + y\right)}}{x - y + 1} - \frac{e^{\left(-x + y\right)}}{{\left(x - y + 1\right)}^{2}} & , & x>y \\ \\ -\frac{e^{\left(x - y\right)}}{x - y - 1} + \frac{e^{\left(x - y\right)}}{{\left(x - y - 1\right)}^{2}} & , & x<y \\ \\ \hspace{1.6cm} 0 & , & x=y \\ \end{array} \right. $$
$$ \frac{\partial f}{\partial y}= \left\{ \begin{array}{lcc} \frac{e^{\left(-x + y\right)}}{x - y + 1} + \frac{e^{\left(-x + y\right)}}{{\left(x - y + 1\right)}^{2}} & , & x>y \\ \\ \frac{e^{\left(x - y\right)}}{x - y - 1} - \frac{e^{\left(x - y\right)}}{{\left(x - y - 1\right)}^{2}} & , & x<y \\ \\ \hspace{1.6cm} 0 & , & x=y \\ \end{array} \right. $$
If $ x>y $ $$ \lim_{ (x,y) \to (y,y) } \nabla f(x,y) = ( -2,2 ) $$ If $ x<y $ $$ \lim_{ (x,y) \to (y,y) } \nabla f(x,y) = ( 2,-2 ) $$
But $ \nabla f(y,y) = (0,0) $ . Then $\nabla f(x,y)$ is not continuous at the points $x=y$.
Is $f$ differentiable at $(0,0)$?
For $x>y$ $$ \lim_{ (x,y) \to (0,0) } \frac{ f(x,y) - f(0,0) - \langle \nabla f(0,0) , (x,y) \rangle }{ ||(x,y)|| } = \lim_{ (x,y) \to (0,0) } \frac{ f(x,y) - 1 }{\sqrt{x^2+y^2} } $$ $$ = \lim_{ (x,y) \to (0,0) } \frac{ \frac{e^{-x+y}}{1+x-y} -1 }{\sqrt{x^2+y^2}} = \lim_{ (x,y) \to (0,0) } \frac{\frac{ e^{ -x+y } -x+y-1 }{x-y+1}}{\sqrt{x^2+y^2}} = \frac{ e^{ -x+y } -x+y-1 }{ \sqrt{x^2+y^2} (x-y+1)} $$
Using polar coordinates
$$ \lim_{r \to 0} \frac{ e^{ r(-cos\theta + sin\theta)} + r( -cos\theta + sin\theta ) -1 }{r^2(cos\theta - sin\theta) +r} \overbrace{=}^{L'hopital} $$
$$ \lim_{r \to 0} \frac{ ( -cos\theta + sin\theta )e^{ r(-cos\theta + sin\theta)} - cos\theta + sin\theta }{ 2r( cos\theta - sin\theta ) + 1} = -2cos\theta + 2 sin\theta \neq 0 $$
Analogously for $x<y$ $$ \lim_{ r \to 0 } \frac{ ( cos\theta - sin\theta )e^{ r(cos\theta - sin\theta)} + cos\theta - sin\theta }{ 2r(sin\theta - cos\theta) +1 } = 2cos\theta - 2sin\theta \neq 0 $$
Hence $f$ is not differentiable at $(0,0)$.
Is this analysis correct?