Switching the order of differential operators A function $f(x,y)$ is transformed to variables $(u,v)$ with $x=uv$ and $y=\dfrac{u}{v}$ so the first partial derivative with respect to $u$ is $$\frac{\partial f}{\partial u}=v\frac{\partial f}{\partial x}+\frac1v\frac{\partial f}{\partial y}\tag{1}$$ Show that the second partial derivative with respect to $u$ can be written as $$\frac{\partial^2 f}{\partial u^2}=v\left[v\frac{\partial^2 f}{\partial x^2}+\frac{1}{v}\frac{\partial^2 f}{\partial x \,\partial y}\right]+\frac{1}{v}\left[v\frac{\partial^2 f}{\partial y \,\partial x}+\frac{1}{v}\frac{\partial^2 f}{\partial y^2}\right]$$




My working:

\begin{align*}\frac{\partial^2 f}{\partial u^2}&amp;=\frac{\partial}{\partial u}\frac{\partial f}{\partial u}\\&amp;=\frac{\partial}{\partial u}\left(v\frac{\partial f}{\partial x}+\frac1v\frac{\partial f}{\partial y}\right)\,\qquad\text{By substituting equation (1)}\\&amp;=\fbox{$v\frac{\partial}{\color{red}{\partial u}}\frac{\partial f}{\color{blue}{\partial x}}+\frac1v\frac{\partial}{\color{red}{\partial u}}\frac{\partial f}{\color{blue}{\partial y}}$}\qquad\text{Distributed then changed order of operators}\\&amp;=\fbox{${v\frac{\partial}{\color{blue}{\partial x}}\frac{\partial f}{\color{red}{\partial u}}+\frac1v\frac{\partial}{\color{blue}{\partial y}}\frac{\partial f}{\color{red}{\partial u}}}$}\,\qquad{\text{Switched the order of the denominators}}\\&amp;=v\frac{\partial}{\partial x}\left(v\frac{\partial f}{\partial x}+\frac1v\frac{\partial f}{\partial y}\right)+\frac1v\frac{\partial}{\partial y}\left(v\frac{\partial f}{\partial x}+\frac1v\frac{\partial f}{\partial y}\right)\\&amp;=v\left[v\frac{\partial^2 f}{\partial x^2}+\frac{1}{v}\frac{\partial^2 f}{\partial x \,\partial y}\right]+\frac{1}{v}\left[v\frac{\partial^2 f}{\partial y \,\partial x}+\frac{1}{v}\frac{\partial^2 f}{\partial y^2}\right]\end{align*}$\fbox{}$

I am asking this question because I know that differential operators in general do not commute. But I cannot find a way to solve the problem without switching the order of the operators.

Therefore my doubt is whether or not the boxed expressions are valid.  

I did manage to reach the desired result, but is the proof correct? 

I think that this proof is wrong but I am unable to find a correct proof. 

Could someone please either explain or give hints on what the correct proof should look like or point out and explain my errors?

Many thanks.
Here we look at first at the general situation and develop the second partial derivative by consequently applying the chain rule. This way we can better see  symmetries which is helpful when calculating the special case.


  We consider the functions 
  
  \begin{align*}
x&amp;=x(u,v)=u\cdot    v\\
y&amp;=y(u,v)=\frac{u}{v}\qquad&amp;\text{and}\quad\qquad
f=f(x,y)=f(x(u,v),y(u,v))
\end{align*} 


First partial derivative:$\quad\frac{\partial f}{\partial u}$


  We obtain by applying the chain rule
  \begin{align*}
\frac{\partial f}{\partial u}=\frac{\partial f}{\partial x}\cdot\frac{\partial x}{\partial u}
+\frac{\partial f}{\partial y}\cdot \frac{\partial y}{\partial u}\tag{1}
\end{align*}


Second partial derivative:$\quad\frac{\partial^2 f}{\partial u^2}$


  We obtain by applying $\frac{\partial}{\partial u}$ to (1) using the chain rule again as well as the product rule of derivatives
  \begin{align*}
\frac{\partial^2 f}{\partial u^2}
&amp;=\frac{\partial }{\partial u}
\left(\frac{\partial f}{\partial x}\cdot\frac{\partial x}{\partial u}
+\frac{\partial f}{\partial y}\cdot \frac{\partial y}{\partial u}\right)\tag{2}\\
&amp;=\frac{\partial }{\partial u}
\left(\frac{\partial f}{\partial x}\cdot\frac{\partial x}{\partial u}\right)
+\frac{\partial }{\partial u}\left(\frac{\partial f}{\partial y}\cdot \frac{\partial y}{\partial u}\right)\tag{3}\\
&amp;=\frac{\partial }{\partial u}\color{red}{\left(\frac{\partial f}{\partial x}\right)}\cdot\frac{\partial x}{\partial u}
+\frac{\partial f}{\partial x}\cdot\frac{\partial }{\partial u}\left(\frac{\partial x}{\partial u}\right)\\
&amp;\qquad+\frac{\partial }{\partial u}\color{blue}{\left(\frac{\partial f}{\partial y}\right)}\cdot\frac{\partial y}{\partial u}
+\frac{\partial f}{\partial y}\cdot\frac{\partial }{\partial u}\left(\frac{\partial y}{\partial u}\right)\tag{4}\\
&amp;=\left(\frac{\partial^2 f}{\partial x^2}\cdot\frac{\partial x}{\partial u}
+\frac{\partial^2 f}{\partial y\partial x}\cdot \frac{\partial y}{\partial u}\right)\cdot\frac{\partial x}{\partial u}
+\frac{\partial f}{\partial x}\cdot\frac{\partial^2 x}{\partial u^2}\\
&amp;\qquad+\left(\frac{\partial^2 f}{\partial x\partial y}\cdot\frac{\partial x}{\partial u}
+\frac{\partial^2 f}{\partial y^2}\cdot \frac{\partial y}{\partial u}\right)\cdot\frac{\partial y}{\partial u}
+\frac{\partial f}{\partial y}\cdot\frac{\partial^2 y}{\partial u^2}\tag{5}\\
&amp;=\frac{\partial^2 f}{\partial x^2}\cdot\left(\frac{\partial x}{\partial u}\right)^2
+\frac{\partial^2 f}{\partial y\partial x}\cdot \frac{\partial x}{\partial u}\cdot\frac{\partial y}{\partial u}
+\frac{\partial f}{\partial x}\cdot\frac{\partial^2 x}{\partial u^2}\\
&amp;\qquad\frac{\partial^2 f}{\partial y^2}\cdot \left(\frac{\partial y}{\partial u}\right)^2
+\frac{\partial^2 f}{\partial x\partial y}\cdot\frac{\partial x}{\partial u}
\cdot\frac{\partial y}{\partial u}
+\frac{\partial f}{\partial y}\cdot\frac{\partial^2 y}{\partial u^2}\tag{6}
\end{align*}


Comment: This is for presentation issues a rather lengthy calculation. Usually we would skip (3) and (4) and obtain (5) directly from (2).


In (2) we apply the chain rule as we did in (1)
In (3) we use the linearity of the differential operator
In (4) we apply  the product rule
In (5) we apply the chain rule again
In (6) we multiply out and do a few rearrangements



  Special case: $x(u,v)=u\cdot v, y(u,v)=\frac{u}{v}$
  
  The partial derivatives of the special case give
  \begin{align*}
&amp;x(u,v)=u\cdot v&amp;&amp;\frac{\partial}{\partial u}x(u,v)=v&amp;&amp;\frac{\partial^2}{\partial u^2}x(u,v)=0\\
&amp;y(u,v)=\frac{u}{v}&amp;&amp;\frac{\partial}{\partial u}y(u,v)=\frac{1}{v}&amp;&amp;\frac{\partial^2}{\partial u^2}y(u,v)=0
\end{align*}
  
  Putting these results in (6) we finally obtain
  \begin{align*}
\frac{\partial^2 }{\partial u^2}&amp;f(x(u,v),y(u,v))=\frac{\partial^2 }{\partial u^2}f(u\cdot v,\frac{u}{v})\\
&amp;=\frac{\partial^2 f}{\partial x^2}\cdot v^2
+\frac{\partial^2 f}{\partial y\partial x}\cdot v\cdot\frac{1}{v}
+\frac{\partial f}{\partial x}\cdot 0\\
&amp;\qquad\frac{\partial^2 f}{\partial y^2}\cdot \frac{1}{v^2}
+\frac{\partial^2 f}{\partial x\partial y}\cdot v
\cdot\frac{1}{v}
+\frac{\partial f}{\partial y}\cdot0\\
&amp;=v^2\cdot\frac{\partial^2 f}{\partial x^2}
+\frac{\partial^2 f}{\partial y\partial x}+\frac{\partial^2 f}{\partial x\partial y}
+\frac{1}{v^2}\cdot\frac{\partial^2 f}{\partial y^2}\tag{7}
\end{align*}
  
  according to OPs formula.


$$ $$


  [Add-on 2016-10-24]: According to OPs comment some more details regarding (4) and (5).
  
  We consider bivariate functions
  
  \begin{align*}
x&amp;=x(u,v)\\
y&amp;=y(u,v)\qquad&amp;\text{and}\quad\qquad
g=g(x,y)=g(x(u,v),y(u,v))
\end{align*}
  
  which are sufficiently often differentiable in both variables. The following is valid according to (1)
  
  \begin{align*}
\frac{\partial }{\partial u}g(x(u,v),y(u,v))
=\frac{\partial }{\partial x}g(x,y)\cdot\frac{\partial }{\partial u}x(u,v)
+\frac{\partial }{\partial y}g(x,y)\cdot\frac{\partial }{\partial u}y(u,v)\tag{8}
\end{align*}


$$ $$


  Setting $g=f$ we obtain from (8)
  
  \begin{align*}
\frac{\partial }{\partial u}f(u(x,y),v(x,y))
=\frac{\partial }{\partial x}f(x,y)\cdot\frac{\partial }{\partial u}x(u,v)
+\frac{\partial }{\partial y}f(x,y)\cdot\frac{\partial }{\partial u}y(u,v)
\end{align*}
  
  or using a more compact notation
  
  \begin{align*}
\frac{\partial f}{\partial u}
=\frac{\partial f}{\partial x}\cdot\frac{\partial x}{\partial u}
+\frac{\partial f}{\partial y}\cdot\frac{\partial y}{\partial u}
\end{align*}
  
  which corresponds to (1).


$$ $$


  Setting $g=\frac{\partial }{\partial x}f$ we obtain from (8)
  
  \begin{align*}
\frac{\partial }{\partial u}\left(\frac{\partial }{\partial x}f(u(x,y),v(x,y))\right)
&amp;=\frac{\partial }{\partial x}\left(\frac{\partial }{\partial x}f(x,y)\right)\cdot\frac{\partial }{\partial u}x(u,v)\\
&amp;\qquad+\frac{\partial }{\partial y}\left(\frac{\partial }{\partial x}f(x,y)\right)\cdot\frac{\partial }{\partial u}y(u,v)
\end{align*}
  
  or using a more compact notation
  
  \begin{align*}
\frac{\partial}{\partial u}\left(\frac{\partial f}{\partial x}\right)
=\frac{\partial^2 f}{\partial x^2}\cdot\frac{\partial x}{\partial u}
+\frac{\partial^2 f}{\partial y\partial x}\cdot\frac{\partial y}{\partial u}
\end{align*}
  
  which corresponds to (5).
Basically, you are asking whether
\begin{align}
\left[\frac{\partial}{\partial u}, \frac{\partial}{\partial x} \right]=0
\end{align}
where
\begin{align}
\frac{\partial}{\partial u } = \sqrt{\frac{x}{y}}\frac{\partial}{\partial x} + \sqrt{\frac{y}{x}}\frac{\partial}{\partial y}.
\end{align}
Observe
\begin{align}
\frac{\partial }{\partial u}\frac{\partial}{\partial x} = \sqrt{\frac{x}{y}}\frac{\partial^2}{\partial x^2} + \sqrt{\frac{y}{x}}\frac{\partial^2}{\partial y \partial x}
\end{align}
but
\begin{align}
\frac{\partial }{\partial x}\frac{\partial}{\partial u}=&amp;\  \frac{\partial}{\partial x}\left( \sqrt{\frac{x}{y}}\frac{\partial}{\partial x} + \sqrt{\frac{y}{x}}\frac{\partial}{\partial y}\right)\\
=&amp;\ \frac{1}{2\sqrt{xy}}\frac{\partial}{\partial x} -\frac{1}{2} \sqrt{\frac{y}{x^3}}\frac{\partial}{\partial y}+\sqrt{\frac{x}{y}}\frac{\partial^2}{\partial x^2} + \sqrt{\frac{y}{x}}\frac{\partial^2}{\partial y \partial x}.
\end{align}
Hence 
\begin{align}
\left[\frac{\partial}{\partial u}, \frac{\partial}{\partial x} \right]\neq 0.
\end{align}

However, as an exercise, you should still check whether the two boxed quantities are equivalent since cancellation is possible.