Proving discontinuity using epsilon-delta-definition: Have I understood this correctly? I've been struggling with using the $\epsilon$-$\delta$ definition of continuity to prove that some given functions are discontinuous. I would greatly appreciate if someone could take a look at my work and see if what I've done is correct, or else correct me if I'm completely off the mark. 
Function 1:
$$
f(x)=
\begin{cases}
x+1, & x<0\\
x, & x \ge 0
\end{cases}
$$
To prove that $f(x)$ is continuous in $x=0$, one would have to prove that for every $\epsilon>0$, there exists a $\delta>0$ such that when $|x-0|=|x|<\delta$, 
then $|f(x)-f(0)|=|x+1-0|=|x+1|<\epsilon$. To prove that $f(x)$ is not continuous in $x=0$, one must show that there exists some $\epsilon>0$ such that $|x|<\delta$, but $|x+1|\ge\epsilon$. 
This is what I've got so far: 
Choose $\epsilon=\frac{1}{2}$. Now, if for example $\delta=\frac{\epsilon}{2}$, then $|x|<\delta=\frac{\epsilon}{2}$ implies $-\frac{\epsilon}{2}<x<\frac{\epsilon}{2}$. So if $x=-\frac{\epsilon}{3}$, then $|x|=|-\frac{\epsilon}{3}|<\delta$, but 
$$|x+1|=\left|-\frac{\epsilon}{3}+1\right|=\left|-\frac{\frac{1}{2}}{3}+1\right|=\left|-\frac{1}{6}+1\right|=\frac{5}{6}>\frac{1}{2}=\epsilon$$
Function 2:
$$
f(x)=
\begin{cases}
\cos\frac{1}{x}, & x\ne0\\
0, & x = 0
\end{cases}
$$
Again, to prove that $f(x)$ is continuous in $x=0$, one would have to prove that for every $\epsilon>0$, there exists a $\delta>0$ such that when $|x-0|=|x|<\delta$, 
then $|f(x)-f(0)|=|\cos\frac{1}{x}-0|=|\cos\frac{1}{x}|<\epsilon$. To prove that $f(x)$ is not continuous in $x=0$, one must show that there exists some $\epsilon>0$ such that $|x|<\delta$, but $|\cos\frac{1}{x}|\ge\epsilon$. 
This is what I've got: 
Choose $\epsilon=\frac{1}{2}$
and let's say that $\delta=\frac{3}{\pi}\epsilon$. If $x=\frac{3}{4\pi}$, then $|x|<\frac{3}{2\pi}=\frac{3}{\pi}\epsilon=\delta$, but
$$
\left|\cos\frac{1}{x}\right|=\left|\frac{1}{\frac{3}{4\pi}}\right|=\left|\cos\frac{4\pi}{3}\right|=\left|-\frac{1}{2}\right|=\frac{1}{2}\ge\epsilon
$$
Am I doing something wrong here? I don't feel that I've mastered the technique of proving that a function is discontinuous properly. Does anyone have any advice as to how to go about solving such problems, or any other thoughts on the matter?
Also, I have read the other posts on this topic and worked my way trough the problems discussed there, but I would like to check if I have got this right by 
showing my work. :) 

You are missing a few quantifiers from your definition of not continuous:

$f$ is not continuous at $a$ if there exists $\epsilon > 0$ such that for all $\delta > 0$ there exists $x$ with $0 < |x-a| < \delta$ and $|f(x) - f(a)| \geq \epsilon$.

It probably won't be true that for all $x$, $0 < |x-a| < \delta \implies |f(x)-f(a) \geq \epsilon$.  You just need to find one $x$.  And you need an argument that works for any positive $\delta$, so your proof grows fuzzy when you say things like “If for example $\delta = \frac{\epsilon}{3}$...”
So for your first function, $\epsilon = \frac{1}{2}$ is a good choice.  Given any $\delta > 0$, you want a point in $(-\delta,\delta)$ such that $f(x) > \frac{1}{2}$. If $\delta < \frac{1}{2}$, then $x=-\frac{\delta}{2}$ will work, because then $f(x) = 1-\frac{\delta}{2} > 1-\frac{1}{4} > \frac{1}{2}$.  If $\delta \geq \frac{1}{2}$, then $x= -\frac{1}{4}$ will work, because it is in $(-\delta,\delta)$ and $f(-1/4) = 3/4$.
For the second, again, $\epsilon = \frac{1}{2}$ works.
That is because for all $\delta > 0$ there exists $x$ in $(-\delta,\delta)$ such that $f(x) = 1$.  Can you see why?
