Partial derivative with variables where some are dependent on each other

derivativesmultivariable-calculuspartial derivativepartial differential equations

Say I have a function $f(x,y,z,w)$.

Let $x$ and $y$ each be a function of $z$ and $w$ so $x=x(z,w)$ and $y=y(z,w)$.

Then we have a function of the form

$$f(x(z,w),y(z,w),z,w)$$

Using the chain rule for functions of multiple variables I get

$$\frac{\partial f}{\partial z} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial z}+ \frac{\partial f}{\partial y}\frac{\partial y}{\partial z}+ \frac{\partial f}{\partial z}\frac{\partial z}{\partial z}+ \frac{\partial f}{\partial w}\frac{\partial w}{\partial z}$$

As $w$ is not dependent on $z$ then $\frac{\partial w}{\partial z}=0$

$$\frac{\partial f}{\partial z} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial z}+ \frac{\partial f}{\partial y}\frac{\partial y}{\partial z}+ \frac{\partial f}{\partial z}1+ \frac{\partial f}{\partial w}0$$

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

This means $\frac{\partial x}{\partial z}=0$ and $\frac{\partial y}{\partial z}=0$ but this is not necessarily true because $x(z,w)$ and $y(z,w)$ are dependent on $z$.

I am unsure where this contradiction is coming from. I think I must be applying the chain rule incorrectly. I am also unsure when partially differentiating with respect to $z$ whether to treat just $w$ as a constant or $x,y$ and $w$ as constants.

I found similar problems:
Partial derivative of a two variables function, one of which dependent on the other
Partial Derivatives – constants
However these discussed functions that can be written in terms of one variable whereas the function I am confused with can be written in terms of two variables at the least ($z$ and $w$).

Please explain what I am doing wrong and thank you for any help!

Best Answer

$$f(x(z,w),y(z,w),z,w)=g(z,w)$$ Don't confuse $\frac{\partial f}{\partial z}$ with $\frac{\partial g}{\partial z}$

$\frac{\partial f}{\partial z}$ means the partial derivative of $f$ with respect to $z$ for $x$ independant of $z$, which is not the same for $g$.

Thus the correct expression is : $$\frac{\partial g}{\partial z} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial z}+ \frac{\partial f}{\partial y}\frac{\partial y}{\partial z}+ \frac{\partial f}{\partial z}$$

It is clear that $$\frac{\partial g}{\partial z} \neq \frac{\partial f}{\partial z}$$

However, loosely the same symbol $f$ is used instead of two distinct symbols $f$ and $g$. This is acceptable for people familiar with this ambiguous writting. They are aware of apparent contradictions which can arise and they avoid mistakes in mentally making the distinction between the two different signification of the symbol $f$.

IN ADDITION :

Since this seems difficult to well understand, consider a concret example :

$$f(x,y,z,w)=5x+4y+3z+2w$$

$$\frac{\partial f}{\partial x}=5\quad;\quad \frac{\partial f}{\partial y}=4\quad;\quad \frac{\partial f}{\partial z}=3$$

Then consider another function $g(z,w)$ defined from the preceeding function in the particular case of $$x(z,w)=6z+7w\quad\text{and}\quad y(z,w)=8z+9w$$ $$\frac{\partial x}{\partial z}=6\quad;\quad \frac{\partial y}{\partial z}=8$$ $$g(z,w)=5(6z+7w)+4(8z+9w)+3z+2w$$ $$g(z,w)=65z+73w$$ Obviously $5x+4y+3z+2w$ is something else than $65z+73w$ . So $f(x,y,z,w)$ and $g(z,w)$ are not a same function. They cannot be confused.

$$\frac{\partial g}{\partial z}=65$$

We see that $\frac{\partial g}{\partial z}$ is obtained directly by partial differentiation of $g(z,w)$. But instead of, if we want to compute $\frac{\partial g}{\partial z}$ indirectly from the properties of the functions $f(x,y,z,w)$ , $x(z,w)$ and $y(z,w)$ we apply the chain rule of derivations : $$\frac{\partial g}{\partial z} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial z}+ \frac{\partial f}{\partial y}\frac{\partial y}{\partial z}+ \frac{\partial f}{\partial z}$$ $$\frac{\partial g}{\partial z} =5*6+4*8+3=65$$ As expected, the same result as before $65$ is obtained without expressing explicitely $g(z,w)$. This is purely a consequence of the chain rule. There is no need for more explanation insofar the theory of the chain rule was studied and understood.

Related Question