what is the best approach to compute $\text{div}(A\, Du)$ where $Du$ is the gradient vector of a scalar function $u:\Bbb R^n\to \Bbb R$ and $A$ is a $n\times n$ matrix?
The entries of $A$ are functions defined over $\Bbb R^n$ as well. Do you simply do the same as you would if the expression was $\text{div}(Du)$? Cant think of anything else, but it becomes extremely cumbersome when I am supposed to show that its equal to zero (I have an expression for both $u$ and $A$ but I dont think they are needed to give an answer to my question).
$A$ is symmetric and the associated differential operator is elliptic, in case that should be useful, but I primarily want to know the general approach. Thanks in advance.
If $u$ is scalar, then its gradient $\nabla u$ is the vector $[\nabla u]_{j} = u_{,j}$, where indices after the comma indicate partial differentiation. Using Einstein notation, the product $b = A\, \nabla u$ is the vector $b_{i} = A_{ij}\, u_{, j}$. The divergence of $b$ is the scalar $$ \text{div}(A\, \nabla u) = b_{i,i} = [A_{ij}\, u_{, j}]_{,i} \, . $$ The product rule then gives $$ \begin{aligned} \text{div}(A\, \nabla u) &= A_{ij,i}\, u_{, j} + A_{ij}\, u_{,ij} \\ & = (\nabla \cdot A^T)\cdot \nabla u + A : \nabla\nabla u \, . \end{aligned} $$ Using the symmetry property $A = A^T$ then gives $$ \text{div}(A\, \nabla u) = (\nabla\cdot A) \cdot \nabla u + A : \nabla \nabla u , $$ where the colon denotes the Frobenius inner product. In the isotropic case $A = \alpha I$, we recover the vector calculus identity $\text{div}(\alpha \nabla u) = \nabla\alpha\cdot\nabla u + \alpha \Delta u$. By the way, the present problem may be viewed as a particular case of this one.