Optimization and Stability Problems in Continuum Mechanics