I'm currently working on a physics exercise where I'm told:
Given two functions $f$ and $g$ which are both continuously differentiable and depend on $x$ and $y$. Show that the following relation holds $$ \left( \frac{\partial f}{\partial x} \right)_g =\left( \frac{\partial f}{\partial x} \right)_y - \left( \frac{\partial f}{\partial y} \right)_x \left( \frac{\partial g}{\partial x} \right)_y \left( \frac{\partial g}{\partial y} \right)_x^{-1}. $$
My first approach to this problem was that I build the total derivatives of $f$ and $g$, namely $$ d f = \left( \frac{\partial f}{\partial x} \right)_y d x + \left( \frac{\partial f}{\partial y} \right)_x d y $$ and $$ d g = \left( \frac{\partial g}{\partial x} \right)_y d x + \left( \frac{\partial g}{\partial y} \right)_x d y. $$ I then expressed $dy$ as a function of $dg$ and $dx$ and inserted this expression into the $df$ term. Doing this gave me $$ df = \left[ \left( \frac{\partial f}{\partial x} \right)_y - \left( \frac{\partial f}{\partial y} \right)_x \left( \frac{\partial g}{\partial x} \right)_y \left( \frac{\partial g}{\partial y} \right)_x^{-1} \right] d x + \left( \frac{\partial f}{\partial y} \right)_x \left( \frac{\partial g}{\partial y} \right)_x^{-1} d g. $$
The problem is that I don't really know how to go on from here with the information I have available. I think I "could" go on if would make the assumption that I could write $g=g(x,y) \rightarrow y=y(g,x)$, then build the total derivative of $f(x,y(g,x))$, namely $$ d f = \left( \frac{\partial f}{\partial x} \right)_g d x + \left( \frac{\partial f}{\partial g} \right)_x \left( \frac{\partial g}{\partial y} \right)_x d g, $$ and compare coefficients. But I'm really not sure if I'm allowed to just invert the function $g(x,y)$ with the information I'm handed (that they are continuously differentiable) because, I guess, it's now always possible to invert the function like this?
I would really appreciate any comments on this problem and maybe there is some other approach to this problem which I did not consider.
Your second equation is $$ d g = \left( \frac{\partial g}{\partial x} \right)_y d x + \left( \frac{\partial g}{\partial y} \right)_x d y. $$So, at constant g, $$ \left( \frac{\partial g}{\partial x} \right)_y d x + \left( \frac{\partial g}{\partial y} \right)_x d y=0 $$So, $$\left(\frac{\partial y}{\partial x}\right)_g=-\frac{\left(\frac{\partial g}{\partial x}\right)_y}{\left(\frac{\partial g}{\partial y}\right)_x}$$