I wrote a proof of the following exercise but I am dubious there may be an incorrect step in it. I would appreciate your comments:
If $f:\mathbb{R}^n\to\mathbb{R}^m$ is uniformly continuous on $D\subset\mathbb{R}^n$, then for all $\epsilon>0$ exists $K>0$ such that $||f(x)-f(y)||\leq K||x-y||+\epsilon$ for all $x,y\in D$
$\text{Proof:}$
Let $\epsilon > 0$. Since $f$ is uniformly continuous on $D$, there is $\delta > 0$ such that, if $||x-y||<\delta$, then $||f(x)-f(y)||<\epsilon$.
Define $K:=\frac{1}{\delta}>0$. Then, for all $x,y\in D$:
$K||x-y||=\frac{1}{\delta}||x-y|| \iff ||x-y||<\delta \text{ }... (1)$
Then: $||f(x)-f(y)||<\epsilon\text{ } ... (2)$
Adding $(1)$ and $(2)$ we get:
$$||f(x)-f(y)||<K||x-y||+\epsilon$$
$\square$
Is this proof correct? I have seen this exercise with an extra hypothesis: namely that $D$ is convex or compact.