In the beginning of a chapter that speaks about second order directional derivatives, my textbook presents the following example that shows that generally, the order by which we derive a certain function may matter greatly. Unfortunately I got stumped by some step along the way. The example goes as follows:
$$ f:\mathbb{R}^2 \rightarrow \mathbb{R} $$ $$ (x,y) \longrightarrow \begin{cases} \frac{x^2 - y^2}{x^2 + y^2}xy & (x,y)\neq(0,0)\\ 0 & (x,y)=(0,0) \end{cases} $$ As the function is broken up at the point $(0,0)$ we must use the limit definition to calculate the partial derivatives at $(0,0)$. So, the way I thought it should be done is by calulating as follows: $$ \frac{f_{|(0,0),(1,0)}(t) - f_{|(0,0),(1,0)}(0)}{t}=\frac{\frac{t^2 - 0}{t^2}t\cdot0 - 0}{t} = 0\xrightarrow[t \rightarrow 0]{}0 $$ I thought that at this point we can safely say $\frac{\partial f}{\partial x}(0,0) = 0$. However, my textbook, though it starts as I did, goes further to say: $$ \text{when } y \neq 0 \text{ we have } \frac{f(x,y) - f(0,y)}{x - 0} = \frac{x^2 - y^2}{x^2 + y^2}y \xrightarrow[x \rightarrow 0]{}-y $$
And thus we have $\frac{\partial f}{\partial x}(0,y) = -y$. Next the second order is calculated: $\frac{\partial^2 f}{\partial y \partial x}(0,0) = -1$. The same process is repeated in the reverse order and we get $\frac{\partial^2 f}{\partial x \partial y}(0,0) = 1$.
I went over the definitions of directional derivative and partial derivative yet I still don't fully understand the process. Why do we calculate $\frac{\partial f}{\partial x}(0,y)$, that is for all $y$? Isn't $\frac{\partial f}{\partial x}(0,0)$ suppose to be enough to find the second order in the $y$ direction?
Thanks!