In a problem in my textbook i had the following expression:
If $z = f(x,y)$ has continuous second-order partial derivatives and $x = r^{2}+s^{2}$ and $y = 2rs$, find $\displaystyle\frac{\partial z}{\partial r}$ and with this, $\displaystyle\frac{\partial^{2}z}{\partial r^{2}}$
I obtained that $\displaystyle\frac{\partial z}{\partial r}$ was:
$\displaystyle\frac{\partial z}{\partial r} = 2\displaystyle\frac{\partial z}{\partial x}+2r\displaystyle\frac{\partial z}{\partial x}+2s\displaystyle\frac{\partial z}{\partial y}$
However, I'm not sure on how to begin in order to find the second order partial derivative. I saw that in my textbook they obtained that:
$\displaystyle\frac{\partial}{\partial r} (\displaystyle\frac{\partial z}{\partial x})=\displaystyle\frac{\partial}{\partial x}(\displaystyle\frac{\partial z}{\partial x})\displaystyle\frac{\partial x}{\partial r}+\displaystyle\frac{\partial}{\partial y}(\displaystyle\frac{\partial z}{\partial x})\displaystyle\frac{\partial y}{\partial r}$
And similarly the same case for $\displaystyle\frac{\partial}{\partial r} (\displaystyle\frac{\partial z}{\partial y})$
So essentially from what I can understand from this, they are assuming that $\displaystyle\frac{\partial z}{\partial x}$ is a function of both x and y? How can we know that though? Or is it something that i should just know? (what could happen if the partial derivative is just expressed in terms of only x or only y?)