Calculate the directional derivative of $f(x,y)= \frac{x^2-y^2}{x^2+y^2} $ in the direction $\vec{v}=(\cos\phi,\sin\phi)$ $f(x,y)= \frac{x^2-y^2}{x^2+y^2} $ when $(x,y)\neq0$  and $f(x,y)=0$  when $(x,y)=0$
The question:
Calculate the directional derivative of $f$ in the direction $\vec{v}=(\cos\phi,\sin\phi)$ at point $(x,y)$ .
What I did:
$$\lim_{h\to0}\frac{f((x,y)+h(\cos\phi,\sin\phi))-f(x,y)}{h}$$
$$= \lim_{h\to0}\frac{f(x+h\cos\phi,y+\sin\phi)-f(x,y)}{h}$$
$$=\lim_{h\to0}\frac{1}{h}\left({\frac{(x+h\cos\phi)^2-(y+h\sin\phi)^2}{(x+h\cos\phi)^2+(y+h\sin\phi)^2}-\frac{x^2-y^2}{x^2+y^2}}\right)$$
This seems right, but it seems that if I start multiplying everything, it becomes hell, and I can't get it right when there are three lines of equations.
Am I missing something? Is there any better way to do this?
 A: The thing that you are missing is that the function is not continuous at the origin. Using your polar coordinates with angle $\phi,$ for fixed $\phi$ the function is constant, no matter how close to the origin you get. On the $x$ axis $y=0$ (but not the origin) the function is $1.$ On the $y$ axis the function is $-1.$
The directional derivative apparatus should give nonsense if done properly; the exceptional directions would be $x=y$ and $x=-y,$ as you are told the function is defined to be zero at the origin. 
A: $$
D_{\vec{u}}f=\lim_{h\to0}\frac{f(\vec{x}+h\vec{u})-f(\vec{x})}{h} = 
$$
$$
\lim_{h\to0}\frac{f(x+hu_x, y+hu_y)-f(x,y+hu_y)}{h}+\lim_{h\to0}\frac{f(x, y+hu_y)-f(x,y)}{h}=\lim_{u_xh\to0}\frac{f(x+hu_x, y+hu_y)-f(x,y+hu_y)}{hu_x}u_x+\lim_{u_yh\to0}\frac{f(x, y+hu_y)-f(x,y)}{u_yh}u_y=
$$
$$
\frac{\partial  f}{\partial x} u_x + \frac{\partial  f}{\partial y} u_y = \nabla f.\vec{u}
$$
$$
D_{\vec{u}}f= \nabla f.\vec{u} = \frac{2xy^2}{(x^2+y^2)^2}\cdot\cos\phi-\frac{2yx^2}{(x^2+y^2)^2}\cdot\sin\phi
$$
