Partial derivatives seem to depend on how variables are defined 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$.
 A: 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.
A: Unfortunately, $f_1$ and $f_2$ are not the same functions, indeed as you observed the domain is the same and so will be the graphic, differential, and so on.
Your principal mistake stands in the very beginning:
$$\frac{\partial}{\partial x}f_2=\frac{\partial}{\partial x}u+y=2x+y=\frac{\partial}{\partial x}f_1$$
Although a partial derivative is not exactly the same as a derivative on $\mathbb{R}$, the derivation of a sum still holds: the derivative of a sum is the sum of derivatives and the function $u$ depends on $x$, thus you can't ignore its derivative.
A: 
Yet, f1 and f2 are in some sense exactly the same function.

They are the same function if you set $u$ as $x^2$.   In that case, $x$ and $u$ are not independent variables; so $\tfrac{\partial u}{\partial x}\neq 0$ .
You have $f_1(x,y)= f_2(x,y,x^2)$.  Applying the chain rule gives:
$$\begin{align}\dfrac{\partial f_1(x,y)}{\partial x}&=\left.\dfrac{\partial f_2(x,y,u)}{\partial x}\right|_{u=x^2}\dfrac{\partial x}{\partial x}+\left.\dfrac{\partial f_2(x,y,u)}{\partial y}\right|_{u=x^2}\dfrac{\partial y}{\partial x}+\left.\dfrac{\partial f_2(x,y,u)}{\partial u}\right|_{u=x^2}\dfrac{\partial x^2}{\partial x}\\[3ex]\dfrac{\partial (x^2+xy+y^2)}{\partial x}&=\left.\dfrac{\partial (u+xy+y^2)}{\partial x}\right|_{u=x^2}+0+\left.\dfrac{\partial (u+xy+y^2)}{\partial u}\right|_{u=x^2}\dfrac{2x}{}\\[3ex]2x+y&=[0+y+0]_{u=x^2}+[1+0+0]_{u=x^2}\cdot 2x\end{align}$$
