I'm trying to find out if the partial derivatives of the following function exist at $(0,0)$.
$$f(x,y)=\left\{ \begin{array}{c} |x| \quad \text{ if }y = x^2 \\ 0 \quad \text{ if }y \neq x^2 \end{array} \right.$$
My attempt:
The x-derivative at zero is: $$\frac{\partial f}{\partial x}(0,0)= \lim_{t \rightarrow 0}\frac{f(t,0)-f(0,0)}{t}$$
So it will exist if the side derivatives exist and are equal.
$$\lim_{t \rightarrow 0^{-}}\frac{f(t,0)-f(0,0)}{t}=\lim_{t \rightarrow 0^{-}}\frac{|t|}{t} = \frac{-t}{t}=-1$$
$$\lim_{t \rightarrow 0^{+}}\frac{f(t,0)-f(0,0)}{t}=\lim_{t \rightarrow 0^{+}}\frac{|t|}{t} = \frac{t}{t}=1$$
So the x-derivative doesn't exist. However my book says both $\frac{\partial f}{\partial x}(0,0)$ and $\frac{\partial f}{\partial y}(0,0)$ exist and are equal to zero. Have I done something wrong?
Note that your function is given by two different rules deending on the values of $x$ and $y$. You seem to have assumed that $f(t,0)$ is always equal to $|t|$, it's not. In fact for $f(t,0)$ we have
in other words, $f(t,0)$ is always $0$. So $$\frac{\partial f}{\partial x}(0,0) =\lim_{t \rightarrow 0}\frac{f(t,0)-f(0,0)}{t} =\lim_{t \rightarrow 0}\frac{0}{t}=0\ .$$ Try the other for yourself.