This was part of an exam of a course on multivatiable calculus:
Let $g:\mathbb{R} \to \mathbb{R}$ be a bounded $C^1$ function and $f:\mathbb{R}^2 \to \mathbb{R}$ be defined as $$f(x,y)= \begin{cases} y+x^2g(y/x^2) \quad \mbox{if $x \not= 0$} \\y \quad \mbox{if $x=0$} \end{cases}$$ 1) Analize continuity of $f$ (I had no problem with this part)
2) Analize differentiability of $f$
3)Analize whether $f$ is $C^1$ in some neigborhood of the origin depending on $g$
The solution given asserts that $f$ is differentiable everywhere (regardless of $g$) and that it is $C^1$ in a neighborhood of the origin iff $g$ is constant.
I couldn't arrive at that result, I've computed partials and got this:
$f_x(x,y)= \begin{cases} 2xg(y/x^2)-(2y/x)g'(y/x^2) \quad \mbox{if $x \not=0$} \\ 0 \quad \mbox{otherwise}\end{cases}$
$f_y(x,y)= \begin{cases} 1+x^2g'(y/x^2) \quad \mbox{if $x \not=0$} \\ 1 \quad \mbox{otherwise}\end{cases}$
I want to check if $f$ is differentiable at the origin regardless of $g$ but it seems I can't use the criterion of having continuous partial derivatives at that point, since they are not continuous for the $C^1$ bounded function $g(t)=\sin(t^4)$ (make $(x,y)$ tend to zero along the curve $y=x$). So, what other criterion can I use?
For the third part I can see that whenever $g$ is constant the partials of $f$ are continuous at the origin but I'm confused on how to prove the converse.
Thanks for any hint or guidance