Problem:
Let $f(x,y) = \begin{cases} \frac{xy\sin x}{x^{2}+y^{2}}, & (x,y) \neq (0,0) \cr 0, & (x,y) = (0,0) \end{cases}$
Let $u=\left ( u_{1},u_{2} \right )$ be a unit vector. Find $\frac{\partial f}{\partial u}\left ( 0,0 \right )$.
First Method: I applied the definition: $\frac{\partial f}{\partial u}(0,0) = \lim_{h\to 0} \frac{f(0+u_1 h,0+u_2 h)-f(0,0)}h = \lim_{h\to 0} \frac{u_1 u_2 h^2 \sin(u_1 h)}{h^2 \cdot h}=u_1^2 u_2.$
Second Method I applied another definition of directional derivative: $\frac{\partial f}{\partial u}(0,0) = \nabla f(0,0) \cdot (u_1,u_2) = u_1\frac{\partial f}{\partial x}(0,0) + u_2\frac{\partial f}{\partial y}(0,0) = u_1\cdot0 + u_2\cdot0=0.$
Which method is the correct one? and why did we get different results although both definitions are true?