Show there is no nearest point in $U$ to $f$ in function space Consider the following subspace of the metric space $\mathcal{C}[-1,1]$ using the supremum norm $d_\infty$:
$$ A = \{ f \in \mathcal{C}[-1,1] : \int_{-1}^0 f = \int_0^1 f \}.$$
Consider the function $g(x) = x$. I need to show that there is no nearest point in $A$ to $g$ using the supremum metric, i.e. for all $f \in A$ we have
$$ d_\infty(f,g) > \inf\{ d(h,g) : h \in A \}. $$
My approach thus far has been to calculate the infimum written above, but finding a tight lower bound on this distance has been hard. The best I've been able to do is the trivial bound of $1$ using the constant function $h(x) = 0$.
I've also tried defining a linear map $F \colon C[-1,1] \to \mathbb{R}$ by $F(f) = \int_{-1}^0 f - \int_0^1 f$, so that $A$ is the kernel of this map. But I've been unable to use this map to figure out anything interesting.
 A: Let us first show that $d_\infty(f,g)\geq 1/2$. Assume that there was a function $f\in A$ such that $d_\infty(f,g) <1/2$. Then we compute
$$ \int_0^1 f = \int_0^1 g + \int_0^1 (f-g) \geq 1/2 - \int_0^1 d_\infty(f,g) >0. $$
On the other hand, we have
$$ 0<\int_0^1 f = \int_{-1}^0 f = \int_{-1}^0 g + \int_{-1}^0 (f-g) < -1/2 + \int_{-1}^0 d_\infty (f,g) <0, $$
which is a contradiction. Hence, we have $d_\infty(f,g)\geq 1/2$.
It is not hard to see that for every $\varepsilon>0$ there exists $f\in A$ such that $d_\infty(f,g)=1/2+\varepsilon$. For this choose $f(x)=x+1/2$ for $x\in [-1;\delta_1)$ and $f(x)=x-1/2$ for $x\in (-\delta_2;1]$, where $0<\delta_1, \delta_2<1$ are some small parameter depending on $\varepsilon$ which we will determine later. We need to make sure, that $f$ is continuous, for we can set $f$ to be the linear interpolation between $(-\delta_1,1/2-\delta_1)$ and $(0,1/2+\varepsilon)$ on $[-\delta_1;0]$ and similarly the linear interpolation between $(0,1/2+\varepsilon)$ and $(\delta_2, \delta_2-1/2)$ on $[0;\delta_2]$. It is easy to check that $f$ is continuous and $d_\infty (f,g)=\varepsilon$. In order to have $f\in A$, we also need the condition on the integrals to match. One checks (easiest to see when staring at the graph of the function) that this is the case iff
$$ (\varepsilon +\delta_1)\cdot \frac{\delta_1}{2} -\frac{\delta_1^2}{2} = (1-\delta_2+\varepsilon ) \cdot \frac{\delta_2}{2} +\frac{\delta_2^2}{2}.$$
This is equivalent to
$$ (1-\varepsilon) \delta_2= \varepsilon \delta_1.$$
Hence, we have plenty of functions in $A$ that are $1/2+\varepsilon$ close to $g$.
Assume now that there exists $f\in A$ such that $d_\infty(f,g)=1/2$. By the argument in the first paragraph, we get that
$$ \int_0^1 f = 0 = \int_{-1}^0 f. $$
In fact, by continuity we would need that $f(x) =x-1/2$ for $x\in (0;1)$ and $f(x) = x+1/2$ for $x\in (-1;0)$, but then $f$ is not continuous. Thus, there cannot be a minimizer in $A$.
