# differentiation chain rule two variables

$$x,y$$ are independent variables and $$f = f(x,y)$$. Some other variable $$z = z(x,y)$$. I want to calculate $$\frac{df}{dz}$$.

I started as follows, $$\frac{df}{dz} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial z} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial z}$$ Is it correct?

Suppose $$f = x+y$$ and also $$z=x+y$$, so $$\frac{df}{dz} = 1$$. On the other hand $$\frac{\partial f}{\partial y} = 1=\frac{\partial f}{\partial x}$$ and $$\frac{\partial y}{\partial z} =1 = \frac{\partial x}{\partial z}$$

so, $$\frac{\partial f}{\partial x}\frac{\partial x}{\partial z} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial z} = 2$$

can anyone help me figure out what went wrong?

• ${\partial x\over \partial z} \ne \left({\partial z\over\partial x}\right)^{-1}$. You can’t simply take the reciprocals of partial derivatives to get partial derivatives of the inverse function as you can with ordinary derivatives of single-variable functions. – amd Jun 6 at 9:15

What do you mean/hope to calculate by $$\mathrm df/\mathrm dz$$? It would be relatively common to write $$\mathrm df=\dfrac{\partial f}{\partial x}\,\mathrm dx+\dfrac{\partial f}{\partial y}\,\mathrm dy$$ and similarly for $$z$$ in place of $$f$$. But then if you tried to write $$\mathrm df/\mathrm dz$$, you'd usually get weird things that don't simplify (or even make sense?) like $$\dfrac{5\,\mathrm dx+x\,\mathrm dy}{xy^2\,\mathrm dx+e^y\,\mathrm dy}$$.