Suppose $x_n = 1-(\frac{1}{2})^n$ for $n=0,1,2,...$
Let $f(x) = \frac{1+(-1)^n}{2}x_n$ for $x=x_n$
On the other hand, let $f(x) = L_n(x)$ for $x \in (x_n,x_n+1)$ where $L_n(x)$ is the piecewise linear function with $L_n(x_n)=f(x_n)$ and $L_n(x_n+1)=f(x_n+1)$.
Prove $f(x)$ is continuous but not uniformly continuous on $[0,1)$.
I know that the proof utilizes the properties of integrability and continuity, and that $f(x)$ should not depend on where $x_n$ comes from for it not to be uniformly continuous. But I cannot make any progress.
This is a question from my analysis class's last P-set, so I need to do it well. Please provide a clear and complete proof so I can reference it for other questions related to uniform continuity in my P-set.
To prove that it is not uniformly continuous pick $\epsilon=1$.
If the function was uniformly continuous then there has to be a $\delta>0$ such that for all $x,x'$ with $|x-x'|<\delta$ we have $|f(x)-f(x)'|<\epsilon$.
However, notice that $|f(x_n)-f(x_{n+1})|=1$. On the other hand $|x_n-x_{n+1}|=(\frac{1}{2})^{n+1}$.
So taking $n$ such that $(\frac{1}{2})^{n+1}<\delta$ gives a contradiction.