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!?
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$.