Given the function $$f(x,y)=\begin{cases} \frac {xy}{\sqrt{x^2+y^2}}, & x^2+y^2≠ 0 \\ 0, & x=y=0 \end{cases}$$ find its gradient at point $(0,0)$.
If I had the first part of the function only, I would calculate the partial derivatives first: $$\nabla f(x,y)=\left(\frac{\partial f}{\partial x}(x,y),\frac{\partial f}{\partial x}(x,y)\right) = \begin{pmatrix} \frac{y\sqrt{x^2+y^2}-\frac{x^2y}{\sqrt{x^2+y^2}}}{x^2+y^2}\\ \frac{x\sqrt{x^2+y^2}-\frac{xy^2}{\sqrt{x^2+y^2}}}{x^2+y^2}\\ \end{pmatrix}= \begin{pmatrix} \frac{y^3}{(x^2+y^2)^{3/2}}\\ \frac{x^3}{(x^2+y^2)^{3/2}} \end{pmatrix} $$ Then would find the gradient value at point $(0,0)$, which of course would not exist since the partial derivatives are not defined at this specific point.
However, my function is defined at the point of interest differently, namely as $0$. The partial derivatives of this function are also equal to $0$. Thus, the gradient is also a zero vector $$\nabla f(0,0)=\left(\frac{\partial f}{\partial x}(0,0),\frac{\partial f}{\partial x}(0,0)\right)=(0,0).$$
Is this line of reasoning correct or are there any other subtleties pertaining to the continuity and differentiability of functions?
Since $$ \frac{{f\left( {0 + h,0} \right) - f\left( {0,0} \right)}} {h} = \frac{{\frac{{h \cdot 0}} {{h^2 + 0^2 }} - 0}} {h} = \frac{{0 - 0}} {h} = 0 $$ it follows, by definition, that $$ \frac{{\partial f}} {{\partial x}}\left( {0,0} \right) = \mathop {\lim }\limits_{h \to 0} \frac{{f\left( {0 + h,0} \right) - f\left( {0,0} \right)}} {h} = \mathop {\lim }\limits_{h \to 0} 0 = 0 $$ The same is true for $$ \frac{{\partial f}} {{\partial y}}\left( {0,0} \right) $$ which is still $0$. Therefore you have that your gradient is $(0,0)$.