An exercise of advanced analysis with the sign function I am not able to finalize this following exercise:
Let $E=C^0([-1,1])$ and $\|\cdot\|_E=\|\cdot\|_{\infty}$ and let $f\colon E\rightarrow \mathbb{R}$ a function defined as
\begin{equation*}
f(u)=\int_{-1}^{1}sgn(x)u(x)dx, \quad \text{where} \quad sgn(x)=\frac{x}{|x|} \text{ if $x\in [-1,1]\smallsetminus \{0\}$.}
\end{equation*}
Show that


*

*$f\in E'$;

*$\|f\|_{E'}=2$.


Please note that with $E'$ I mean the space of continous and linear functional.
My idea to solve it is the following


*

*Here we have to prove that $f$ is linear and continous. $f$ is linear because
\begin{equation*}
\begin{split}
f(u+v) & =\int_{-1}^{1}sgn(x)(u+v)(x)dx \\
& =\int_{-1}^{1}sgn(x)u(x)dx+\int_{-1}^{1}sgn(x)v(x)dx =f(u)+f(v), \\
f(\lambda u) & =\int_{-1}^{1}sgn(x)(\lambda u)(x)dx = \lambda\int_{-1}^{1}sgn(x)u(x)dx =\lambda f(u).
\end{split}
\end{equation*}
Additionally $f$ is continous because $\forall \varepsilon>0\, \exists \delta>0$ such that $\|u-v\|_{\infty}<\delta$ $\forall u,v\in E$ implies that $\|f(u)-f(v)\|_{\mathbb{R}}<\varepsilon$, in fact
\begin{equation*}
\|f(u)-f(v)\|_{\mathbb{R}}=\|f(u-v)\|_{\mathbb{R}}\leq\|f\|_{E'}\|u-v\|_{\infty}<\varepsilon
\end{equation*}
Hence $f\in E'$.

*First of all I showed that $\|f\|_{E'}\leq 2$, in fact
\begin{equation*}
\begin{split}
\|f\|_{E'} & =\sup_{u\in E, \|u\|_{\infty}\ne 0} \frac{|f(u)|}{\|u\|_{\infty}}= \sup_{u\in E, \|u\|_{\infty}\ne 0} \frac{\left|\int_{-1}^{1}sgn(x)u(x)dx\right|}{\|u\|_{\infty}} \\
& \leq \sup_{u\in E, \|u\|_{\infty}\ne 0} \frac{\left|\int_{0}^{1}u(x)dx\right|}{\|u\|_{\infty}} + \sup_{u\in E, \|u\|_{\infty}\ne 0} \frac{\left|\int_{-1}^{0}(-1)u(x)dx\right|}{\|u\|_{\infty}} = 1+1 =2.
\end{split}
\end{equation*}
Now I have to show the inverse inequality, that is $\|f\|_{E'}\geq 2$. My idea is to use the sequence $u_h(x)$ defined as
\begin{equation*}
u_h(x)=\begin{cases}
1 \quad \text{if $\frac{1}{h}< x\leq 1$} \\
hx \quad \text{if $-\frac{1}{h}\leq x\leq \frac{1}{h}$} \\
-1 \quad \text{if $-1 \leq x< \frac{1}{h}$}
\end{cases}
\end{equation*}
where $u_h\rightarrow u$ if $h\rightarrow +\infty$.


About the second part of the second point i am not sure if it is right, someone could help me with that part?
 A: Generally correct, just a few points where you are bending the usual proof logic:
a) In your proof of continuity in part 1, near the end you use 
$$\|f(u-v)\|_{\mathbb{R}}\leq\|f\|_{E'}\|u-v\|_{\infty}.$$
That makes no sense, because you are still in the process of proving that $f \in E'$, especially that $f$ is continuous, so you can't argue with the value of $\|f\|_{E'}$. It is precisely the condition that $f$ is continuous that allows us to define the value $\|f\|_{E'}$ as a supremum of something, and we know that supremum is not $\infty$.
What you need to do here, is get the proof that you used in part 2 that proved
$$\|f(u-v)\|_{\mathbb{R}}\leq2\|u-v\|_{\infty}$$
into this part. It's needed here already. 
b) In part 2, you used the term
$$\sup_{u\in E, \|u\|_{\infty}\ne 0} \frac{\int_{0}^{1}u(x)dx}{\|u\|_{\infty}}$$
where you have omitted the absolute value signs around the integral that are still present in the remaining terms (maybe it's just a clerical error). The absolute value signs are needed here as well, because nothing indicates that $u(x)$ needs to be positive, so the integrand and the whole integral can still be negative. 
c) In the "$\|f\|_{E'}\geq 2$" part that you actually asked about, you appear to be slightly confused. 
You are trying to define a function sequence $u_h(x)$, that depends on $u(x)$, but what $u(x)$ are you talking about? This part of the proof is not where you need to proof something for any given $u(x)$, this part is where you need to give an example of a function $u \neq 0 \in E$ with $\lvert f(u)\rvert = 2 \Vert u\rVert$, or (in this case, as the supremum is not an attained maximum) a sequence of functions $u_n \neq 0 \in E$ with
$$\lvert f(u_n)\rvert = c_n \Vert u\rVert, \; \lim_{n\to \infty}c_n=2.$$
That's what the example from Kabo Murphy's answer does.
Also note that in the sequence of functions $u_h(x)$ that you defined, those functions aren't even continuous at $x=h$ if $u(\frac1h) \neq 1$.
So to me it looks like you got the right idea,  but where slightly confused about the formalities what exactly you needed to do.
A: Let $u_n(x)=nx$ for $|x| <\frac  1 n$, $u_n(x)=1$ for $x >\frac  1 n$ and $u_n(x)=-1$ for $x <-\frac  1 n$. This is same as the functions you defined but it is better to  take the limit through integers. Verify that  $\|u_n\|=1$ for all $n$ and $f(u_n)=\int \frac x {|x|} u_n(x)dx \to \int 1dx=2$. For this note that the integrand is dominated by $1$ so DCT can be applied.  This implies that $\|f\|_{E'}\geq 2$  (by definition of the norm).
