Showing the Existence of Total Derivatives I was presented with the following problem regarding a function that has discontinuous partial derivatives:
$$ f(x,y) =\begin{array}{lr} x y \sin(\frac{1}{x^2 + y^2}) : (x,y) \neq 0\\ 0 : (x,y) = 0\end{array}$$
I showed the existence of the $x$ partial derivative using two cases when $y$ constant is $0$ and when $y \neq 0$ in conjunction with product, chain, and quotient rule. This results in:
$$\begin{align} \frac{\partial f}{\partial x} (x,y) &= -\frac {2x^2 y \cos(\frac{1}{x^2 + y^2})} {(x^2 + y^2)^2} - y\sin(\frac{1}{x^2 + y^2}) : (x,y) \neq 0 \\ \frac{\partial f}{\partial x} (0,0) &= 0 \end{align}$$
I can see that the first part of this piece-wise function does not converge to 0 as $(x,y) \rightarrow 0 $ (in fact it doesn't seem to converge to anything, including $-\infty$). This would imply that the function $f(x,y)$ is not continuously differentiable . However, I am asked to show that this function is differentiable at every point and I have no idea how to do this.
At the continuous points I believe I can use chain rule to maybe show differentiability. Would this be a good strategy? I am thinking about setting:
$$ f(x,y) = g(h(x,y)) $$
where :
$$ h(x,y) = (x,y,xy\sin(\frac{1}{x^2+y2})) $$
$$ g(x,y,z) = xyz $$
However, its not clear to me exactly how easy it is to show differentiability of $h$ and $g$ and address the discontinuous point.
Sorry if I am missing something trivial. I don't often work with not-so-nice functions. But I would be very grateful if someone could push me in the right direction.
 A: If $(x,y) \neq {\bf 0}$, then $f$ is differentiable, because $x,y, \sin$ and $(x^2+y^2)^{-1}$ are differentiable. And in this situation we have:
$$\begin{align*}\frac{\partial f}{\partial x}(x,y) &= y\sin\left(\frac{1}{x^2+y^2}\right) - 2x^2y\cos\left(\frac{1}{x^2+y^2}\right)\frac{1}{(x^2+y^2)^2} \\ \frac{\partial f}{\partial y}(x,y) &= x \sin\left(\frac{1}{x^2+y^2}\right)-2xy^2\cos\left(\frac{1}{x^2+y^2}\right)\frac{1}{(x^2+y^2)^2}\end{align*}$$
Notice the symmetry of the function. And if I'm not wrong, you got an extra minus sign in your calculations.
Our problem is at the origin. Let's compute the partial derivatives at the origin by definition. Needless to say, they will be the same, since the roles of $x$ and $y$ are the same in the expression for $f$. So: $$\frac{\partial f}{\partial x}(0,0)=\lim_{t \to 0}\frac{f(0+t,0)-f(0,0)}{t} = \lim_{t \to 0}\frac{0-0}{t} = 0$$
So, for checking differentiability at the origin, we must only check that the following limit is zero: $$\lim_{(h,k)\to {\bf 0}}\frac{f(0+h,0+k)-f(0,0) - \frac{\partial f}{\partial x}(0,0)h-\frac{\partial f}{\partial y}(0,0)k}{\|(h,k)\|} \\= \lim_{(h,k)\to {\bf 0}} \frac{hk \sin\left(\frac{1}{h^2+k^2}\right)}{\sqrt{h^2+k^2}}= \lim_{(h,k)\to {\bf 0}}h \cdot \frac{k}{\sqrt{h^2+k^2}}\cdot\sin\left(\frac{1}{h^2+k^2}\right) = 0,$$ because the first term goes to zero and the other two are bounded. So $f$ is differentiable at ${\bf 0}$ too.
