[Math] Why aren’t these partial derivatives interchangeable

calculusmultivariable-calculuspartial derivative

I've ran across something that confuses me regarding multivariable functions and partial derivatives. I'll use an example to illustrate:

We let
$$x = f(y,t) = yt^2,$$
and define the operators
$$\partial_{t|x}(\cdot) := \left.\frac{\partial (\cdot)}{\partial t}\right|_{x},$$
($x$ held constant)
$$\partial_{t|y}(\cdot) := \left.\frac{\partial (\cdot)}{\partial t}\right|_{y}.$$

Now we investigate whether these operators are interchangeable. Firstly,
$$\partial_{t|x}x = 0$$
$$\Rightarrow \partial_{t|y}(\partial_{t|x}x) = 0.$$

Secondly,
$$\partial_{t|y}x = \partial_{t|y}f(y,t) = 2yt = 2x/t$$
$$\Rightarrow \partial_{t|x}(\partial_{t|y}x) = -2x/t^2 \neq 0.$$

At this stage I'm confused. Of course, I felt uncomfortable writing out the above, like something was going horribly wrong somewhere, but I can't put my finger on where. So where is the error? Somewhere around the substitution $2yt = 2x/t$? Maybe I'm confusing free/bound variables, or keeping things constant where I'm not allowed to? Perhaps I can't expect the derivatives to be interchangeable at all? In that case, why not?

EDIT: Some people are asking me about my notation. The notation for the operators above (i.e. $\partial_{t|x}$) are just something I invented on the spot for this post, and as mentioned above, the vertical line notation indicates which variable should be kept constant during the differentiation (i.e. the variable right of the line, at the bottom). The latter shouldn't be controversial, should it? Let me illustrate the idea. Imagine some nested functions:
$$f(g(x,t), t) = g(x,t)^2 + t^2 = \{g(x,t) = x + t^2\} = x^2 + 2xt^2 + t^4 + t^2$$
Now, if I'm not mistaken, $\frac{\partial f}{\partial t}$ is ambiguous: we can imagine keeping either $g(x,t)$ or $x$ constant when performing this differentiation. I.e.
$$\left.\frac{\partial f(g(x,t),t)}{\partial t}\right|_g = 2t$$
and
$$\left.\frac{\partial f(g(x,t),t)}{t}\right|_x = 4xt + 4t^3 + 2t.$$
Now, we can use the chain rule to obtain
$$\left.\frac{\partial f(g(x,t),t)}{t}\right|_x = \left.\frac{\partial f(g(x,t),t)}{g}\right|_t\left.\frac{\partial g(x,t)}{t}\right|_x + \left.\frac{\partial f(g(x,t),t)}{t}\right|_g = (2g(x,t))(2t) + 2t$$
$$ = 4xt + 4t^3 + 2t$$

Best Answer

Your computations are correct, and derivatives in your sense are not interchangeable.

Your derivatives $\partial_{t|x}$ and $\partial_{t|y}$ are derivations $C^\infty(M) \rightarrow C^\infty(M)$, where $M := \{ (x,y,t) ~|~ x=yt^2 \}$ which is a variety. For example $\partial_{t|x}$ is defined in the following way : since $M \rightarrow \mathbb{R}^2, ~ P \mapsto (t(P),x(P))$ is a chart (at least locally), any function $f \in C^\infty(M)$ can be written $f(P)=g(t,x):=g(t(P),x(P))$ for some $g \in C^\infty(\mathbb{R}^2)$, and $\partial_{t|x}f(P)$ is defined to be $(\partial_t g)(t(P),x(P))$.

Two derivations do not commute in general! What is true is that $\partial_{t|x}$ and $\partial_{x|t}$ do commute (this is Schwarz's theorem).

Related Question