Optimality conditions for problems involving PDEs Optimality conditions mathematics