Free Optimal Control Of Mechanical Oscillations