TITLE: Exercise 3.4.14 Introduction to Real Analysis by Jiri Lebl
QUESTION [5 upvotes]: Suppose for $f: [0,1] \to R$, we have $|f(x) - f(y) | \le K |x-y|$, and $f(0)= f(1) = 0$. Prove that $|f(x)| \le K/2$. Further show by example that $K/2$ is the best possible, that is, there exists such a continuous function for which $|f(x)| = K/2$ for some $x \in [0 ,1]$. 

I am trying to find $x$ and $y$ that satisfy $|f(x)| \le K/2$, but I constantly fails. Can you give some help? I also appreciate if you give some hint for the second part of the question (Further show ~).

REPLY [5 votes]: Note that $|f|$ is continuous, so some $M\in[0,1]$ is such that $|f(x)|\leq|f(M)|$.
Assume that $0\leq M\leq 1/2$, then $|f(M)|=|f(M)-f(0)|\leq K|M-0|=KM\leq(1/2)K$, so $|f(x)|\leq(1/2)K$.
Assume that $1/2\leq M\leq 1$, then $|f(M)|=|f(M)-f(1)|\leq K|M-1|=K(1-M)\leq K(1-1/2)=(1/2)K$, so $|f(x)|\leq(1/2)K$ too.