The problem of reducing the chaotic response of a simple mechanical system, previously studied by Shaw and co-workers is reconsidered. The chaotic motion is detected by a version of the Melnikov's method which does not require a perturbation analysis. The original Shaw problem is firstly formulated in a mathematical satisfactory way and successively relaxed in order to obtain the solution, which is found by using a result of Ghizzetti. It involves two equal and opposite impulses, of adequate amplitude and acting with a precise phase difference; this solution represents the external excitation which reduces as much as possible the chaotic behaviour of the system. Some precise theoretical suggestions are furnished, and some numerical results are presented to verify the practical realizability of the optimal excitation and the possibility to apply the present results to the field of ‘controlling chaos’.