Using the formal definition of uniform continuity, show that $f(x)=x^2+x$ is uniformly continuous on $(0,1)$

My attempt:

Show that $\forall\epsilon>0,\exists\delta>0:\vert x-y\vert<\delta,x,y\in(0,1)\Rightarrow\vert f(x)-f(y)\vert<\epsilon$

Take $\delta=\min\{1,\frac{\epsilon}{4}\}$. Then $$\vert x-y\vert<1\Rightarrow y-1<x<y+1$$ $$\Rightarrow y^2-3y+2<x^2+x<y^2+3y-2$$ (since $f(x)$ is always increasing on $(0,1)$) $$\Rightarrow-4y+2<(x^2+x)-(y^2+y)<2y+2<4\cdot\frac{\epsilon}{4}\leq\epsilon$$

Is this right? I am not entirely sure how to select $\delta$ and $\epsilon$

• From $y-1 <x$, you might not get $(y-1)^2 <x^2$ as $y-1$ might be negative with $|y-1|>x$.
– user99914
Nov 2 '15 at 7:38

In my opinion, in dealing with these questions, one should start by expanding $$|f(x) - f(y)|$$ and see if it can be estimated by terms involving $|x-y|$. In this situation,
$$\begin{split} |f(x) - f(y)| &= |x^2 +x - y^2 - y| \\ &= |x^2 - y^2 + (x-y)|\\ &= |(x+y)(x-y) + (x-y)| \\ &= (x+y+1)|x-y|. \end{split}$$
As $x, y\in (0,1)$, $x, y<1$. So we have $$|f(x) - f(y)| < 3|x-y|.$$ Now it is clear how we should choose our $\delta$. Let $\epsilon >0$, then let $\delta = \epsilon/3$. Thus if $x, y\in (0,1)$ so that $|x-y| < \delta$, then $$|f(x) - f(y)| < 3|x-y| < 3\frac {\epsilon}{3} = \epsilon.$$ As $\epsilon>0$ is arbitrary, $f(x) = x^2 + x$ is uniformly continuous on $(0,1)$.