Erwin Kreyszig's Introductory Functional Analysis With Applications, Section 2.8, Problem 3: What is the norm of this functional? What is the norm of the linear functional $f$ defined on the normed space $C[a, b]$ of all functions defined and continuous on the closed interval $[a,b]$ with the norm defined as 
$$\Vert x \Vert \colon= \max_{t\in[a,b]} \vert x(t) \vert \; \; \; \forall x \in C[a,b]?$$ 
Let 
$$ f(x) \colon= \int_a^{\frac{a+b}{2}} x(t) dt - \int_{\frac{a+b}{2}}^b x(t) dt \; \; \; \forall x \in C[a,b].$$ 
I know that $f$ is linear and bounded because for all $x \in C[a,b]$, we have 
$$\vert f(x) \vert = \left\vert  \int_a^{\frac{a+b}{2}} x(t) dt - \int_{\frac{a+b}{2}}^b x(t) dt  \right\vert   \leq \left\vert  \int_a^{\frac{a+b}{2}} x(t) dt  \right\vert + \left\vert \int_{\frac{a+b}{2}}^b x(t) dt  \right\vert \\ \leq \int_a^{\frac{a+b}{2}} \vert x(t) \vert dt + \int_{\frac{a+b}{2}}^b \vert x(t) \vert dt  \leq \int_a^{\frac{a+b}{2}} \max_{\tau\in[a,b]} \vert x(\tau) \vert dt + \int_{\frac{a+b}{2}}^b \max_{\tau\in[a,b]} \vert x(\tau) \vert dt  \\ = \int_a^b \max_{\tau\in[a,b]} \vert x(\tau \vert dt = (b-a)\Vert x \Vert_{C[a,b]},$$ 
which shows that $f$ is bounded and that $$\Vert f \Vert \leq b-a.$$ 
What next? How to arrive at the reverse inequality? 
 A: Here's a rather pedestrian proof. If it seems confusing, just draw the picture. You're making a function that is 1 up until some point just a bit to the left of the midpoint, and -1 from the midpoint to $b$. This isn't continuous, so you force it continuous by connecting the two line segments. This why we needed to give ourselves a bit of room to work with, so we can ensure this connecting line has a well defined slope. This doesn't contribute anything to the integral, and so you end up with something just a bit smaller than $b-a$, but you can make it as close as you like.
Define 
$$x(t)=\begin{cases}1,& a\leq t\leq\frac{a+b}{2}-\epsilon\\ \frac{a+b}{\epsilon}-\frac{2}{\epsilon}t-1 ,& \frac{a+b}{2}-\epsilon \leq t \leq \frac{a+b}{2}  \\ -1,& \frac{a+b}{2}<t\leq b\end{cases}.$$
Then you get
$$ \begin{align*}
f(x) &= \int_a^{\frac{b+a}{2}-\epsilon} dt+ \int_{\frac{b+a}{2}-\epsilon}^\frac{b+a}{2} \left(\frac{a+b}{\epsilon}-\frac{2}{\epsilon}t-1\right) dt +\int_\frac{b+a}{2}^bdt \\
&= b-a-\epsilon  
\end{align*}
 $$
So, if you combine that with the work you already did, you have 
$$b-a-\epsilon \leq \Vert f \Vert \leq b-a $$
for every $\epsilon >0.$ Since we can make $\epsilon$ arbitrarily small, this implies $\Vert f \Vert = b-a.$
A: We need to show that $||f||\geq b-a$. To do this take a sequence of continuous functions, which is monotone and converges to the step function 
\begin{align*}
x(t):=\begin{cases}1,& a\leq t\leq\frac{a+b}{2} \\ -1,& \frac{a+b}{2}<t\leq b\end{cases}.
\end{align*}
As an example we can use piecewise linear functions such that
\begin{align*}
x_n(t)&=1,\quad t\in\left[a,\frac{a+b}{2}-\frac{1}{n}\right], \\
x_n(t)&=-1,\quad t\in\left[\frac{a+b}{2},b\right].
\end{align*}
Then $||x_n||=1$, and using the monotone convergence theorem (or the dominated convergence theorem) we obtain
\begin{align*}
\lim_{n\to\infty}f(x_n)=f\left(\lim_{n\to\infty}x_n\right)=f(x)=b-a.
\end{align*}
This shows the desired result.
