Finding the norm of the linear functional $f(x)=\int_{-1}^0 x(t) \, dt - \int_0^1 x(t) \, dt$ on $C[-1,1]$

Every continuous linear functional $\Phi$ on $C[-1,1]$ can be written as $$ \Phi(f) = \int_{-1}^{1}f(t)\,d\mu(t) $$ where $\mu$ is a function of bounded variation on $[-1,1]$. When normalized so that $\mu(x+0)=\mu(x)$ for $-1 \le x < 1$, then $\|\Phi\|=\mbox{Var}(\mu)$ is the total variation of $\mu$. For your functional, $\mu$ is the continuous function $$ \mu(t) = \int_{-1}^{t}\{\chi_{[-1,0]}(s)-\chi_{[0,1]}(s)\}\,ds, $$ a function of bounded variation whose total variation $\mbox{Var}(\mu)$ is the $L^{1}$ norm of the density function: $$ \|\mu\| = \int_{-1}^{1}|\chi_{[-1,0]}(s)-\chi_{[0,1]}(s)|\,ds = 2. $$ That is, $|\Phi(f)| \le 2\|f\|$ for all $f \in C[-1,1]$, and $2$ is the smallest bound.


Here you can estimate more: \begin{align}|f(x)| &= \left|\int_{-1}^0x(t)\,dt-\int_0^1x(t)\,dt\right| \\ &\le\left|\int_{-1}^0x(t)\,dt\right|+\left|\int_0^1x(t)\,dt\right| \\ &\le\sup_{t\in[-1,0]}|x(t)|+\sup_{t\in[0,1]}|x(t)| \\ &\le 2\cdot \sup_{t\in[-1,1]}|x(t)| \\ &=2\|x(t)\|_\infty\end{align} thus $\|f\|\le 2$

Now you must show $\|f\|\ge 2$, and you will obtain $\|f\|=2$.

I thought about this some more, and to my knowledge there is no $x^*\in C[-1,1]$ s.t $\|x^*\|_\infty=1$ and $|f(x)|=2$, such an example would be $y(t)=\left\{ \begin{array}{ll} 1 & \mbox{if $-1\le t\le 0$};\\ -1 & \mbox{if $0\lt t\le 1$}.\end{array} \right. $ but of course here $y\not\in C[-1,1]$, but if we consider the sequence $x^*_n(t)=\left\{ \begin{array}{lll} 1 & \mbox{if $-1\le t\le \frac{-1}{n}$};\\ -nt & \mbox{if $\frac{-1}{n}\lt t\lt\frac{1}{n}$};\\ -1 & \mbox{if $\frac{1}{n}\le t\le 1$}.\end{array} \right.$ Here $x^*_n\in C[-1,1]$ for each $n\in\Bbb N$.

Then we see that (by definition of sup) $\|f\|=\sup_{x\in C[-1,1]:\|x\|=1}|f(x)|\ge|f(x^*_n)|\,\forall n\in \Bbb N$.

Since (if my calculations are correct) $|f(x^*_n)|=|2+\frac{1}{n^2}-\frac{2}{n}|$, we obtain $\|f\|\ge|2+\frac{1}{n^2}-\frac{2}{n}|\,\forall n\in\Bbb N\Rightarrow \|f\|\ge 2$, now of course combining the fact that $\|f\|\le 2$ and $\|f\|\ge 2\Rightarrow \|f\|=2$.