$\frac{d}{dX}[tr(-(CX(X^TCX)^{-1})(A+A^T)(X^TCX)^{-1})]=?$ I want to obtain the derivative of the trace of the following statement with regard to $X$, where $A$, $C$, and $X$ are matrices and $C$ is symmetric. 
$$\frac{d}{dX}[tr(-(CX(X^TCX)^{-1})(A+A^T)(X^TCX)^{-1})]=?$$
where $\frac{d}{dX}(y)$is a matrix whose $(i,j)$ element is $\frac{dy}{dX}(i,j)$. I doubt that my calculation is correct or not, so I'm grateful for your help.
Thanks a lot for any response.
 A: I assume that all the matrixes are square matrices and that they are invertible. First, I propose to simplify a bit. We have
$$ (C X) (X^T C X)^{-1} = (CX) (CX)^{-1} (X^T)^{-1} = (X^{-1})^{T}.$$
Using the cyclic invariance of the trace, we have
$$\operatorname{tr} [- CX (X^T CX)^{-1} (A+A^T) (X^T C X)^{-1}] =
 - \operatorname{tr} [ X^{-1} C^{-1} (X^{-1})^T (X^{-1})^T (A+A^T)] .$$
Now define $B= X^{-1}$, we first calculate
$$\frac{\partial}{\partial B_{ij} }\operatorname{tr} [- CX (X^T CX)^{-1} (A+A^T) (X^T C X)^{-1}] = - \frac{\partial}{\partial B_{ij} } \sum_{abcde} B_{ab} (C^{-1})_{bc} B_{cd} B_{de} (A+A^T)_{ea}
= -\sum_{cde}  (C^{-1})_{jc} B_{cd} B_{de} (A+A^T)_{ei}-  \sum_{abe} B_{ab} (C^{-1})_{bi} B_{je} (A+A^T)_{ea} - \sum_{abc} B_{ab} (C^{-1})_{bc} B_{ci}  (A+A^T)_{ja},$$
or in other words
$$\frac{\partial}{\partial B_{ij} }\operatorname{tr} [- CX (X^T CX)^{-1}(A+A^T) (X^T C X)^{-1}] = -[C^{-1} B^2 (A+A^T)]_{ji} - [B (A+A^T) B C^{-1}]_{ji} - [(A+A^T) B C^{-1} B]_{ji}. $$
In order to obtain the requested result, we only need to use the well known fact
$$\frac{\partial B_{ij}}{\partial A_{kl}}  = -(X^{-1})_{ik} (X^{-1})_{lj}$$
and apply the chain rule.
The final result is
$$\frac{\partial}{\partial X_{kl} }\operatorname{tr} [- CX (X^T CX)^{-1} (A+A^T) (X^T C X)^{-1}]= [X^{-1} C^{-1} X^{-2} (A+A^T) X^{-1}]_{lk} + [X^{-2}(A+A^T)X^{-1} C^{-1} X^{-1} ]_{lk}+ [X^{-1} (A+A^T) X^{-1} C^{-1} X^{-2}]_{lk} \,.  $$
A: For convenience, let's define 3 symmetric matrices which appear repeatedly throughout the derivation 
$$\eqalign{
 S &= A+A^T \cr
 Y &= X^TCX &\implies dY=2\,{\rm sym}(X^TC\,dX) \cr
 M &= Y^{-1}SY^{-1}\cr
}$$
The differential of the inverse of a matrix is a well-known result
$$\eqalign{
 dY^{-1} &= -Y^{-1}\,dY\,Y^{-1}\cr
}$$
Two final pieces of notation.
The trace/Frobenius product is $\,\,A:B={\rm tr}(A^TB)$
The sym-operator is $\,\,{\rm sym}(A)=\frac{1}{2}(A+A^T)$
Let's rewrite the function and find its differential then its gradient 
$$\eqalign{
\phi &= S:Y^{-1}CXY^{-1} \cr
d\phi
 &= S:Y^{-1}C\,dX\,Y^{-1} + S:dY^{-1}CXY^{-1} + S:Y^{-1}CX\,dY^{-1} \cr
 &= CY^{-1}SY^{-1}:dX - S:(Y^{-1}\,dY\,Y^{-1})CXY^{-1} + S:Y^{-1}CX(Y^{-1}\,dY\,Y^{-1}) \cr
 &= CM:dX - M:dY\,Y^{-1}CX - M:CXY^{-1}\,dY \cr
 &= CM:dX - MX^TCY^{-1}:dY -Y^{-1}X^TCM:dY \cr
 &= CM:dX - (MX^TCY^{-1}+Y^{-1}X^TCM):dY \cr
 &= CM:dX - (MX^TCY^{-1}+Y^{-1}X^TCM):2\,{\rm sym}(X^TC\,dX) \cr
 &= CM:dX - 2\,{\rm sym}(MX^TCY^{-1}+Y^{-1}X^TCM):X^TC\,dX \cr
 &= \Big(CM - 2\,CX\,{\rm sym}(MX^TCY^{-1}+Y^{-1}X^TCM)\Big):dX \cr
G=\frac{\partial\phi}{\partial X}
 &= CM - 2\,CX\,{\rm sym}(MX^TCY^{-1}+Y^{-1}X^TCM) \cr\cr
}$$
Let $B=(CX+X^TC)$ and use this to simplify the gradient expression further
$$\eqalign{
G &= C\Big(M - XMBY^{-1} - XY^{-1}BM\Big) \cr\cr
}$$
