Influence of the excitation shape in the classical Duffing equation