[Math] Differentiating with respect to a function

calculus

I have a question regarding partial differentiation of a function of $x,y$ with respect to another function of $x,y$.

Specifically, I was wondering whether my logic or technique would hold true for most stuations.

$$
\begin{align*}
\frac{\partial(x-y)}{\partial y} & = -1 \\
& = -1\cdot\frac{\partial f(x-y)}{\partial f(x-y)}
\end{align*}
$$

Then, cross multiplying, we get:
$$
\begin{align*}
\frac{\partial f(x-y)}{\partial (x-y)} = -1 \cdot \frac{\partial f(x-y)}{\partial y}
\end{align*}
$$

My technique consisted of first constructing a partial derivative with respect to a variable, which equaled a quantity (it happened to be a scalar in the above example). Then, I multiplied by $1 = \frac{\partial f(x-y)}{\partial f(x-y)}$. Then, I rearranged the terms.

Is this a valid technique? I checked my calculus book under partial derivatives, under the chain rule, and also did a general search on derivative with respect to a function. I'm not sure if what I am doing relates closely to calculus of variations.

Thanks.

Best Answer

Your calculation is correct, but I'm hesitant to call it a "valid technique." Let me explain a bit:

In the context you're working in, we have a function $f(u)$, which is a function of a single variable, and also $u(x,y) = x - y$ is a function of two variables. In this setup, the chain rule reads as follows:

$$\frac{\partial f}{\partial x} = \frac{df}{du}\frac{\partial u}{\partial x}$$ $$\frac{\partial f}{\partial y} = \frac{df}{du}\frac{\partial u}{\partial y}$$

Since $\frac{\partial u}{\partial y} = -1$, we can conclude that $\frac{\partial f}{\partial y} = -1\cdot \frac{df}{du}$, and therefore that $$\frac{df}{du} = -1\cdot \frac{\partial f}{\partial y},$$ which, in your (somewhat non-standard) notation reads $\frac{\partial f(x-y)}{\partial (x-y)} = -1\cdot \frac{\partial f(x-y)}{\partial y}$. So, this equation is true, yes.


The reason I hesitate to call your method a "valid technique" is because one usually cannot manipulate the symbols $\partial x$ and $\partial y$ as independent entities.

For instance, if $f$ were instead a function of two variables, say $f(u,v)$, where both $u$ and $v$ were themselves functions of two variables (say $u = u(x,y)$ and $v = v(x,y)$), then the chain rule would read

$$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial u}\frac{\partial u}{\partial x} + \frac{\partial f}{\partial v}\frac{\partial v}{\partial x}$$ $$\frac{\partial f}{\partial y} = \frac{\partial f}{\partial u}\frac{\partial u}{\partial y} + \frac{\partial f}{\partial v}\frac{\partial v}{\partial y}.$$ If you'll notice, we really can't interpret the $\partial u$ and $\partial v$ signs as canceling without getting false identities like $\frac{\partial f}{\partial x} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial x}$.

Amusing Example: Just to really drive the point home, consider the ideal gas law (from chemistry) $PV = nRT$, where $n$ and $R$ are constants. We can consider $P$, $V$, and $T$ as functions $$P = P(V,T) = nR\frac{T}{V}$$ $$V = V(P,T) = nR \frac{T}{P}$$ $$T = T(P,V) = \frac{1}{nR}PV.$$ One can then check that, in fact: $$\frac{\partial P}{\partial V} \frac{\partial V}{\partial T}\frac{\partial T}{\partial P} = -1.$$ So much for canceling.

Related Question