Let $f$ be a function defined on the interval $[a,b]$ such that $0<a<b$:
$\forall x,y\in[a,b],x\neq y,|f(x)-f(y)|<k|x^{3}-y^{3}|$ where $k>0$ .
Prove that the function $f$ is continuous.
My attempt
I let $\epsilon>0$ and I let $\eta=\frac{\epsilon}{k}$ so by definition of uniform continuity:
$|x^{3}-y^{3}|<\eta\Rightarrow|f(x)-f(y)|<k|x^{3}-y^{3}|<k\eta=\epsilon$
So therefore $f$ is uniformly continuous. Can anyone check my work please? Thank you in advance.