Solution (source code)

= Solution

Differentiability at $p$ means $f(p+h)=f(p)+Lh+o(|h|)$ for a <linear map> $L=Df(p)$; <partial derivatives> are its values on coordinate <vectors>. Integrating the <partial derivatives> along the two coordinate segments and using continuity at $p$ proves the stated sufficient condition. Here $f(x,y)=g(x)+g(y)$ with $g(t)=t^2\sin(1/t)$ and $g(0)=0$. Since $g\prime(0)=0$, $f$ is <differentiable> everywhere. But $g\prime(t)=2t\sin(1/t)-\cos(1/t)$ does not approach $0$ at zero, so $f$ is $C^1$ exactly where $xy\ne0$.