Suppose I have a function $f(x) = A^n$ where $A$ is a square matrix, $x$ is a positive real scalar, and $n$ is a natural number.
I would like to calculate the derivative of $f$ with respect to $x$ (each entry in $A$ is a function of $x$).
Is there a simple formula for this in general or do I need to know what $n$ is and use the product rule?
I found this, but I don't understand it (in particular I don't understand what $DS(A)$ or $S(A)$ means).
edit: Each entry in $A$ is differentiable.
There are two cases.
Case 1. $A$ is diagonalizable and you know explicitly $D$ diagonal, $P$ invertible s.t. $A^n=PD^nP^{-1}$.
Then $(A^n)'=P'D^nP^{-1}+nPD^{n-1}D'P^{-1}-PD^nP^{-1}P'P^{-1}$.
Case 2. Otherwise
$(A^n)'=A'A^{n-1}+AA'A^{n-2}+\cdots+A^{n-1}A'$ (sum of $n$ matrices) where $A'=[{a_{i,j}}']$.
There are no simplifications.