Norm of the linear functional $f(u(x)) = \int_{0}^{1} (2x-1) u(x) dx$ Let  $ f(u(x)) = \int_{0}^{1} (2x-1) u(x) dx $ be a linear functional defined for all $ u \in (C[0,1], ||.||_\infty) $. Show that $ ||f|| = \frac{1}{2} $.
I have been able to show that $ || f ||  \le \frac{1}{2} $ without much trouble.
Usually I'm also able to prove by setting $ u(x) = 1 $ and using $ |f(u)| \le ||f|| \space ||u|| $ that the above inequality is actually an equality.
In this case, however (abusing notation a bit):
$ | f (1)  |  = | \int_{0}^{1} (2x-1) dx| = 0 $
Therefore I'm only able to prove in the end that $ 0 \le ||f|| \le \frac{1}{2} $ which is not quite a solution.
I tried playing around with different functions with sup-norm of 1 but I could not quite get the desired result. Hopefully I'm not missing something too obvious.
 A: For $\varepsilon > 0$, sufficiently small, consider the function $u_\varepsilon(x)$ defined as follows:

*

*$u_\varepsilon(x) = -1$ for $0 \leq x \leq \frac{1}{2}-\varepsilon$

*$u_\varepsilon(x)=1$ for $\frac{1}{2}+\varepsilon \leq x \leq 1$

*$u_\varepsilon(x)$ is the equation of the line connecting the points $u_\varepsilon(1/2-\varepsilon)$ and $u_\varepsilon(1/2+\varepsilon)$ for $\frac{1}{2}-\varepsilon < x <  \frac{1}{2}+\varepsilon$
It's easy to see that $u\in C[0,1]$ and $\lVert u \rVert_\infty = 1$, and with a few calculations we can verify that
$$|f(u(x))| = \frac{1}{2} - \frac{2\varepsilon^2}{3}$$
which tends to $1/2$ as $\varepsilon \to 0^+$. This proves that $\lVert f \rVert \geq \frac{1}{2}$.
A: Using the hint from the comments, define functions $u_n$ as
$$u_n(x) = \left\{\begin{array}{ll}-1, & x\in[0,\frac{1}{2}-\frac{1}{2n}]\\
2nx-n,& x\in \left(\frac{1}{2}-\frac{1}{2n},\frac{1}{2}+\frac{1}{2n}\right)\\
1, & x\in [\frac{1}{2}+\frac{1}{2n},1].
\end{array}\right.$$
For $n\in\mathbb{N}$ we have $u_n\in C[0,1]$ and $\|u_n\|_{\infty} = 1$. Then $f(u_n(x))$ is equal to
$$\begin{split}f(u_n(x)) &= -\int_0^{\frac{1}{2}-\frac{1}{2n}}(2x-1)dx+\int_{\frac{1}{2}-\frac{1}{2n}}^{\frac{1}{2}+\frac{1}{2n}}(2nx-n)(2x-1)dx+\int_{\frac{1}{2}+\frac{1}{2n}}^1(2x-1)dx=\\
&=-\Big[x^2-x\Big]^{\frac{1}{2}-\frac{1}{2n}}_0+\frac{n}{6}\Big[(2x-1)^3\Big]_{\frac{1}{2}-\frac{1}{2n}}^{\frac{1}{2}+\frac{1}{2n}}+\Big[x^2-x\Big]_{\frac{1}{2}+\frac{1}{2n}}^1=\\
&=\frac{1}{4}-\frac{1}{4n^2}+\frac{1}{3n^2}+\frac{1}{4}-\frac{1}{4n^2} =\frac{1}{2}-\frac{1}{6n^2}.\end{split}$$
You already know that $\|f\|\leq \frac{1}{2}$. From the definition
$$\|f\| = \sup\{\|fu\|:\|u\|_{\infty} = 1\}\leq \frac{1}{2}$$
but
$$\sup_{n\in\mathbb{N}}\|fu_n\| = \frac{1}{2}.$$
It means that $\|f\|=\frac{1}{2}$.
