Identity: volume integral of sum of norms I am trying to show $\int_D\left(|\nabla\cdot\vec{u}|^2+|\nabla\times\vec{u}|^2\right)dV=\int_D\left(|\nabla u_x|^2+|\nabla u_y|^2+|\nabla u_z|^2\right)dV$ but am having no luck.
Here $D$ is a smooth, bounded domain in $\mathbb{R}^3$, and $\vec{u}$ is a smooth vector field in $\mathbb{R}^3$, such that $\vec{u}=\vec{0}$ on the boundary $∂D$.
I have managed to show $\int_D\left(|\nabla\cdot\vec{u}|^2+|\nabla\times\vec{u}|^2\right)dV= \int_D\left(2|\nabla\cdot\vec{u}|^2-∂_iu_j∂_ju_i\right)dV$. I have tried a tonne of things from here but haven't made any step towards the solution.
A hint I am given is that $∂_{x_i} ∂_{x_j} f= ∂_{x_j} ∂_{x_i} f(x)$, but I have no idea why the fact that partial derivatives commute relates to this problem.
 A: We have
$$\tag{1}|\nabla\cdot\vec{u}|^2 = \left(\frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} +\frac{\partial u_z}{\partial z} \right)^2 \\ =A + 2 \frac{\partial u_x}{\partial x}\frac{\partial u_y}{\partial y}+ 2 \frac{\partial u_x}{\partial x}\frac{\partial u_z}{\partial z}+ 2 \frac{\partial u_y}{\partial y}\frac{\partial u_z}{\partial z}\\ = A + 2 \frac{\partial }{\partial x}\left(u_x\frac{\partial u_y}{\partial y}\right)+ 2 \frac{\partial }{\partial y}\left(u_y\frac{\partial u_z}{\partial z}\right)+ 2 \frac{\partial }{\partial z}\left(u_z\frac{\partial u_x}{\partial x}\right) - 2u_x \frac{\partial ^2 u_y}{\partial x \partial y}- 2u_y \frac{\partial ^2 u_z}{\partial y \partial z}- 2u_z \frac{\partial ^2 u_x}{\partial z \partial x},$$
where
$$A= \left(\frac{\partial u_x}{\partial x} \right)^2 + \left(\frac{\partial u_y}{\partial y} \right)^2+\left(\frac{\partial u_z}{\partial z} \right)^2, $$
and
$$\tag{2}|\nabla\times\vec{u}|^2 =\left(\frac{\partial u_z}{\partial y} - \frac{\partial u_y}{\partial z} \right)^2 + \left(\frac{\partial u_z}{\partial x} - \frac{\partial u_x}{\partial y} \right)^2+ \left(\frac{\partial u_y}{\partial x} - \frac{\partial u_y}{\partial z} \right)^2\\= B -  2 \frac{\partial u_z}{\partial y}\frac{\partial u_y}{\partial z}-  2 \frac{\partial u_z}{\partial x}\frac{\partial u_x}{\partial z}-  2 \frac{\partial u_y}{\partial x}\frac{\partial u_x}{\partial y}= \\ B - 2 \frac{\partial }{\partial x}\left(u_z\frac{\partial u_x}{\partial z}\right)- 2 \frac{\partial }{\partial y}\left(u_x\frac{\partial u_y}{\partial x}\right)- 2 \frac{\partial }{\partial z}\left(u_y\frac{\partial u_z}{\partial y}\right) + 2u_z \frac{\partial ^2 u_x}{\partial x \partial z}+ 2u_x \frac{\partial ^2 u_y}{\partial y \partial x}+ 2u_y \frac{\partial ^2 u_z}{\partial z \partial y},$$
where
$$B = \left(\frac{\partial u_z}{\partial y} \right)^2 + \left(\frac{\partial u_y}{\partial z} \right)^2 + \left(\frac{\partial u_z}{\partial x} \right)^2 + \left(\frac{\partial u_x}{\partial z} \right)^2 + \left(\frac{\partial u_y}{\partial x} \right)^2 + \left(\frac{\partial u_x}{\partial y} \right)^2  $$
The last three terms on the RHS of (1) cancel the last three terms on the RHS of (2) (using the hint), and
$$A+B = |\nabla u_x|^2 +|\nabla u_y|^2+ |\nabla u_z|^2$$
Thus, adding (1) and (2), we get
$$|\nabla\cdot\vec{u}|^2+ |\nabla\times\vec{u}|^2= |\nabla u_x|^2 +|\nabla u_y|^2+ |\nabla u_z|^2 + C,$$
where
$$C = 2 \frac{\partial }{\partial x}\left(u_x\frac{\partial u_y}{\partial y}\right)+ 2 \frac{\partial }{\partial y}\left(u_y\frac{\partial u_z}{\partial z}\right)+ 2 \frac{\partial }{\partial z}\left(u_z\frac{\partial u_x}{\partial x}\right)- 2 \frac{\partial }{\partial x}\left(u_z\frac{\partial u_x}{\partial z}\right)- 2 \frac{\partial }{\partial y}\left(u_x\frac{\partial u_y}{\partial x}\right)- 2 \frac{\partial }{\partial z}\left(u_y\frac{\partial u_z}{\partial y}\right) $$
It follows from the divergence theorem that  $\int_D C \,dV = 0$, since each term of $C$ is the divergence of a vector field that vanishes on the boundary $\partial D$ where the velocity $\vec{u}$ vanishes.
For example, since $u_x = 0$ on $\partial D$, we have
$$ \int_D\frac{\partial }{\partial x}\left(u_x\frac{\partial u_y}{\partial y}\right)\, dV = \int_{\partial D}u_x\frac{\partial u_y}{\partial y} n_x \,dS = 0$$
Therefore,
$$\int_D \left(|\nabla\cdot\vec{u}|^2+ |\nabla\times\vec{u}|^2\right)\, dV = \int_D \left(|\nabla u_x|^2 +|\nabla u_y|^2+ |\nabla u_z|^2\right)\, dV$$
A: In fact, you are very close to the solution, by I'm afraid you've made a mistake. Using dumb indexes (summation over repeated indices is implied) we can write: $|\nabla\times\vec{u}|^2=∂_iu_j∂_iu_j-∂_iu_j∂_ju_i$ and $|\nabla\cdot\vec{u}|^2=∂_iu_i∂_ju_j $. In the same fashion $\int_D\left(|\nabla u_x|^2+|\nabla u_y|^2+|\nabla u_z|^2\right)dV =  \int_D\left(∂_iu_j∂_iu_j\right)dV$. Next, integrate by parts the term:  $\int_D\left(-∂_iu_j∂_ju_i\right)dV = \int_D(-∂_i(u_j∂_ju_i)+u_j∂_i∂_ju_i)dV$. Integral $\int_D(-∂_i(u_j∂_ju_i))dV$ vanishes, because $\vec{u}=\vec{0}$ on the boundary of the region of integration.
Integrate by parts the second time and you prove the equality.
