Consider the first-order nonautonomous equation $x′ = p(t)x$ where $p(t)$ is differentiable and periodic with period $T$. Prove that all solutions of this equation are periodic with period $T$ if and only if $\int_0^T p(s) ds = 0$.
Chapter 1, exercise 14 from http://www.amazon.fr/Differential-Equations-Dynamical-Systems-Introduction/dp/0123820103
Hint: $x(t)=e^{\int^t_{t_0}p(s)\,ds}x(t_0)$ and to be $T$-periodic you should have $x(t+T)=x(T)$ for all $t$.
Note that one should perhaps distinguish between periodic and constant, and even consider the smallest period.