Sensitivity and optimal control of elastic structures with distributed parameters