Find the partial derivatives of $f (x,y) = x^2\sin(1/x)+y^2$ at (0,0) Find the partial derivatives of $f (x,y) = x^2\sin(1/x)+y^2$ at $(0,0)$
Is this function differentiable at the origin? 
 $$f(x,y) =  x^2\sin(1/x)+y^2 \quad \text{if $(x,y) \ne 0$}  $$
$$   = y^2 \qquad \text{if $(x,y) = 0$} $$
I found that
$$\frac{df}{dx} =2x\sin(1/x)-\cos(1/x)$$
$$\frac{df}{dy} =y^2$$
df/dy(0,0) is easy it's df/dy=0^2=0
But df/dx(0,0) is a bit more complicated as $\sin(1/x)$ is undefined at x=0 perhaps i can use squeeze theorem to say that the limit of df/dx as it approaches x=0 is 0 but that would be the limit and not df/dx(0,0)
How do i find $\frac{df}{dx}(0,0)$
 A: Using that you have:
$$
f(x,y) =\left\{
\begin{aligned}
  &x^2\sin(1/x)+y^2 \quad &\text{if} \quad &(x,y) \ne (0,0) \\
   &y^2 \qquad &\text{if} \quad &x=y=0 
\end{aligned}\right.
$$
Applying the limit definition of derivative gives:
$$
\begin{aligned}
\frac{\partial f}{\partial x}(0,0)&=\lim_{h\rightarrow 0}\frac{f(h,0)-f(0,0)}{h}\\
&=\lim_{h\rightarrow 0}\frac{h^2 \sin(1/h)+0^2}{h}\\
&=\lim_{h\rightarrow 0}h \sin(1/h)\\
&=0.
\end{aligned}
$$
This limit is zero, thus $f_x(0,0)=0$. 
A: The correct problem is surely $f(x,y) = x^2\sin(1/x) + y^2, x \ne 0,$  $f(x,y) = y^2, x = 0.$ Then for $x\ne 0,$ $f(x,0) = x^2\sin(1/x).$ Hence $\partial f/\partial x (0,0) = 0.$ Since $f(0,y) = y^2,$ we easily see $\partial f/\partial y (0,0) = 0.$
As for differentiability: Define $g(x)$ on $\mathbb {R}$ by $g(x)= x^2\sin(1/x), x \ne 0, g(0) = 0.$ Then $g$ is differentiable on $\mathbb {R}.$  Hence $G(x,y) = g(x)$ is differentiable on $\mathbb {R}^2.$ Since $f(x,y) = G(x,y) + y^2,$ a sum of differentiable functions on $\mathbb {R}^2,$ $f(x,y)$ is differentiable everywhere on $\mathbb R ^2.$
