Prove or disprove that there exists $K$ such that $|f(x)-f(y)|\leq K |x-y|,\;\forall\;\;x,y\in[0,1],$ edited version.

You are correct, the function $f$ is not Lipschitz in $[0,1]$, but your argument should be modified. You may simply say that $$\frac{f(1/n)-f(0)}{\frac{1}{n}-0}=\sqrt{n}\to +\infty$$ which contradicts the fact that $|f(x)-f(y)|/|x-y|$ is bounded by a constant $K$.

On the other hand this is not a counterexample for your statement. For the same reason as above (Just take $y=1/n$), for $x=0$ there is no constant $K_0$ such that $$|f(0)-f(y)|\leq K_0 |0-y|,\;\;\forall y\in[0,1].$$ Instead consider the function $$f(x)=\cases{x\sin(1/x)& if $x\not=0$\\0& if $x=0$,}$$ If $x_n=1/(2\pi n)$ and $y_n=1/(2\pi n+\pi/2)$. then $|f(x_n)-f(y_n)|/|x_n-y_n|$ is unbounded which implies that $f$ is not Lipschitz in $[0,1]$, but for any $x\in[0,1],$ there exists $K_x$ such that $$|f(x)-f(y)|\leq K_x |x-y|,\;\;\forall\;\;y\in[0,1].$$ In fact take $K_0=1$ and for $x\in(0,1]$ the existence of $K_x$ follows from $f'\in C^1((0,1])$.


This isn't incorrect per se, but its unnecessarily convoluted. To show that $f'$ is unbounded, just observe that $f'(x)=\frac{1}{2\sqrt{x}}$ so that $\lim_{x\to 0^+}f'(x)=\infty$. Hence, $f$ is not Lipschitz on $[0,1]$, which is precisely what you want to prove. That's all you need to say.

The last part is a little hand-wavy though. Technically, you should say something like this: $f$ is Lipschitz on $[\epsilon,1]$ with constant $K_\epsilon:=\sup_{\epsilon\leq x\leq 1}|f'(x)|$. Since $K_\epsilon\to\infty$ as $\epsilon\to 0^+$, $f$ is not Lipschitz on $[0,1]$.

Better still just to do an explicit calculation, as the other fellow did.