Optimality conditions for problems involving relaxed controls Optimality conditions mathematics