Multivariable chain rule for $f(x,y,g(x,y))$ when finding $\tfrac{\partial f}{\partial x}$.

Consider the function $$f(x,y,z)$$ where $$z=g(x,y)$$. If I took the partial derivative wrt $$x$$ what I'd end up getting would be:

$$\dfrac{\partial f}{\partial x} = \dfrac{\partial f}{\partial x} \dfrac{\partial x}{\partial x}+\dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial x}+\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x}$$

$$\dfrac{\partial f}{\partial x} = \dfrac{\partial f}{\partial x} +\dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial x}+\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x}$$

Well, this is quite obviously wrong, since that would imply $$\dfrac{\partial f}{\partial g} \dfrac{\partial g}{\partial x} = 0$$. How would I correctly express the partial derivative with respect to x in this case?

Consider the multi-variables function defined as $$\quad f(X,Y,Z)$$

In the particular situation where $$\begin{cases} X=x \\ Y=y \\ Z=g(x,y) \end{cases} \implies \quad f\big(x,y,g(x,y)\big)=F(x,y)$$

The functions $$f$$ and $$F$$ should no be confused because the first is a function of three arguments while the second is a function of two arguments. So they are not the same function. They are equal only in some particular cases of relationship between the arguments.

The chain rule leads to : $$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}\frac{\partial X}{\partial x}+\frac{\partial f}{\partial Y}\frac{\partial Y}{\partial x}+\frac{\partial f}{\partial Z}\frac{\partial Z}{\partial x}$$

And with the particular case defined above : $$\frac{\partial X}{\partial x}=1$$ ; $$\frac{\partial Y}{\partial x}=0$$ ; $$Z=g$$ ; $$\frac{\partial Z}{\partial x}=\frac{\partial g}{\partial x}$$

$$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}(1)+\frac{\partial f}{\partial Y}(0)+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$

$$\frac{\partial F}{\partial x}=\frac{\partial f}{\partial X}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$

If we confuse $$F$$ with $$f$$ and if we set $$X(x)=x$$ writting $$\frac{\partial f}{\partial x}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}\implies \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}=0$$ is absurd.

Often this confusion is loosely or deliberately made in oder to simplify the writings. There is no ill consequence for experienced people who keep in mind the different meanings of the symbols. For less experienced people it is suggested to use different symbols for the functions and variables when a confusion is likely to occur.

• Thanks so much, that clears it up nicely! May 21, 2020 at 9:01
• “Experimented” people? Did you mean to write “experienced?”
– amd
May 22, 2020 at 7:28
• Yes, corrected now. Thanks. May 22, 2020 at 7:59