Periodic solutions and chaotic dynamics in a Duffing equation model of charged particles