I am familiar with the equation:
$$dz = \frac{\partial z}{\partial x}dx + \frac{\partial z}{\partial y} dy$$
I am trying to find a way of deriving the meaning of $d^2z$. By definition $d^2z = d(dz)$. So my first attempt is to do something like:
$$d^2z = d(\frac{\partial z}{\partial x}dx + \frac{\partial z}{\partial y} dy)$$
But fundementally, I am not sure what taking $d(something)$ is when it is not respect to a variable. How should I handle / think about this? I came across an explanation on a similar problem: Interpreting higher order differentials which went like:
Lets denote $$df = \left(dx\frac{\partial}{\partial x} + dy\frac{\partial}{\partial y}\right)f$$ then $$ d^2f = \left(dx\frac{\partial}{\partial x} + dy\frac{\partial}{\partial y}\right)\left(dx\frac{\partial}{\partial x} + dy\frac{\partial}{\partial y}\right)f = \left(dx\frac{\partial}{\partial x} + dy\frac{\partial}{\partial y}\right)^2f $$
Problem is, I am having troubles finding a way of justifying (can't seem to see this rule anywhere) the ability to "take out" the $f$. Is this actually true always? The other explanations given are either just explaining intuition, or the derivation is too advance.
Question: Is the explanation outlined valid (ie, in partial differentials can you take out the f, and if so why)
Question: Are there other ways (using chain rule, composite functions etc..) to derive the expression?