Prove all limit points of $[a,b]$ are in $[a,b]$ I know there are similar topics, but I'm trying to get better at providing a proof from scratch. The problem is to show $[a,b]$ is closed and by definition this means that it contains all its limit points. My work so far:
If $x \notin [a,b]$ then either $x<a$ or $x>b$. We will first consider $x<a$. Now, let $\epsilon < a-x$, then the $\epsilon$-neighborhood of $x$ is $(x-\epsilon,x+\epsilon)$. And $$x-\epsilon<x-a+x=2x-a<x<x+\epsilon<x+a-x=a.$$
Thus $x+\epsilon<a$ and this implies that there are no elements of $[a,b]$ in the $\epsilon$-neighborhood of $x$, thus $x$ is not a limit point of $[a,b]$.
Now we will consider $x>b$ in a similar way. Let $\epsilon<x-b$, then the $\epsilon$-neighborhood of $x$ is $(x-\epsilon, x+\epsilon)$. And $$x-\epsilon<x-x+b=b<x<x+\epsilon<x+x-b=2x-b.$$
But the last line implies that $x-\epsilon<b$, which would mean that $x \in [a,b]$, which is clearly not the case! What do I do wrong!?
 A: The inequalities $2x-b>b$ and $2x-b>x-\epsilon$ together do not imply that $b>x-\epsilon$.
Actually from $\epsilon<x-b$ we are ready to get $b<x-\epsilon$, so no elements of $[a,b]$ in the $\epsilon$-neighbourhood of $x$.
A: Your proof idea is correct, but you need to be more careful in the cases with your inequalities. The error in the second part is when you say $x-\epsilon<x-x+b=b$, this is not true, it is in fact $>$ and not $<$. Make sure you always keep track of whether each replacement is $<$ or $>$, and make sure you think about signs (here we have $-\epsilon$, not $\epsilon$).
Here you seem to be trying to show $x-\epsilon$ is less than something, but you actually want to show it's greater than $b$ -- that way there are no elements of $[a,b]$ in the $\epsilon$-neighborhood of $x$.
So in the second case you should fill in
$$
x - \epsilon > \cdots > b.
$$
Your first case also has some error.
The first line, $x - \epsilon < x - a + x$, is not true -- in fact, $x - \epsilon$ is greater than $x - (a - x)$. But you do write the correct statement after that, namely that $x + \epsilon < x + (a - x) = a$.
All you need for this case is to fill in
$$
x + \epsilon < \cdots < a.
$$
