Let $f = f(x,y,z,w)$ where $w = w(x,y,z)$. How do you compute $\frac{\partial f}{\partial x}$? For example, say $f(x,y,z,w) = x + yze^{xw}$. Then you would get $\frac{\partial f}{\partial x} = (1 + yzwe^{xw}) + (0 + yz\frac{\partial w}{\partial x})e^{xw}$ = (take derivative with respect to x as if y,z,w is constant) + (take derivative as if x,y,z constant but w is still a function of x). So a general formula would then be \begin{equation} \frac{\partial f}{\partial x}|_{(x_0,y_0,z_0)} = \frac{\partial}{\partial x} f(x,y_0,z_0,w(x_0,y_0,z_0))|_{x = x_0} + \frac{\partial}{\partial x} f(x_0,y_0,z_0,w(x,y_0,z_0))|_{x = x_0} \end{equation}
Is this correct? If so, is there a simpler way of seeing why this formula works?