Let $f:\mathbb{R}^2 \to \mathbb{R}$ defined by:
$f(x,y) = \begin{cases} \left( x^2 \right) \sin \left(\frac{y}{x^2} \right) & \text { if } x \neq 0\\ 0 & \text{ if } x = 0 \end{cases}$
Is the function $f$ differentiable or not? I don’t know whether my solution is right, so I’ll post it here.
My solution:
If $x \neq 0$, than $f(x,y) = x^2 \sin(y/x^2)$ is differentiable as it is the product of differentiable functions.
Now for $x=0$, let's consider the limit:
$$\begin{align*} \lim_{h \to 0} \frac{f(h,y) - f(0,y)}{h} &= \lim_{h \to 0} h^2\sin(\frac{y}{h^2})\\ &= \lim_{h \to 0} h^2\sin(yh^{-2})\\ &= \lim_{h \to 0} h^{2} = 0 \end{align*}$$
Therefore the function $f$ is differentiable.
MY NEW SOLUTION: I first calculated the partial derivatives with respect to x and y with limits at the point $(0,y)$.
$\frac{\partial f}{\partial x}(0,y)= \lim_{h \to 0} \frac{f(0+h,y)-f(0,y)}{h} = 0$
$\frac{\partial f}{\partial y}(0,y) = \lim_{k \to 0} \frac{f(0,y+k)-f(0,y)}{k} = \lim_{k \to 0} \frac{0-0}{k} = 0$
Consequently, since $f(x, 0) = 0$ and the only candidate for a derivative matrix is $f'(x, 0) = (0, 0)$, we have:
$E(h,k):= f(0+h,y+k) = f(h,y+k) = h^2 \sin(\frac{y+k}{h^2})$
Then:
$0 \leq \frac{|E(h,k)|}{||(h,k)||} \leq \frac{h^2\sin(\frac{y+k}{h^2})}{\sqrt{h^2+k^2}} \leq |h| \cdot \frac{|h|}{\sqrt{h^2+k^2}} \leq |h|$
This converge to zero when $(h,k) \to 0$, therefore $f$ is differentiable at the point $(0,y)$.