[Math] Divergence transforms as scalar under rotation in 2D + intuition

multivariable-calculusvector analysis

Problem is as follows:

In two dimensions, show that the divergence transforms as a scalar under rotations.

Aim is to determine $\bar{v}_{y}$ and $\bar{v}_{z}$, and show that

$\frac{\partial\bar{v}_{y}}{\partial\bar{y}}$ + $\frac{\partial\bar{v}_{z}}{\partial\bar{z}} = \frac{\partial v_{y}}{\partial y} + \frac{\partial v_{y}}{\partial z}$

I'm not sure at all why the above shows that divergence transforms as a scalar under rotations. It was a part of the question (given as a hint) so I was just trying to solve it without really understanding what I was doing. Any help on clarifying why I do need to show that would be appreciated.

Since this is a rotation in two dimensions (in the $y$ and $z$ axis),

$
\left( {\begin{array}{cc}
\bar{v}_{y} \\
\bar{v}_{z}
\end{array} } \right)
$ = $
\left( {\begin{array}{cc}
\cos\phi & \sin\phi \\
-\sin\phi & \cos\phi
\end{array} } \right)
$ $
\left( {\begin{array}{cc}
{v}_{y} \\
v_{z}
\end{array} } \right)
$.

Expanding this out, I found that $\bar{v}_{y} = v_{y}.\cos\phi + v_{z}.\sin\phi$ and $\bar{v}_{z} = -v_{y}.\sin\phi + v_{z}.\cos\phi$.

Solving for $v_{y}$ and $v_{z}$, by multiplying $\bar{v}_{y}$ and $\bar{v}_{z}$ by $\sin\phi$ and $\cos\phi$, I was able to use the $\sin^{2}\phi + \cos^{2}\phi = 1$ identity to get

$v_{z} = \bar{v}_{y}.\sin\phi + \bar{v}_{z}.\cos\phi$ and

$v_{y} = \bar{v}_{y}.\cos\phi – \bar{v}_{z}.\sin\phi$.

Next, I found the components of the original equation:

The first partial derivative in the equation was determined as

$\frac{\partial \bar{v}_{y}}{\partial \bar{y}} = (\frac{\partial \bar{v}_{y}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial \bar{v}_{y}}{\partial z})(\frac{\partial z}{\partial \bar{y}})$

and the second as

$\frac{\partial \bar{v}_{z}}{\partial \bar{z}} = (\frac{\partial \bar{v}_{z}}{\partial y})(\frac{\partial y}{\partial \bar{z}}) + (\frac{\partial \bar{v}_{z}}{\partial z})(\frac{\partial z}{\partial \bar{z}})$.

At this point, I become stuck because I cannot seem to be able to find $\partial \bar{v}_{y}$ and $\partial \bar{v}_{z}$ with respect to $\partial y$ and $\partial z$.

How to I continue? Thanks in advance.

Best Answer

Divergence of a vector is a scalar; and a scalar is a constant and doesn't change under rotations, so if you transform all your variables under a rotation and then calculate the divergence of the vector in the new coordinates, the divergence must remain unchanged.

First find $\bar v_y$ and $\bar v_z$ from the matrix transformation relation:

$ \left( {\begin{array}{cc} \bar{v}_{y} \\ \bar{v}_{z} \end{array} } \right) $ = $ \left( {\begin{array}{cc} \cos\phi & \sin\phi \\ -\sin\phi & \cos\phi \end{array} } \right) $ $ \left( {\begin{array}{cc} {v}_{y} \\ v_{z} \end{array} } \right) \to$

$$\bar{v}_{y} = v_{y}.\cos\phi + v_{z}.\sin\phi$$ $$\bar{v}_{z} = -v_{y}.\sin\phi + v_{z}.\cos\phi$$

Then find their derivative w.r.t. $\bar y$ and $\bar z$, as is needed: $$\frac{\partial \bar v_y}{\partial \bar y}=\frac{\partial v_y}{\partial \bar y}\cos \phi+\frac{\partial v_z}{\partial \bar y}\sin \phi \tag{1}$$

expanding the right hand side derivatives $\frac{\partial {v}_{y}}{\partial \bar{y}}$ and $\frac{\partial {v}_{z}}{\partial \bar{y}}$ as:

$$\cases{\frac{\partial {v}_{y}}{\partial \bar{y}} = (\frac{\partial {v}_{y}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial{v}_{y}}{\partial z})(\frac{\partial z}{\partial \bar{y}}) \\ \frac{\partial {v}_{z}}{\partial \bar{y}} = (\frac{\partial {v}_{z}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial{v}_{z}}{\partial z})(\frac{\partial z}{\partial \bar{y}})} \tag{2}$$ we should now find the derivatives $\frac{\partial y}{\partial \bar y}$ and $\frac{\partial z}{\partial \bar y}$. Using the rotation formula in 2D to write $y$ and $z$ in terms of $\bar y$ and $\bar z$, we can find $\frac{\partial y}{\partial \bar y}$ and $\frac{\partial z}{\partial \bar y}$ : $$\cases{ y=\bar y \cos \phi-\bar z \sin \phi\\z=\bar y \sin \phi+ \bar z \cos \phi}\to\cases{\frac{\partial y}{\partial \bar y}=\cos \phi\\ \frac{\partial z}{\partial \bar y}=\sin \phi}\tag{3}$$ now substituting $(3)$ in $(2)$ and then $(2)$ in $(1) $, we will have $$\frac{\partial \bar v_y}{\partial \bar y}=\left(\frac{\partial v_y}{\partial y}\cos\phi+\frac{\partial v_y}{\partial z}\sin\phi \right )\cos\phi + \left( \frac{\partial v_z}{\partial y}\cos\phi+\frac{\partial v_z}{\partial z}\sin\phi \right)\sin \phi$$

doing the same for $\frac{\partial \bar v_z}{\partial \bar z}$, we will arrive at:

$$\frac{\partial \bar v_z}{\partial \bar z}=-\left(-\frac{\partial v_y}{\partial y}\sin\phi+\frac{\partial v_y}{\partial z}\cos\phi \right )\sin\phi + \left(- \frac{\partial v_z}{\partial y}\sin\phi+\frac{\partial v_z}{\partial z}\cos\phi \right)\cos \phi$$

Now just sum up the two terms$\frac{\partial\bar{v}_{y}}{\partial\bar{y}}$ and $\frac{\partial\bar{v}_{z}}{\partial\bar{z}}$ and apply $\sin^{2}\phi + \cos^{2}\phi = 1$ to arrive at the final result: $$\frac{\partial\bar{v}_{y}}{\partial\bar{y}} + \frac{\partial\bar{v}_{z}}{\partial\bar{z}} = \frac{\partial v_{y}}{\partial y} + \frac{\partial v_{y}}{\partial z}$$