How exactly can't $\delta$ depend on $x$ in the definition of uniform continuity?

I'm told that a function defined on an interval $[a,b]$ or $(a,b)$ is uniformly continuous if for each $\epsilon\gt 0$ there exists a $\delta\gt 0$ such that $|x-t|\lt \delta$ implies that $|f(x)-f(t)|\lt \epsilon$. Then it gives a little note saying that $\delta$ cannot depend on $x$, it can only depend on $\epsilon$.

With ordinary continuity, the $\delta$ can depend on both $x$ and $\epsilon$. I'm just a little lost on why $|x-t|\lt \delta$ implies $|f(x)-f(t)|\lt \epsilon$, and how $\delta$ can't depend on $x$ but only $\epsilon$.


Here's a picture that might help. A visual way of understanding $\delta$-$\epsilon$ arguments is by starting with a $\delta$-sized area in the domain, projecting up to the function, and then back onto an $\epsilon$-sized area in the range.

enter image description here

With the function $f(x) = x$, there is a bounded ratio between the size of the area I feed in and the size of the area I get out. Not so with $f(x) = x^2$! Look how I feed in small areas and get out large areas for large values of $x$. This is why we say that $f(x) = x$ is uniformly continuous, but $f(x) = x^2$ is not uniformly continuous on $\mathbb{R}$. There's no way to globally (i.e. independent of $x$) control the size of the image of $f(x) = x^2$ by controlling the size of the domain.


Compare the definitions:

1) $f$ is continuous on $(a,b)$ if $$ \forall \epsilon > 0\; {\color{green}{ \forall x\in (a,b)\;\exists \; \delta>0}} \;: \lvert x - y\rvert< \delta \Rightarrow \lvert f(x)-f(y)\rvert <\epsilon. $$ 2) $f$ is uniform continuous on $(a,b)$ if $$ \forall \epsilon > 0\; \color{green}{\exists \delta>0 \; \forall x\in (a,b)} \; : \lvert x - y\rvert< \delta \Rightarrow \lvert f(x)-f(y)\rvert <\epsilon. $$ You see that for uniform continuous the $\delta$ has to work for all $x\in (a,b)$. The fact that $\delta$ cannot depend on $\epsilon$ is just part of the definition.


For an trivial example, the function $f(x)=x$ is uniformly continuous on $(0,1)$, because for any $\epsilon>0$, there is a $\delta>0$ such that $|x-t|<\delta$ implies that $|f(x)-f(t)|<\epsilon$; namely, we can just choose $\delta=\epsilon$, and then $$|x-t|=|f(x)-f(t)|<\epsilon=\delta.$$ In contrast, the function $\sin(\frac{1}{x})$ is continuous, but not uniformly continuous, on the interval $(0,1)$ because, taking (for example) $\epsilon=\frac{1}{2}$, for any $\delta>0$ there are always some $x,t\in (0,1)$ with $|x-t|<\delta$ but $|f(x)-f(t)|\geq \epsilon$; you can just take $x=\frac{1}{2\pi k}$ and $t=\frac{1}{2\pi k+(\pi/2)}$ where $k$ is big enough to ensure that $|x-t|<\delta$.


The fact that $\delta$ doesn't depend on $x$ is exactly the definition of uniform continuity

Just look to this:

Let $f(x)=2x+3$. Then if you solve $|f(x)-f(t)|< \epsilon$ you get that $|t-x|<\frac{\epsilon}{2}$, thus $\delta=\frac{\epsilon}{2}$ works no matter what $x$ and $t$ are. This is uniform continuity.

If instead you pick $f(x)=x^2$ then if you solve $|f(x)-f(t)|< \epsilon$ you get that $|t-x| |t+x|<\epsilon$. This means that roughly, your $\delta$ needs to be about $\frac{\epsilon}{2|x|}$, and the larger $x$ is the smaller $\delta$ needs to be. In this case $\delta$ depends on $x$.


The following might help: $f:[a,b]\to \mathbb R$ is continuous means: $$\forall \epsilon >0, \forall x\in [a,b];\exists \delta >0,\forall y\in [a,b]:|x-y|<\delta \implies |f(x)-f(y)|<\epsilon$$ while $f:[a,b]\to\mathbb R$ is uniformly continuous means $$\forall \epsilon >0;\exists \delta >0, \forall x\in [a,b],\forall y\in [a,b]:|x-y|<\delta \implies |f(x)-f(y)|<\epsilon$$

so typographically, the only difference is in the order of the second and third quantifiers. The semantic meaning though is that for that first you first choose $\epsilon $ and $x$ and only then find $\delta $, while for the second one you first choose $\epsilon$, then find $\delta$. In the former you have more information and the $\delta$ may depend on $x$. But in the latter, all the information you get is $\epsilon$ and out of that alone you must find the corresponding $\delta$.