Compliance or weight optimization Mechanical systems with constraints mathematics