  We consider a control problem for longitudinal vibrations of a nonhomogeneous
bar with clamped ends. The vibrations of the bar are controlled by an external
force which is distributed along the bar. For the minimization problem of mean
square deviation of the bar we prove that the optimal control has an infinite
number of switchings in a finite time interval, i.e., the optimal control is
the chattering control.
