Seminorm exercise Can you tell me if my answer is correct? It's another exercise suggested in my lecture notes.
Exercise: Consider $C[-1,1]$ with the sup norm $\|\cdot\|_\infty$. Let 
$$ W = \{f \in C[-1,1] \mid \int_0^1 f d\mu = \int_{-1}^0 f d \mu = 0 \}$$
Show that $W$ is a closed subspace. Let $f(x) = x$ and calculate $\|f\|_{V/W} = \inf_{w \in W} \|f + w \|_\infty$ and show that the infimum is not achieved.
My answer: 
To show that $W$ is closed we show that if $f$ is a limit point of $W$ then $f \in W$. So let $f$ be a limit point. Then there is a sequence $w_n \in W$ converging to $f$, i.e. for $\varepsilon > 0$ there is $w_n$ such that $\|f - w_n\|_\infty < \varepsilon$. Hence for $\varepsilon > 0$, $\int_{0}^1 f d \mu = \int_0^1 (f + w_n  - w_n ) d \mu \leq \int_0^1 |f-w_n| + \int_0^1 w_n = \int_0^1 |f-w_n| \leq \|f-w_n\|_\infty \leq \varepsilon$. Let $\varepsilon \to 0$. Same argument for $[-1,0]$.
Now we compute the norm:
$$ \|x\|_{V/W} = \inf_{w \in W} \|x + w\|_\infty = \inf_{w \in W} \sup_{x \in [-1,1]} |x + w(x)|$$
$\|x + w\|_\infty$ is smallest for $w(x) = -x$. But $-x \notin W$. 
I'm not so sure about the second part. Is this what is meant by showing that the infimum is not achieved? "$\|x + w\|$ is smallest for $w(x) = -x$" seems a bit... wobbly. Thanks for your help.
 A: Your idea for the first part is correct but the inequalities you write are odd. Try
$$
\left|\,\int_0^1f\,\right|=\left|\int_0^1(f-w_n)\right|\leqslant\int_0^1|f-w_n|\leqslant\|f-w_n\|_\infty\to0,
$$
and similarly for the interval $[-1,0]$.
Regarding the second part, one would like to use the function $w_0:x\mapsto x-\frac12\mathrm{sgn}(x)$ to approximate $u:x\mapsto x$ but, despite the fact that $\int\limits_{-1}^0w_0=\int\limits_0^1w_0=0$, one cannot because $w_0$ is not continuous at zero. 
Hence $w_0$ is not in $W$ but the task is to show that $w_0$ indeed provides the infimum $\|u\|_{V/W}$.
Note that $u(x)-w_0(x)=-\frac12\mathrm{sgn}(x)$ for every $x$ hence $\|u-w_0\|_\infty=\frac12$. Call $W_0\supset W$ the set of integrable functions $w$ such that $\int\limits_{-1}^0w=\int\limits_0^1w=0$. For every $w$ in $W_0$, $\int\limits_0^1(u-w)=\frac12$ hence there exists some $x\geqslant0$ such that $u(x)-w(x)\geqslant\frac12$. This proves that $\|u-w\|_\infty\geqslant\frac12$ for every $w$ in $W_0$, and in particular for every $w$ in $W$, hence $\|u\|_{V/W}\geqslant\frac12$. 
Furthermore, for any $w$ in $W$, the condition $\|u-w\|_\infty=\frac12$ implies that $u(x)-w(x)\leqslant\frac12$ for every $x$ in $[0,1]$. Since $\int\limits_0^1(u-w)=\frac12$ and $u-w$ is continuous, $u(x)-w(x)=\frac12$ for every $x$ in $[0,1]$. Likewise, $u(x)-w(x)=-\frac12$ for every $x$ in $[-1,0]$. These two conditions are incompatible at $x=0$ hence there is no function $w$ in $W$ such that $\|u-w\|_\infty=\frac12$.
Finally,  one can modify $w_0$ to get some function $w_\varepsilon$ in $W$ such that $\|u-w_\varepsilon\|_\infty\leqslant\|u-v\|_\infty+\varepsilon$ hence $\|u\|_{V/W}=\frac12$. For example, one can consider the unique $w_\varepsilon$ in $W$ which is affine on $x\leqslant-\varepsilon$ and on $x\geqslant\varepsilon$ and such that $w_\varepsilon(x)=-x/(2\varepsilon)$ on $|x|\leqslant\varepsilon$.
Edit: For the last step, one could try to use the approximation of $w_0$ by its Fourier series, that is, to consider $w_n(x)=-\sum\limits_{k=1}^n\frac{\sin(2k\pi x)}{\pi k}$. Unfortunately, due to Gibbs phenomenon, this choice leads to $\|w_n-u\|_\infty$ converging to $\frac12+a$ where $a\approx0.089490$, instead of the desired limit $\frac12$.
A: Here is an explicit sequence of functions that approaches the infimum:
Let $\phi_{-}(f) = \int_{-1}^0 f$, $\phi_{+}(f) = \int_0^{1} f$. (Both $\phi_{-}$ and $\phi_{+}$ are continuous, hence $W = \phi_{-}^{-1}\{0\} \cap \phi_{+}^{-1} \{0\}$ is closed.)
Now consider the sequence of functions
$$w_n(x) =
\left\{
 \begin{array}{ll}
  x-\frac{1}{2}-\alpha_n  & \mbox{if } x \in [\frac{1}{n},1] \\
  (\frac{1}{n}-\frac{1}{2}-\alpha_n)nx & \mbox{if } x \in [0,\frac{1}{n}] \\
                -w_n(-x) & \mbox{if } x \in [-1,0)
 \end{array}
\right.$$
A rather tedious calculation shows that to have $\phi_{+}(w_n)=0$ (and hence $\phi_{-}(w_n)=0$, by oddness), I need to pick $\alpha_n = \frac{1}{4 n -2}$.
Furthermore, it is clear that $\|f-w_n\|_{\infty} = \frac{1}{2}+\alpha_n$, from which it follows that $\inf_{w \in W} \|f-w\|_{\infty} = \frac{1}{2}$.
