There is a time-dependent quadratic form.
$f(t) = x(t)^T A(t) x(t)$
where $x$ - 3-dimensional vector, and $A$ - $3\times3$ matrix.
The vector and matrix change over time, and their components are as follows:
$A(t) = \begin{bmatrix} sin(t) & 1 & 1 \\ 1 & 1 & tan(t) \\ cos(t) &1 &1 \end{bmatrix}$
$x(t) = \begin{bmatrix} sin(t) \\ 1 \\ 1 \end{bmatrix}$
I want to calculate this quadratic form and its derivative as the determinant of a matrix and the derivative of its determinant as follows:
$x(t)^T A(t) x(t) = \begin{vmatrix} 0 & \begin{vmatrix} 0 & x(t) \\ A(t) & 0 \end{vmatrix} \\ x(t)^T & 0 \end{vmatrix}$
$\frac{d}{dt}(x(t)^T A(t) x(t)) =\det (x(t)^T A(t) x(t)) \cdot \operatorname*{tr}[(x(t)^T A(t) x(t))^{-1} \cdot \frac{d}{dt} (x(t)^T A(t) x(t))]$*
$*$Jacobi formula
The problem is that when I try to calculate the derivative of the determinant of such a matrix, in some places I get the need to calculate the sum of the matrix and the vector, which is an incorrect operation.
Is it possible to calculate the derivative of a quadratic form in this way, as the derivative of the determinant, or is there some more correct formula that transforms the calculation of the quadratic norm with the calculation of the determinant of some matrix?
Let $\,s=\sin(t),\; c=\cos(t)\,$ then the matrix, vector, and their time-derivatives can be written as $$\eqalign{ A &= \pmatrix{s&1&1\\1&1&s/c\\c&1&1},\quad &\dot A = \pmatrix{c&0&0\\0&0&c^{-2}\\-s&0&0} \\ x &= \pmatrix{c\\1\\1},\quad &\dot x = \pmatrix{-s\\0\\0} \\ }$$ Use the product rule to calculate the time-derivative of the quadratic form $$\eqalign{ f &= x^TAx \\ \dot f &= \dot x^TAx + x^T\dot Ax + x^TA\dot x \\ &= -(cs^2+2s) + (c^3-cs+c^{-2}) - (cs^2+cs+s) \\ &= c^3 +c^{-2} - 2cs -2cs^2 - 3s \\ }$$ Note that you could also expand the quadratic form, and then use regular (i.e. scalar) differentiation rules, e.g. $$f = sc^2 + 3c +3 + c^2 +s/c$$