It is shown that the density dependence of the most favorable frequency of the r. f. electric field to confine a cusp plasma is consistent with that suggested by a theory taking account of collective response of a plasma. Based on this dependence, automatic tuning of the frequency to the optimum value for the decaying plasma is demonstrated using a feedback system piloted by an ion density measurement.