Let
$$
\begin{align}
w &= f(x,y,z)\\
z &= z(x,y)\\
x &= x(t)\\
y &= y(t)\\
\end{align}
$$
be differentiable functions.
Find the formula for the derivative of $w$ with respect to $t$.
My answer: $w = f(x,y,z) \implies \dfrac{dw}{dt} = \dfrac{dw}{dx} \cdot \dfrac{dw}{dy} \cdot\dfrac{dw}{dz}$ $$ \begin{align} z &= z(x,y) \\ x &= x(t) \\ y &= y(t) \\ \end{align} \implies \frac{dz}{dt} = \frac{\partial z}{\partial x} \cdot \frac{dx}{dt} + \frac{\partial z}{\partial y}\cdot\frac{dy}{dt} $$ It is getting confusing to me. I used to make a tree diagram to make it a bit easier but this time, it is out of my reach. Can someone give me a hint?