Property of the trace of matrices Let $A(x,t),B(x,t)$ be matrix-valued functions that are independent of $\xi=x-t$ and satisfy $$A_t-B_x+AB-BA=0$$ where $X_q\equiv \frac{\partial X}{\partial q}$. 
Why does it then follow that  $$\frac{d }{d \eta}\textrm{Trace}[(A-B)^n]=0$$ where $n\in \mathbb N$ and $\eta=x+t$?
Is there a neat way to see that this is true?

(This may not be a neat way to prove the assertion, but it's a proof anyway.) Let $\eta=x+t$ and $\nu=x-t$. Then $x=\eta+\nu$ and $t=\eta-\nu$ are functions of $\eta$ and $\nu$, $A=A(\eta+\nu,\eta-\nu)$ and similarly for $B$. As both $A$ and $B$ are independent of $\nu$, by the total derivative formula, we get
\begin{align*}
0 = \frac{dA}{d\nu} &= \frac{\partial A}{\partial x} - \frac{\partial A}{\partial t},\\
0 = \frac{dB}{d\nu} &= \frac{\partial B}{\partial x} - \frac{\partial B}{\partial t}
\end{align*}
and hence
\begin{align*}
\frac{dA}{d\eta} &= \frac{\partial A}{\partial x} + \frac{\partial A}{\partial t} = 2\frac{\partial A}{\partial t},\\
\frac{dB}{d\eta} &= \frac{\partial B}{\partial x} + \frac{\partial B}{\partial t} = 2\frac{\partial B}{\partial x}.
\end{align*}
Therefore
$$
\frac{d(A-B)}{d\eta} = 2\left(\frac{\partial A}{\partial t} - \frac{\partial B}{\partial x}\right) = 2(BA - AB).
$$
and
\begin{align*}
\frac{d}{d\eta}\operatorname{trace}[(A-B)^n]
&= n \operatorname{trace}\left[(A-B)^{n-1}\frac{d(A-B)}{d\eta}\right]\\
&= 2n \operatorname{trace}[(A-B)^{n-1} (BA-AB)].\tag{1}
\end{align*}
Let $\mathcal{P}_m$ denotes the set of products of $m$ matrices from $\{A,B\}$ (e.g. $\mathcal{P}_2=\{AA,AB,BA,BB\}$). Then the function $f:\mathcal{P}_m\to \mathcal{P}_m$ defined by
\begin{cases}
f(B^m) = B^m,\\
f(pAB^k) = B^kAp &\text{ for all } 0\le k<m \text{ and } p\in\mathcal{P}_{m-k-1}
\end{cases}
is a bijection. Since $\operatorname{trace}(AqB)=\operatorname{trace}(Bf(q)A)$ for all $q\in\mathcal{P}_{n-1}$ and the degree of $B$ is preserved by $f$, it follows that $\operatorname{trace}[A(A-B)^{n-1}B]=\operatorname{trace}[B(A-B)^{n-1}A]$. Consequently,
$$\operatorname{trace}[(A-B)^{n-1} (BA-AB)]=0$$
for all square matrices $A,B$ and $(1)$ evaluates to zero.
