Semicontinuity problems in the calculus of variations