Tricky question about differentiability at the origin Let $f: \mathbb{R}^2 \to \mathbb{R} $ be given as 
$$
f(x,y) =
\begin{cases}
y, & \text{if }\text{ $x^2 = y $} \\
0, & \text{if }\text{ $x^2 \neq y $}
\end{cases}
$$
Is this function differentiable at $(0,0)$ ?
 A: Let me quote from Apostol's Calculus Vol. II (page 258):

Let $f:S\to\mathbb{R}$ be a scalar field defined on a set $S$ in
  $\mathbb{R}^n$.  Let $a$ be an interior point of $S$, and let $B(a;r)$
  be an $n$-ball lying in $S$.  Let $v$ be a vector with $||v||\lt r$,
  so that $a+v\in B(a;r)$.  We say that $f$ is differentiable at $a$ if
  there exists a linear transformation
$$T_a:\mathbb{R}^n\to\mathbb{R}$$ from $\mathbb{R}^n$ to $\mathbb{R}$,
  and a scalar function $E(a,v)$ such that
$$f(a+v)=f(a)+T_a(v)+||v||E(a,v)$$
for $||v||\lt r$, where $E(a,v)\to0$ as $||v||\to0$.

In the case at hand, $a=(0,0)$ and $v=(x,y)$ so that $||v||=\sqrt{x^2+y^2}$.  For simplicity, let's rewrite $E(a,v)=E((0,0),(x,y))$ as simply $E(x,y)$.  It suffices to let $T_a=0$, so that
$$E(x,y)={f(x,y)\over \sqrt{x^2+y^2}}=
\begin{cases}
\sqrt{y\over1+y}\quad\text{if }x^2=y\\
0\quad\text{if }x^2\not=y
\end{cases}$$
and now check that $E(x,y)\to0$ as $(x,y)\to0$, which is clearly the case!
A: Yeah. It is easy to show that $f$ admits partial derivatives at $(0,0)$, both equal to $0$, for example $$\frac{\partial f}{\partial x}(0,0)=\lim_{x\to 0}\frac{f(x,0)-f(0,0)}{x}=0$$ 
To show that $\lim_{(x,y)\to 0}\frac{f(x,y)}{||(x,y)||}=0$ note that $$\Bigg|\frac{f(x,y)}{||(x,y)||}\Bigg|\leq \frac{x^2}{||(x,y)||}.$$ 
since $f(x,y)=x^2$ or$f(x,y)=0$. Now try to show that $$\lim_{(x,y)\to(0,0)}\frac{x^2}{\sqrt{x^2+y^2}}=0.$$ See the graph (in red) below to understand the definition of $f$

A: My answer is mostly a compilation of what was already said by everyone else.
Intuitively, the function seems to be differentiable at $(0, 0)$. As $(x, y)$ approaches $(0, 0)$, $f(x, y)$ is either already $0$ or it is $f(x, y) = y = x^2$ which we know goes to $0$ much faster than any non-zero linear function ($x^2$ is flat at $x = 0$). So the derivative seems to be the zero map (graphically, its just the $xy$-plane).
In fact, as Etienne pointed out in the comments, if it is differentiable, then the matrix of the derivative map is the Jacobian matrix of partial derivatives. Since all the partial derivatives are zero, the only candidate for the derivative is the zero map. So we just need to check whether the zero map is indeed the derivative. If it is, then $f$ is differentiable at $(0, 0)$. Otherwise $f$ is not differentiable at $(0, 0)$ since the zero map is the only candidate; no other map is possible since the matrix wouldn't have the right partial derivatives.
I will use Spivak's definition of differentiability. Other definitions by other authors are similar; you will end up getting the same limit expression. Let $Z$ be the zero map. We need to check
$$
\lim_{(h, k) \to (0, 0)}\frac{\|f((0, 0) + (h, k)) - f(0, 0) - Z(h, k)\|}{\|(h, k)\|} = 0.
$$
Indeed we have
$$
\lim_{(h, k) \to (0, 0)}\frac{\|f((0, 0) + (h, k)) - f(0, 0) - Z(h, k)\|}{\|(h, k)\|} = \lim_{(h, k) \to (0, 0)}\frac{|f(h, k)|}{\sqrt{h^2 + k^2}} \\
\leq \lim_{(h, k) \to (0, 0)}\frac{h^2}{\sqrt{h^2}}
= \lim_{(h, k) \to (0, 0)}\frac{h^2}{h}
= \lim_{(h, k) \to (0, 0)} h
= 0.
$$
So this proves that $f$ is differentiable at $(0, 0)$ and the derivative is the zero map which agrees with our intuition.
It is interesting to note that if the function was
$$
f(x,y) =
\begin{cases}
1, & \text{if }\text{ $x^2 = y \neq 0 $} \\
0, & \text{if }\text{ $x^2 \neq y $}
\end{cases}
$$
instead, then $f$ would not have been differentiable (or even continuous) at $(0, 0)$ even though partial derivatives would exist.
