I am trying to show that $x^2$ is uniformly continuous on the set union of intervals [n,n+$n^{-2}$] for all positive integer n. I have also checked the previous posts. But my question is that for a given epsilon we need to choose $\delta$ smaller than $\frac{\epsilon}{2(n+n^{-2})}$. This will ensure uniform continuity. Here delta depends on interval where two elements are. for n=5 delta changes or for n=6 also another delta. In uniform continuity for every epsilon there exists a delta which satisfies for all points in delta distance. Here there are several deltas if I am not mistaken. Can you clarify this issue? I am bit confused thanks a lot.
Uniform continuity choosing delta problem
calculusepsilon-deltauniform-continuity
Related Solutions
Setting $\varepsilon$ to something doesn't make sense. You need to take $\varepsilon$ to be given, and find a value of $\delta$ that's small enough.
Continuity should not say $\exists c\in(0,1]$ etc., where $c$ is in the role you put it in. Rather, continuity at the point $c$ should be defined by what comes after that.
Uniform continuity says $$ \forall\varepsilon>0\ \exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right). $$
Lack of uniform continuity is the negation of that: $$ \text{Not }\forall\varepsilon>0\ \exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right). \tag 1 $$
The way to negate $\forall\varepsilon>0\ \cdots\cdots$ to by a de-Morganesque law that says $\left(\text{not }\forall\varepsilon>0\ \cdots\cdots\right)$ is the same as $(\exists\varepsilon>0\ \text{not }\cdots\cdots)$, and similarly when "not" moves past $\forall$, then that transforms to $\exists$. So $(1)$ becomes $$ \exists\varepsilon>0\text{ not }\exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 2 $$ and that becomes $$ \exists\varepsilon>0\ \forall\delta>0\text{ not }\forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 3 $$ and that becomes $$ \exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\text{ not } \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 4 $$ and that becomes $$ \exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1]\text{ not } \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 5 $$ and that becomes $$ \exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1] \left(|x-y|<\delta\text{ and not }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 6 $$ and finally that becomes $$ \exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1] \left(|x-y|<\delta\text{ and }\left|\frac1x-\frac1y\right|\ge\varepsilon\right). \tag 7 $$
To show that such a value of $\varepsilon$ exists, it is enough to show that $\varepsilon=1$ will serve. You need to find $x$ and $y$ closer to each other than $\delta$ but having reciprocals differing by more than $1$. It is enough to make both $x$ and $y$ smaller than $\delta$ and then exploit the fact that there's a vertical asymptote at $0$ to make $x$ and $y$ far apart, by pushing one of them closer to $0$.
We say that $a_n$ and $b_n$ are equivalent if $a_n-b_n \to 0$. If $f$ is uniformly continuous then maps equivalent sequences to equivalent sequences.
1) Consider the sequences $a_n =(1/n)$ and $b_n=(1/2n)$ both are equivalent in $(0,1]$. But $f(a_n)$, $f(b_n)$ are not equivalent. So $f$ is not uniformly continuous in $(0,1]$.
[Alternatively you can show that if $f$ is uniformly continuous then maps Cauchy sequences to Cauchy sequences, and in particular for this case, $(1/n)$ is a Cauchy sequence in $(0,1]$, but $f(1/n)$ is not a Cauchy sequence].
2) You can show that uniformly continuous using $\varepsilon$-$\delta$ definition is logically equivalent to say that $f$ maps equivalent sequences to equivalent sequences, i.e., $f(a_n)-f(b_n)\to 0$ whenever $a_n -b_n \to 0$. Using this second definition:
Given $(a_n), (b_n) \subset [1, \infty)$ and $a_n-b_n \to 0$. We shall show that $f(a_n)-f(b_n) \to 0$. Let $\varepsilon>0$ be arbitrary and choose $n_0>0$ such that $|a_n-b_n|<\varepsilon$ for all $n\ge n_0$. Thus
$$|f(a_n)-f(b_n)|= \bigg|\frac{1}{a_n}-\frac{1}{b_n} \bigg|=\frac{|a_n-b_n|}{a_n b_n}\le |a_n-b_n|< \varepsilon$$
This is possible since $1\le a_n, b_n$. Hence $f(a_n)-f(b_n) \to 0$.
3) Consider the sequences $a_n = n$ and $b_n = n+1/n$ both are equivalent sequences in $[0,\infty)$. But $f(b_n)=n^2+2+1/n^2=f(a_n)+2+1/n^2$, so $f(b_n)-f(a_n)\ge2$. Thus we can conclude that is not uniformly continuous.
4) Since $f$ is continuous on $[0,1]$ then must be uniformly continuous (why?). Let $(0,1) \hookrightarrow [0,1]$. We claim that is uniformly continuous, let $x_n-y_n\to 0$ and $(x_n),(y_n) \subset (0,1)$, so $i(x_n)-i(y_n) = x_n -y_n \to 0$, since the sequences are arbitrary it holds for all equivalent sequences and so $i$ is uniformly continuous.
We claim that $f\circ i$ is uniformly continuous. We shall show that maps equivalent sequences to equivalent sequences. Since $i(x_n)-i(y_n)\to 0$ and $f$ is uniformly continuous then $ f(i(x_n))-f(i(y_n))=(f\circ i)(x_n)-(f \circ i)(y_n) \to 0$.
Hence $f\circ i$ is uniformly continuous. But $f\circ i=f \restriction _{(0,1)} $ which is just the square root function define on $(0,1)$.
5) Suppose that $(a_n),(b_n) \subset [1,\infty)$ and $a_n-b_n \to 0$. We shall show that $a_n^{1/2}-b_n^{1/2} \to 0$. Given $\varepsilon>0$, choose $n_0$ such that $|a_n-b_n|< \varepsilon$ for all $n\ge n_0$. Thus
$$|f(a_n)-f(b_n)|=|\sqrt{a_n}-\sqrt{b_n}|= \bigg|\frac{a_n-b_n}{\sqrt{a_n}+\sqrt{b_n}} \bigg|=\frac{|a_n-b_n|}{\sqrt{a_n}+\sqrt{b_n}}\le \frac{|a_n-b_n|}{2}< \varepsilon$$
Since $1\le a_n, b_n$.
Best Answer
Suppose that you have a function $f\colon[-1,1]\longrightarrow\Bbb R$ and consider the problem: is the restriction of $f$ to $[-1,0]$ continuous? Asserting that it is means that, for any $\varepsilon>0$, there is some $\delta_1>0$ such that$$(\forall x,y\in[-1,0]):|x-y|<\delta_1\implies\bigl|f(x)-f(y)\bigr|<\varepsilon.$$Now, consider the problem: is the restriction of $f$ to $[0,1]$ continuous? Asserting that it is means that, for any $\varepsilon>0$, there is some $\delta_2>0$ such that$$(\forall x,y\in[0,1]):|x-y|<\delta_2\implies\bigl|f(x)-f(y)\bigr|<\varepsilon.$$So, you have two $\delta$'s, $\delta_1$ and $\delta_2$, which may be distinct. There is nothing wrong with that. You wanted to establis that there was one $\delta$ for each interval, and, again, it may will happen that they are not the same.
So, in your situation, on any interval $\left[n,n+\frac1{n^2}\right]$ you shall have a certain number $\delta_n$. And there's nothing wrong if there is no $\delta$ that works for all thos intervals. There is no such $\delta$ if the intervals are of the for $[n,n+1]$, but the restriction of $x^2$ to any such interval is still uniformly continuous.