TITLE: Show that if all solutions of $\frac{dy}{dx}=A(x)y$ are periodic with period $T$, than $\int_0^T \text{Trace }A(t) dt=0$
QUESTION [5 upvotes]: Let $A:\mathbb R \rightarrow L(\mathbb R ^n, \mathbb R^n)$ be
  continuous and periodic  with period $T$. Show that if all solutions
  of $\frac{dy}{dx}=A(x)y$  are periodic with period $T$, than $\int_0^T
 \text{Trace }A(t) dt=0$

Intuitively I can see why this is true, but I'm not really sure if I'm on the right track with showing it formally. 
If we know all solutions are periodic, we have that for all $x$, $y(x)=y(x+T)$ and thus $$\frac{dy(x)}{dx}=\frac{dy(x+T)}{dx}$$
From this it follows that $$A(x)y(x)=A(x+T)y(x+T)$$
So we also have that $A(x)=A(x+T)$. So now I know  $\int_0^T
 \text{Trace }A(t) dt=\int_0^T
 \text{Trace }A(t+T) dt$ and I want to show that this is $0$.
I don't really know where to go from here. This chapter we did learn things about the fundamental matrix, so I think I might need to use something like $det \psi(x)= e ^{\text{trace } A(x) x}$, but so far I don't know how to.

REPLY [3 votes]: Let $\psi(t) : \mathbb{R} \to L(\mathbb{R}^n, \mathbb{R}^n)$ denote the ordered exponential of $A(t)$, i.e., $\psi(t)$ is the unique solution of
$$ \psi'(t) = A(t)\psi(t), \qquad \psi(0) = 1. $$
Then
\begin{align*}
(\det\psi(t))'
&= \lim_{\Delta t \to 0} \frac{\det\psi(t+\Delta t) - \det\psi(t)}{\Delta t} \\
&= \lim_{\Delta t \to 0} \frac{\det\left(1 + A(t)\Delta t + \mathcal{O}(\Delta t^2)\right) - 1}{\Delta t} \det \psi(t) \\
&= \left( \operatorname{Tr}A(t) \right) \det\psi(t).
\end{align*}
So it follows that
$$ \det\psi(t) = \exp\left\{ \int_{0}^{t} \operatorname{Tr}A(s) \, \mathrm{d}s \right\}. $$
Since $y(t) = \psi(t)y_0$ solves $y'(t) = A(t)y(t)$ for any $y_0 \in \mathbb{R}^n$, $y(t)$ is $T$-periodic for any initial condition $y_0$, and so, $\psi(t)$ itself is $T$-periodic. Then from $\psi(T) = \psi(0)$, the desired conclusion follows.