0

Define

f(x,y) = x+2y and w = x+y.

What is $\frac{df}{dw}$? Does it make sense to define the partial derivative of a function f with respect to an arbitrary function w(not just x or y)? If so, what does this definition give for the specific example $f(x,y) = x+2y$ and $w = x+y$?

DeepSea
  • 77,651
Chumbawoo
  • 177

3 Answers3

0

No, it's not meaningful unless you specify a coordinate system $(w,z)$ where $w$ is one of the coordinates. When computing $\partial f/\partial w$, you should first express $f$ in terms of $w$ and $z$, and then hold the other variable $z$ constant when you differentiate, so the result depends on what $z$ is.

Sometimes the notation $$\left. \frac{\partial f}{\partial w} \right|_z$$ is used, to emphasize this.

Hans Lundmark
  • 53,395
0

For a question like this it's important to be clear on which variables are independent, and which depend on the others. The most natural interpretation of your question is that $x$ and $y$ are independent variables, and $f$ and $w$ are both functions of $x$ and $y$. In this case $\frac{df}{dw}$ doesn't make sense.

To see why, recall that the notation $\frac{dp}{dq}$ represents the change in $p$ over the change in $q$. If $p(q)$ is a function of a single independent variable $q$, and $q_1$ and $q_2$ are close together, then $$ \frac{p(q_1)-p(q_2)}{q_1-q_2}\approx\left.\frac{dp}{dq}\right|_{q_1}. $$ Now consider the functions $f$ and $w$ depending on two independent variables $x$ and $y$. Consider the points $(x_1,y_1)=(0,0)$ and $(x_2,y_2)=(1,0)$. The change in $f$ over the change in $w$ is $$ \frac{f(x_1,y_1)-f(x_2,y_2)}{w(x_1,y_1)-w(x_2,y_2)} =\frac{0-1}{0-1}=1. $$ On the other hand, consider $(x_3,y_3)=(0,1)$. Then $$ \frac{f(x_1,y_1)-f(x_3,y_3)}{w(x_1,y_1)-w(x_3,y_3)} =\frac{0-2}{0-1}=2. $$ So there is no single value that makes sense for $\frac{df}{dw}$ at $(0,0)$. (you might worry that the points just aren't close enough together, but in fact you can make them as close as you want and get the same numbers).


Another possible interpretation is that $w$ is part of a change of variables, such as $(w,z)=(x+y,x-y)$. In this case we can also express $(x,y)$ in terms of $(w,z)$, namely $(x,y)=(\frac{w+z}2,\frac{w-z}2)$. Thus both pairs $(x,y)$ and $(w,z)$ can act as a pair of independent variables; we can express $f$ in terms of either: $$ f=x+2y=\frac32w-\frac12z. $$ It does make sense to compute the partial derivative of $f$ with respect to $w$: $$ \frac{\partial f}{\partial w}=\frac32. $$ This means that if $w_1,\,w_2$ are close and $z_0$ is fixed, $$ \frac{f(w_1,z_0)-f(w_2,z_0)}{w_1-w_2}\approx\frac32. $$ Note that we are using the same value $z_0$ for both points here; the partial derivative gives the rate of change with respect to $w$ while $z$ is fixed. This also means that we need to know the variable $z$ that is paired with $w$ to form independent variables. I could equally well do a change of variables $(w,v)=(x+y,2y)$, and this would give a different answer.

stewbasic
  • 6,131
-2

$\dfrac{df}{dw} = \dfrac{df}{dx}\cdot \dfrac{dx}{dw} + \dfrac{df}{dy}\cdot \dfrac{dy}{dw}= \dfrac{\dfrac{df}{dx}}{\dfrac{dw}{dx}}+\dfrac{\dfrac{df}{dy}}{\dfrac{dw}{dy}}=\dfrac{1}{1}+\dfrac{2}{1}=3.$

DeepSea
  • 77,651
  • This calculation gives different answers after a change of variables (eg (a,b)=(x+y,x-y)), so I don't think it's meaningful. Are you taking w to be an independent variable which x and y both depend on? – stewbasic Jul 04 '16 at 04:24