Let $\phi$ and $\mathbf S$ be smooth fields with $\phi$ scalar valued and $\mathbf S$ tensor valued. I would like to prove the following identity:
$$\mathrm{div}\phi\mathbf S=\mathbf S^T\mathrm{grad}\phi+\phi\,\mathrm{div}\mathbf S$$
My attempt:
\begin{align} \mathrm{div}\phi\mathbf S=\frac{\partial}{\partial x_i}(\phi S_{ij})\mathbf{e}_j&=\frac{\partial\phi}{\partial x_i}S_{ij}\mathbf{e}_j+\phi\frac{\partial S_{ij}}{\partial x_i}\mathbf{e}_j\\ &=\frac{\partial\phi}{\partial x_i}S_{ij}\mathbf{e}_j+\phi\mathrm{div}\mathbf S \end{align}
But I am stuck here since the definition of the gradient of a scalar field is $\mathrm{grad}\phi=\frac{\partial\phi}{\partial x_i}\mathbf{e}_i$.
I would appreciate any help or hint. Thank you.
Note that we have
$$\begin{align} \nabla \cdot (\phi \mathbf S)\cdot \hat x_i&=\partial_j(\phi S_{ji})\\\\ &=\phi \partial_j(S_{ji})+(\partial_j\phi)S_{ji}\\\\ &=\phi \partial_j(S_{ji})+(\partial_j\phi)S^T_{ij}\\\\ &=\phi \nabla \cdot (\mathbf S)\cdot \hat x_i+\mathbf S^T\cdot \nabla(\phi)\cdot \hat x_i \tag 1 \end{align}$$
Since $(1)$ is valid for all $i$, then
$$\nabla \cdot (\phi \mathbf S)=\phi \nabla \cdot (\mathbf S)+\mathbf S^T\cdot \nabla(\phi)$$
as was to be shown!