# Partial derivative of $f(x,y) = x \arctan\left[\frac{x}{y}\right]$

Can someone help me calculating a partial derivative of the function:

$$f(x,y) = \begin{cases} x \arctan\left[\frac{x}{y}\right] & \text{if } y \neq 0 \\ 0 & \text{if } y = 0 \end{cases}$$

To determinate the partial derivative respect to $x$ in $(0,0)$ $$\lim_{h\to 0} \frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}$$ That becomes $$\lim_{h\to 0} \frac{f(0+h,0)-f(0,0)}{h}$$ so $$\lim_{h\to 0} \frac{h\arctan\left[\frac{h}{0}\right]}{h}$$ However $$\lim_{h\to 0} \arctan\left[\frac{h}{0}\right]$$ is indeterminate. The problem is that the the funtion simply substituting becomes indeterminate. However I know that the value of the partial derivative not calculated with the definition is 0. Someone can help me to find the mistake?

$$f_x(0,0)=\lim_{y\to 0}f_x(0,y)=\lim_{y\to 0}\lim_{h\to 0}\frac{f(h,y)-f(0,y)}h$$
$$f_x\left( 0,0 \right) =\lim_{y\rightarrow 0}\lim_{h\rightarrow 0}\arctan \left( \frac{h}{y} \right)$$
Because $$arctan0=0$$, $$f_x(0,y)=0$$
$$f_x(0,0)=\lim_{y\to 0}0=0$$
This makes sense because $$f(0,y)=0$$, so its slope must also be $$0$$