Time derivative of the function $ t \mapsto \frac{1}{2}\dot{f}(t)^T A (f)\dot{f}(t) $ I have been trying to differentiate the following function with respect to time
$$ t \mapsto \frac{1}{2}\dot{f}(t)^T A (f)\dot{f}(t) $$
but I am struggling with the chain rule for matrix calculus. Here, $f$ is a vector dependent on time and the matrix is a function of the vector $f$. I tried following these ideas but didn't come very far. Any help would be appreciated!
 A: $
\def\Diag{\operatorname{Diag}}
\def\a{\alpha}\def\b{\beta}\def\l{\lambda}
\def\h{\frac 12}
\def\E{{\cal E}}
\def\qiq{\quad\implies\quad}
$For ease of typing define
$$\eqalign{
v &= \dot f &\big({\rm velocity}\big) \\
a &= \dot v = \ddot f \qquad&\big({\rm acceleration}\big) \\
}$$
then it is straightforward to calculate the derivative of the given expression
$$\eqalign{
\E &= \h \Big(v^TAv\Big) \\
\dot\E &= \h \Big(a^TAv+v^T\dot Av+v^TAa\Big) \\
 &= v^TAa + \frac{v^T\dot Av}{2} \\
}$$
Now consider three plausible formulas for the symmetric $A$ matrix
$$\eqalign{
A &= ff^T
  &\qiq \dot A = vf^T+fv^T \\
A &= \Diag(f)
  &\qiq \dot A = \Diag(v) \\
A &= fb^T + bf^T
  &\qiq \dot A = vb^T+bv^T \\
}$$
So the calculation of $\dot A$ is seldom a difficult problem.
A: Until someone else comes up with something better, here's how you might do this using Einstein index notation:
$\frac{d}{dt} \left( A^i_{~j}(f)\,\dot{f}^i\,\dot{f}_j \right) = A^i_{~j}\,\ddot{f}^i\,\dot{f}_j + A^i_{~j}\,\dot{f}^i\,\ddot{f}_j + \frac{\partial A^i_{~j}}{\partial f^k}\dot{f}^k\,\dot{f}^i\,\dot{f}_j\\
=\ddot{f}^T A \dot{f} + \dot{f}^T A \ddot{f} + (\text{not sure how to denote that last term in matrix notation}\overset{\otimes~\otimes}{\frown})$
