Stability of the periodic solutions to Duffing's equation and other nonlinear equations of second-order