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$.