In this paper, we study two optimization problems where solutions on a dense set yield global solution. We study these problems for spaces of Bochner integrable functions and for spaces of continuous functions. The first one deals with expressing the length of a vector as a sum of the distance to a best approximation and minimal best approximation and the second one relates to approximating a subsequence of a minimizing sequence with a sequence of proximinal vectors. © 2016 Belgian Mathematical Society. All rights reserved.