Multivariable Calculus – Partial Derivatives Depend on Variable Definitions

multivariable-calculuspartial derivative

Suppose I have $f_1(x,y) = x^2+xy+y^2$. Then $\frac{\partial f_1}{\partial x} = 2x + y$.

But then if I define $u=x^2$, and then $f_2(x,y,u)=u+xy+y^2$. Then $\frac{\partial f_2}{\partial x} = y$. Yet, $f_1$ and $f_2$ are in some sense exactly the same function.

Is this expected, or am I misusing the partial derivative?

How I think this paradox is resolved: The first function maps from $\mathbb{R}^2$ to $\mathbb{R}$, and the second function could really be seen as a mapping from a particular 2-dimensional manifold $M\subseteq \mathbb{R}^3$ (defined by $M=\{(x,y,z):z=x^2\}$). If we first map $\mathbb{R}^2$ to $M$, then compose with $f_2$, that's exactly equal to $f_1$.

So: maybe the answer is that viewing $f_2$ as a function from $\mathbb{R}^3\rightarrow\mathbb{R}$, then $\frac{\partial f_2}{\partial x}=y$ is exactly right. But if we use the fact that $u=x^2$, then we view $f_2$ as a function from $\mathbb{R}^2\rightarrow\mathbb{R}$, it's not right. The ambiguity seems to come from the fact that $\frac{\partial}{\partial x}$ could be a tangent vector of either $\mathbb{R}^3$ or $\mathbb{R}^2$, and on a case-by-case basis, one would need to be clear about which one it is.

Except, I don't see that clarity in most uses of partial derivatives. If there is a function defined on $n$ variables, and then it's decided that there is actually some relationship between those variables (so the function really describes a function from some lower-dimensional manifold in $\mathbb{R}^n$), how is that denoted, and does it change how I should approach partial derivatives?

EDIT: To make the example more clear: If we define $f_1(x,y,u)=x^2+xy+y^2$, then $f_1=f_2$ when restricted to $\{(x,y,u):u=x^2\}$. Then both are most naturally thought of as functions from $\mathbb{R}^2$ to $\mathbb{R}$, but both are defined using $\mathbb{R}^3$.

Best Answer

From a modern point of view, it's best to just not use dependent variables. Dependent variables have long been replaced by the concept of a function. Whenever you use dependent variables, especially in the context of analysis, you should instead model those dependent variables as functions.

Here specifically, you have a function $f_2$ of three variables. That's a function $f_2:\mathbb R^3\to \mathbb R$. Then you say that you want $u$ to equal $x^2$. Now all three variables are supposed to depend on only two variables. So here you should introduce a new function $h:\mathbb R^2\to\mathbb R^3$ which maps $(x,y)\mapsto(x^2,x,y)$. This function models how your three variables $u,x,y$ depend on $x$ and $y$. Now your function $f_1$ is simply

$$f_1=f_2\circ h.$$

Note that $f_1$ and $f_2$ are not the same function. They don't even have the same domain. So it should be no surprise that their partial derivatives are different. When taking partial derivatives of functions with dependent variables, you should be very clear which function you're taking the partial derivatives of, because they're not the same!

In a physics context, I've seen the following way of specifying the function to differentiate: $\frac{\mathrm d}{\mathrm dx}$ means to take the partial derivative of $f_1$ with respect to $x$ (though they call this a total derivative), while $\frac{\partial}{\partial x}$ means to take the partial derivative of $f_2$ with respect to $x$. The $\mathrm d$ essentially says to take all dependencies on $x$ into account, while $\partial$ says to only take "explicit" dependencies into account.

Related Question