Tensor Calculus: Divergence of the inner product of two vectors. In my undergraduate course I had to prove this:$ \nabla \cdot (u \cdot v) = u \cdot \nabla(v) + v \cdot \nabla(u)$
But I believe that statement is wrong, I think it should be the following:
$\nabla \cdot (u \cdot v)= \partial^{j} (u^i v^{i}) = u^{i} \partial^{j} v^{i} + v^{i} \partial^{j} u^{i} = \nabla v \cdot u + \nabla u \cdot v
$
Here the "dot product" does not commute since the gradient of a vector is a matrix and the dot product of a vector with a matrix is non commutative like this:
$\nabla v \cdot u = (\partial ^{j} v^{i} e^{j} \otimes e^{i}) \cdot (u^{k} e^{k}) = \partial ^{j} v^{i} u^{i} = u^{i} \partial ^{j} v^{i}$
$u \cdot \nabla v = (u^{k} e^{k}) \cdot  (\partial ^{j} v^{i} e^{j} \otimes e^{i}) = u^{j} \partial ^{j} v^{i}$
$\therefore \nabla v \cdot u \neq u \cdot \nabla v$
My questions is, I'm doing something wrong for reaching this result:
$\nabla \cdot (u \cdot v)= \nabla v \cdot u + \nabla u \cdot v
$
Instead of this:
$ \nabla \cdot (u \cdot v) = u \cdot \nabla(v) + v \cdot \nabla(u)$
 A: I think I found out whats going on. First of all, we can all agree that $\nabla\cdot(u\cdot v)=\nabla(u\cdot v)$, so we are computing the gradient of a dot product. Now, it all depends on how you define the gradient of a vector: if you define it as $\nabla v = \partial^i v^j e^i\otimes e^j$ or as $\nabla v = \partial^j v^i e^i\otimes e^j$. I have found references that differ between these two. Note that one is just the transpose of the other. I prefer the first one which is the one that you are using actually. With the first notation you obtain the second identity ($\nabla \cdot (u \cdot v)=\nabla v \cdot u + \nabla u \cdot v
$) just as you showed.
However, if we look into wikipedia here we see that for two vector fields $A,B$ we get
$$
\nabla(A\cdot B) = A\cdot \nabla B + B\cdot \nabla A
$$
where its important not to confuse $A\cdot \nabla B$ with $(A\cdot \nabla) B$ as I did in the comments. Note that this equation coincides with your first identity (the problematic one), and not the second one. This can be explained by how the gradient of a vector is defined in that wikipedia page here in which the gradient is basically defined as $\nabla v = \partial^j v^i e^i\otimes e^j$ ($\nabla A = \left[\frac{\partial A_i}{\partial x^j}\right]_{ij}$ in the wikipedia notation) different from what you used as the definition of gradient in your procedure.
Under this setting:
$$
u\cdot \nabla v = (u^ke^k)\cdot(\partial^jv^ie^i\otimes e^j) = (u^i\partial^jv^i)e^j
$$
with the term $u^i\partial^jv^i$ as what you obtained with $\nabla v\cdot u$ with the other definition of $\nabla v$. (remember that $e^k\cdot (e^i\otimes e^j) = \delta^{ki}e^j$ with $\delta^{ki}$ the Kronecker delta, so you missed the $e^j$ in your procedure).
This is the most probable explanation of whats going on: your teacher may have defined the gradient as the transpose of what you understand as the gradient. Sounds like a reasonable confusion to me but let me know your thoughts.
