Let ${\bf x}, {\bf y} \in \mathbb{R}^{ m \times 1}$ and $a \in \mathbb{R}$. How to find the following limit \begin{align} \lim_{a \to 0 } \frac{Tr^n \left( ({\bf x}-a\cdot{\bf y}) \cdot ({\bf x}-a \cdot{\bf y})^T \right)-Tr^n \left( {\bf x} \cdot {\bf x}^T \right)}{a} \end{align}
form some $n>0$.
For the case $m=1$ we have that
\begin{align} \lim_{a \to 0 } \frac{ (x-a\cdot y)^{2n} - x^{2n}}{a}=-2n\cdot y \cdot x^{2n-1} \end{align} But how to do the general case? Thank you
Define the function $T(a) = {\rm tr}\Big((x-ay)(x-ay)^T\Big)$
First, use L'Hopital's rule to reduce the problem to the evaluation of the function $(\frac{dT^n}{da})$ at the point $a=0$.
Second, find the derivative $$\eqalign{ w &= (ay-x) \cr T &= {\rm tr}(ww^T) = w^Tw \cr dT &= 2w^Tdw \cr dT^n &= nT^{n-1}dT \cr &= 2nT^{n-1}\,w^Tdw \cr &= 2nT^{n-1}\,w^Ty\,da \cr &= 2nT^{n-1}\,(ay-x)^Ty\,da \cr \frac{dT^n}{da} &= 2nT^{n-1}\,(ay-x)^Ty \cr\cr }$$ Finally, evaluate this derivative at $a=0$ $$\eqalign{ \frac{dT^n}{da} &= -2nT^{n-1}\,x^Ty \cr &= -2n(x^Tx)^{n-1}\,x^Ty \cr }$$