Periodic solutions of the duffing equation