I want to show the following thermodynamic identity (Pathria, 3rd Edition, Appendix H, Pg 677): $$\left(\frac{\partial x}{\partial y}\right)_w = \left(\frac{\partial x}{\partial y}\right)_z + \left(\frac{\partial x}{\partial z}\right)_y \left(\frac{\partial z}{\partial y}\right)_w$$
I start with
$$ dx = \left(\frac{\partial x}{\partial y}\right)_z dy + \left(\frac{\partial x}{\partial z}\right)_y dz $$ $$ dx = \left(\frac{\partial x}{\partial y}\right)_w dy + \left(\frac{\partial x}{\partial w}\right)_y dw $$
Yielding $$\left[\left(\frac{\partial x}{\partial y}\right)_w - \left(\frac{\partial x}{\partial y}\right)_z \right] dy = \left(\frac{\partial x}{\partial z}\right)_y dz - \left(\frac{\partial x}{\partial w}\right)_y dw $$ Now consider $$dz= \left(\frac{\partial z}{\partial y}\right)_w dy + \left(\frac{\partial z}{\partial w}\right)_y dw$$ and substitute it in: $$\left[\left(\frac{\partial x}{\partial y}\right)_w - \left(\frac{\partial x}{\partial y}\right)_z \right] dy = \left(\frac{\partial x}{\partial z}\right)_y \left[\left(\frac{\partial z}{\partial y}\right)_w dy + \left(\frac{\partial z}{\partial w}\right)_y dw \right] - \left(\frac{\partial x}{\partial w}\right)_y dw $$ Giving: $$\left[\left(\frac{\partial x}{\partial y}\right)_w - \left(\frac{\partial x}{\partial y}\right)_z - \left(\frac{\partial x}{\partial z}\right)_y \left(\frac{\partial z}{\partial y}\right)_w \right] dy = \left[\left(\frac{\partial z}{\partial w}\right)_y - \left(\frac{\partial x}{\partial w}\right)_y\right] dw $$
This is strange though. If the first identity is true, this implies that $$ \left(\frac{\partial z}{\partial w}\right)_y = \left(\frac{\partial x}{\partial w}\right)_y$$ Something which can easily be shown to not be true, for $x=yz^2$ where $w=yz,$ so $x=w^2 /y,$ and $z=w/y$.
What has gone wrong?