Understanding why $\frac{1}{x}$ is not uniformly continuous. From the $\epsilon-\delta$ definition, I find it simple enough to understand why $f(x)=\frac{1}{x}$ is not uniformly continuous. To have a fixed difference in the values of the function, the difference between the values of $x$ isn't constant so there is no 'fixed $\delta$' that works throughout the graph.
Enter the Heine-Cantor Theorem.
Consider an interval that is closed and bounded, say, $[1,5]$. Since $f(x)$ is continuous in this interval, it should be uniformly continuous as well(right?). I don't know what I understand incorrectly- the definition or the Theorem, but I am not very familiar with topology to the extent of metric spaces(my course barely started). I understand closed and open intervals, bounded intervals, neighborhoods, limits and continuity.  Please help me out.
 A: The Heine-Cantor Theorem makes a very important assumption: that the domain is compact.
And indeed, $x\mapsto\frac{1}{x}$ is uniformly continuous on any compact interval $[a,b]$. But it is not uniformly continuous on $(0,\infty)$ or any $(0,b]$, which are not compact.
So as you can see, the same function can be uniformly continuous or not, depending on the domain.

// EDIT: Consider $x\mapsto \frac{1}{x}$ with $[a,b]$ as domain, with $a>0$. Let $\epsilon >0$. Consider for a moment that $|\frac{1}{x}-\frac{1}{y}|<\epsilon$. This means
$$|\frac{y-x}{xy}|<\epsilon$$
and thus $|y-x|<\epsilon\cdot |xy|$. Since we are dealing with $[a,b]$ domain then $(x,y)\mapsto |xy|$ function has infimum on $[a,b]\times[a,b]$ which is $a^2$, which is a positive number (note that in $(0,\infty)$ or $(0,b]$ case the infimum is $0$ which fails to give us a correct $\delta$ as we will soon see). Therefore, given $\delta:=\epsilon\cdot a^2$ (note that $\delta$ depends only on $\epsilon$, $a$ is a fixed number), we have that $\delta>0$ and from
$$|y-x|<\delta$$
we easily conclude that $|\frac{1}{x}-\frac{1}{y}|<\epsilon$ by reversing the previous reasoning. So $x\mapsto\frac{1}{x}$ is uniformly continuous on $[a,b]$.
A: Bear with me.   Suppose $1 \le a < a+d $.
Then $0< \frac 1{a+d} - \frac 1a \le 1$.
$\frac 1a - \frac 1{a+d} = \frac {(a+d)}{a(a+d)} - \frac a{a(a+d)}=\frac {(a+d)-a}{a(a+d)} = \frac d{a(a+d)}$ but as $a,a+d \ge 1$ then $a(a+d) \ge 1$ so $\frac d{a(a+d)} \le d$.
But lets say that $0 < c < c+h$.  Then $0< \frac 1{c+h} < \frac 1c$ but there is no upper limit so what $\frac 1c$ can be.  So if we tried to subtract $\frac 1c - \frac 1{c+h} = \frac h{c(c+h)}$ but as $c$ can be as close to $0$ as we want then $\frac h{c(c+h)}$ can be as large as we want with no limit.
And that's the key difference.
$\frac 1x$ is uniformly continuous on $[1,5]$.  Pf: For any $\epsilon > 0$ let $\delta =\epsilon$.  If $x_1,x_2\in [1,5]$ and $|x_2 - x_1| < \delta$.   Let $x_a=\min(x_1,x_2)$ and $x_b=\max(x_1,x_2)$ then $1\le x_a \le x_b < x_a+\delta$.
Then $0 < \frac 1{x_a + \delta} < \frac 1{x_b} \le \frac 1{x_a} \le 1$ and $|\frac 1{x_1}- \frac 1{x_2}|=\frac 1{x_a}-\frac 1{x_b} < \frac 1{x_a}-\frac 1{x_a+\delta} = \frac {\delta}{x_a(x_a + \delta)} < \delta = \epsilon$.  So $\frac 1x$ is uniformly continuous on $[1,5]$.
But $\frac 1x$ is not uniformly continuous on $(0, \infty)$.  Pf:  Let $\epsilon > 0$.  Now let $\delta$ be any positive real number.  Let $a$ and $b$ be so that $\frac 1\delta < b < b+\epsilon < c$.  Now let $x_1 =\frac 1c; x_2 = \frac 1b$. We have $0 < x_1 < \delta$ and $0<  x_2 < \delta$ so $|x_2-x_1| < \delta$.  But $|\frac 1{x_1} - \frac 1{x_2}| = |c-b| > \epsilon$.  So we failed to find a $\delta$ where $|x_1-x_2|< \delta \implies |\frac 1{x_1} -\frac 1{x_2}|<\epsilon$.
