The problem is that ∂x∂w is used
to represent
two completely different functions in the same equation. The careful way
to write the equation is the following. Let f(x,y,z)
and g(x,y) be continuously differentiable functions and define
w(x,y)=f(x,y,g(x,y)). By the chain rule,
∂x∂w(x,y)=∂x∂f(x,y,g(x,y))∂x∂x+∂y∂f(x,y,g(x,y))∂x∂y+∂z∂f(x,y,g(x,y))∂x∂g(x,y)=∂x∂f(x,y,g(x,y))+∂z∂f(x,y,g(x,y))∂x∂g(x,y)
While w(x,y)=f(x,y,g(x,y)), it is not true that
∂x∂w(x,y)=∂x∂f(x,y,g(x,y)).
For example, take f(x,y,z)=x−z and g(x,y)=x. Then
w(x,y)=f(x,y,g(x,y))=x−g(x,y)=0 for all (x,y), so that
∂x∂w(x,y)=0
while ∂x∂f(x,y,z)=1 for all (x,y,z).