# Differentiability in $\mathbb{R}^{2}$

Here is my question: Find all the points $\left ( x,y \right )$ in $\mathbb{R}^{2}$ where the following function is differentiable: $f\left ( x,y \right )=\left | e^{x}-e^{y} \right |.\left ( x+y-2 \right )$

The only thing that came to my mind is to distinguish three cases:$x> y$, $x<y$ and $x=y$. In each case the function $f$ can be written differently. But, no idea how to find the points where the function is differentiable. Any one can help?

-
You know that $f$ is differentiable on the open set $\mathcal U=\{(x,y)\in\mathbb R^2, x\neq y\}$. So you have to look at the differentiability at $(x_0,x_0)$. Compute $\lim_{h\to 0^+}f(x_0+h,x_0)$ and $\lim_{h\to 0^-}f(x_0+h,x_0)$. – Davide Giraudo Jan 29 '12 at 20:52
@Davide Giraudo: I agree with the first part that $f$ is differentiable on the open set $U$. As for the limits, they are both equal to zero. Can you please elaborate more why do you have to compute these limits and how ...? – pin296 Jan 29 '12 at 21:19
Sorry I meant $\lim_{h\to 0^+}\frac{f(x_0+h,x_0)-f(x_0,x_0)}h$, $\lim_{h\to 0^-}\frac{f(x_0+h,x_0)-f(x_0,x_0)}h$ in order to see whether the partial derivative exist. – Davide Giraudo Jan 29 '12 at 21:21
@Davide Giraudo The first limit is equal to: $e^{x_{0}}.(2x_{0}-2)$ and the second one is equal to $-e^{x_{0}}.(2x_{0}-2)$. The only case where these two are equal is at $x_{0}=1$. What does this mean? Does it mean that $f$ is only differentiable at the point $(1,1)$? – pin296 Jan 29 '12 at 21:45
It means that $f$ has partial derivatives at $(x,y)=(1,1)$ (since the computation of the derivative in $y$ will give the same result). Now you have to check weather $f$ is differentiable at $(1,1)$. – Davide Giraudo Jan 29 '12 at 21:47

$f$ is differentiable on the open set $\{(x,y)\in\mathbb R^2\mid x\neq y\}$ as a product of such functions. Let $x_0 \in \mathbb R$, we look at partial derivatives at $(x_0,x_0)$. We have $$\lim_{h\to 0^+}\frac{f(x_0+h,x_0)-f(x_0,x_0)}h=\lim_{h\to 0^+}e^{x_0}\frac{e^h-1}h(2x_0-2)=e^{x_0}(2x_0-2)$$ and $$\lim_{h\to 0^-}\frac{f(x_0+h,x_0)-f(x_0,x_0)}h=\lim_{h\to 0^-}e^{x_0}\frac{1-e^h}h(2x_0-2)=-e^{x_0}(2x_0-2),$$ so $f$ cannot have a partial derivative with respect to the first variable if $x_0\neq 1$. For $x_0=1$, we can see that the derivative at $(1,1)$ with respect to $x$ is $0$, and the derivative with respect to $y$ is also $0$. $f$ is differentiable at $(1,1)$ if and only if $$\lim_{(x,y)\to (1,1)}\frac{f(x,y)-f(1,1)-\left(\frac{\partial f}{\partial x}(1,1)x+\frac{\partial f}{\partial y}(1,1)y\right)}{\sqrt{(x-1)^2+(y-1)^2}}=0.$$ Since $\frac{\partial f}{\partial x}(1,1)=\frac{\partial f}{\partial y}(1,1)=0$, we have to see if $\lim_{(x,y)\to (1,1)}\frac{|e^x-e^y|(x+y-2)}{\sqrt{(x-1)^2+(y-1)^2}}=0$. But $$\left|\frac{|e^x-e^y|(x+y-2)}{\sqrt{(x-1)^2+(y-1)^2}}\right|\leq |e^x-e^y|\frac{|x-1|+|y-1|}{\sqrt{(x-1)^2+(y-1)^2}}\leq 2|e^x-e^y|,$$ so the above limit is $0$.
Conclusion: $f$ is differentiable at the points $(x,y), x\neq y$ and $(1,1)$.
Here $(x,y)$ tend to $(1,1)$, not $(0,0)$, but making a substitution you can join this case even if it's not necessary. You can observe that $\frac{x+y-2}{\sqrt{(x-1)^2+(y-1)^2}}$ is bounded. – Davide Giraudo Jan 29 '12 at 22:36
Just notice that $\lim_{(x,y)\to (1,1)}|e^x-e^y|=0$. – Davide Giraudo Jan 30 '12 at 8:49