# How to Minimize this Function?

Let $f\in C([0,1])$ and $K\subset C([0,1])$ be the set of constant functions on $[0,1]$. Let $\|u\|=\sup\{|u(x)|:\ x\in [0,1]\}$. Define $F:C([0,1])\rightarrow \mathbb{R}$ by $$F(g)=\|f-g\|$$

Consider the problem of minimize $F$ in $K$ and let $c\in K$ be the minimum.

1 - Is it possible to characterize $c$ in terms of $f$.

2 - Is it possible to characterize $F(c)$.

-
The solution isn't simply $$c=\frac{\sup\{f\}+\inf\{f\}}{2}\ ?$$ Am I missing something? –  yohBS Dec 20 '12 at 14:16

Hint: Yes, it is possible. Just think of it, the difference between a constant $c$ and $f$ is given by $$\|f - c\| = \max\{ |c - \max f|, |c - \min f|\}$$ Why? Now for which $c$ is this minimal? Think of balancing both terms ...