$|f(x)|\leq\sup|f(x)|$, so $f(x)^{2}\leq(\sup|f(x)|)^{2}$, hence $\sup f(x)^{2}\leq(\sup|f(x)|)^{2}$.
For $\epsilon>0$, then $\sup|f(x)|-\epsilon<|f(x)|$ for some $x$, then $\sup|f(x)|<|f(x)|+\epsilon$, hence $(\sup|f(x)|)^{2}\leq(|f(x)|+\epsilon)^{2}=f(x)^{2}+2\epsilon |f(x)|+\epsilon^{2}\leq\sup f(x)^{2}+2\epsilon M+\epsilon^{2}$, where $M=\max\\{|x_{i-1}|,|x_{i}|\\}$. Since this is true for all $\epsilon>0$, we have $(\sup|f(x)|)^{2}\leq\sup f(x)^{2}$.