Constitutive equations and variational elasticity