I'm trying to build an intuition for the partial derivative formula for: $$z = f(x, y), x = g(w), y = h(w)$$ where $z$ is a function in $x$ and $y$, and $x$ and $y$ themselves are each a function in $w$.
I know that: $$\frac{dz}{dw} = \frac{∂z}{∂x}\frac{dx}{dw} + \frac{∂z}{∂y}\frac{dy}{dw}$$ I also understand that the two terms in the sum are each an application of the chain rule. What I'm having trouble understanding is - why are the two terms being summed together?
The graph of a smooth function of two variables looks locally like a (slanted) plane lying above the $x$-$y$ plane.
Because of the slope, a slight increase in $x$ (say by $\varepsilon$) will result in a slight change in $z$ (by $\frac{\partial f}{\partial x}\cdot \varepsilon$ as a first order approximation). You can picture yourself walking on that surface, the derivative tells you how hard it is to walk up as you move in the direction of increasing $x$ values. Similarly an increase in $y$ will result in a change in $z$.
Now if you increase $x$ and then $y$, there are two successive changes in altitude which add up.
If both $x$ and $y$ are considered as functions of some variable $w$, then an increase in $w$ (say by $\eta$) will result in a change of $x$ by $\frac{\partial x}{\partial w}\cdot \eta$ and this slight change in $x$ becomes your $\varepsilon$, hence the chain rule. The total change in $z$ is $$\frac{\partial f}{\partial x} \frac{\partial x}{\partial w}\cdot \eta +\frac{\partial f}{\partial y} \frac{\partial y}{\partial w}\cdot \eta $$