Fixed variables in clairauts theorem

52 Views Asked by At

Let $f$ be a function of $(x,y)$ and let $x,y$ both be functions of $(r,\theta)$. Now Clairauts theorem states that for function $\phi(x,y),\frac{\partial^2 \phi}{\partial x \partial y}=\frac{\partial ^2 \phi}{\partial y \partial x}$(after assuming necessary conditions). Now let $f=x^2+y^2$ and $x=r\cos \theta,y=r\sin \theta$. But if we try to prove $\frac{\partial^2 f}{\partial x \partial \theta}=\frac{\partial^2 f}{\partial \theta \partial x}$. By chain rule,$\frac{\partial f}{\partial \theta}=2x(-r\sin \theta)+2y(r\cos \theta)=-2xy+2xy=0$. But this yields $\frac{\partial^2 f}{\partial x \partial \theta}=\frac{\partial}{\partial x}(0)=0$. On the other hand $\frac{\partial f}{\partial x}$(keeping $y$ constant)$=2x$.

Now,here is my first concern,if I try to partially w.r.t $\theta$,which variable should I keep constant? Will it be $y$ (which was assumed while determining $\frac{\partial f}{\partial x}$) or $r$? When using clairauts theorem for more than two variables,what variables are kept fixed while interchanging order of differentiation? If $\frac{\partial \phi}{\partial x_i}$ was determined keeping some variables($x_1,x_2,\cdots,x_k$) constant,will $\frac{\partial}{\partial x_j}(\frac{\partial \phi}{\partial x_i})$ be calculated keeping the same variables $(x_1,x_2,\cdots,x_k)$ constant?

For our problem,if we assume $y$ to be constant,then $\frac{\partial^2 f}{\partial \theta \partial x}=\frac{\partial}{\partial \theta}(2x)=\frac{\partial}{\partial \theta}(\frac{2y}{\tan \theta})=-\frac{2y}{\sin^2 \theta}=-\frac{2r^2}{y}$. This doesn't equal to $\frac{\partial^2 f}{\partial x \partial \theta}=0$,not satisfying clairauits theorem.

On the other hand,if we assume $r$ to be constant,then $\frac{\partial^2 f}{\partial \theta \partial x}=\frac{\partial}{\partial \theta}(2x)=\frac{\partial}{\partial \theta}(2r\cos \theta)=-2r\sin \theta=-2y$ which doesn't equal to $0$ (hence,not satisfying clairaut's theorem),as well as doesn't equal to $-\frac{2r^2}{y}$ which was derived keeping $y$ constant (showing that fixation of variables matters here).

Which mistakes did I make in applying the Clairauits theorem in my example? Also which variables should be kept constant while interchanging the order of partial differentiation using Clairauits theorem? It will be very helpful if these questions are addressed.

1

There are 1 best solutions below

0
On BEST ANSWER

This is what happens when we abuse notation and use the same letter for functions of completely different variables. When we write the usual chain rule as $$\frac{df}{dt} = \frac{df}{dx}\cdot\frac{dx}{dt},$$ the functions $f$ appearing on the two sides of the equation are different functions: Even though they both tell you the temperature, one tells you the temperature as a function of position, the other tells you temperature as a function of time (since it turns out your position is varying with respect to time). The best way out of this — even though most scientists don't bother — is to write $F(t) = f(x(t))$ and write \begin{align*} F'(t)&= f'(x(t))\cdot x'(t) \\ \frac{dF}{dt} &= \frac{df}{dx}\cdot \frac{dx}{dt}. \end{align*} One additional problem with the Leibniz notation (the latter) is that you lose track of the points at which you're evaluating the derivatives.

It only gets worse with partial derivatives. The problems you ran into is that you're taking part of the derivative of the function $f$ and part of the derivative of the function $F$, which really makes no sense. As Kurt suggested in the comments and as I wrote in a post you've already read, people doing thermodynamics have the right idea: They indicate explicitly which variables are being fixed when they compute partial derivatives. $\left(\dfrac{\partial f}{\partial x}\right)_y$ indicates explicitly that we differentiate with respect to $x$, holding $y$ constant.

When you mix two coordinate systems as in your post, you have no idea what that second-order partial derivative means. When you partially differentiate with respect to $x$, you intend that $y$ be fixed; when you partially differentiate with respect to $\theta$, you intend that $r$ be fixed. I want to be clear and define $$F(r,\theta) = f(x(r,\theta),y(r,\theta)).$$ Then I can certainly calculate $\partial F/\partial\theta$, but this will be a function of $r$ and $\theta$. How am I supposed to differentiate that with respect to $x$? So, in your example, $f(x,y)=x^2+y^2$, so $F(r,\theta) = r^2$ is independent of $\theta$ and $\partial F/\partial\theta = 0$. Going in the other direction, you want to start with $\partial f/\partial x = 2x$. Now write this as a function of $r$ and $\theta$, and differentiate with respect to $\theta$ to get $-2r\sin\theta$.

As you observed, these are not the same. Well, you're not at all differentiating a single function $\phi$. In the first case, you have to invert the change of variables and write $r,\theta$ as functions of $x,y$. Then you have $g(r,\theta)=\partial F/\partial\theta$ and you write $G(x,y) = g(r(x,y),\theta(x,y))$ and differentiate with respect to $x$. In the second case, you start with $h(x,y)=\partial f/\partial x$, consider $H(r,\theta) = h(x(r,\theta),y(r,\theta))$, and ask for $\partial H/\partial\theta$. Why should this have anything to do with $\partial G/\partial x$?

If you want to invoke Clairaut's theorem, you must have a single function of two variables. You want the variables to be $x,\theta$. That means you must rewrite the function — to start with — as a function of $x,\theta$ only. That gives you the function $\Psi(x,\theta) = x^2+(x\tan\theta)^2 = x^2(1+\tan^2\theta)=x^2\sec^2\theta$. Now you won't have a problem when you do your second-order partials.

In the future, it will help you to use the thermodynamics notation. When you write a partial derivative, indicate what variables are held constant. In your example, you just can't do it, because you're holding different variables constant at the second step than you are at the first step.