Chain Rule for Second Partial Derivatives I am trying to understand this:
Let $g:\mathbb{R}\rightarrow\mathbb{R}$ and $f(r,s) = g(r^2s)$, where
$r=r(x,y) = x^2 + y^2$ and $s = s(x) = 3/x$.
What is (with Chain Rule) $$ \frac{\partial^2f}{\partial y\partial x}$$
g is a function of one variable so is the first part just:
$$
\frac{\partial f}{\partial x} = \frac{dg}{dr}\frac{\partial r}{\partial x} + \frac{dg}{ds}\frac{\partial s}{\partial x}
$$

$f$ is a function of two variables ($r$ and $s$), so the chain rule would give
$$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial f}{\partial s} \frac{\partial s}{\partial x}$$
To compute for example $\partial f / \partial r$, remember that g is a function of one variable (say $u=r^2s$) so
$$\frac{\partial f}{\partial r}=\frac{\partial g}{\partial r}=\frac{d g}{d u}\frac{\partial u}{\partial r}=g'(r^2s)\cdot 2rs$$
So overall you would have that
$$\frac{\partial f}{\partial x} = \frac{d g}{d u}\frac{\partial u}{\partial r} \frac{\partial r}{\partial x} + \frac{d g}{d u}\frac{\partial u}{\partial s} \frac{\partial s}{\partial x}
=g'(r^2s)\cdot 2rs\cdot 2x
+g'(r^2s)\cdot r^2\cdot \left(-\frac{3}{x^2}\right)$$
If you want the answer in terms of $r$ and $s$ you can substitute $x$ with $3/s$ to get
$$\frac{\partial f}{\partial x}=g'(r^2s)\cdot (12r-r^2s^2/3)$$
Now think of the above as a new function of $r$ and $s$ (say $h(r,s)$) and try to find its partial derivative with respect to $y$ in the same way.
