Show that $f(x)$ is not continuous at every point $x_0$ not at the origin.
$f(x) = \begin{cases} 2x, & \text{x rational} \\ -2x, & \text{x irrational} \end{cases}$
My working so far:
Using the converse statement,
$\exists\epsilon>0$ such that $\forall\delta>0, \exists x_\delta$ such that $|x_\delta-x_0|<\delta$ and $|f(x_\delta)-f(x_0)|\ge\epsilon$
Then, $|2x_\delta-2x_0|<2\delta??$......and now I'm stuck. How do I go about finding $\epsilon$ and $x_\delta$ ?
I understand there are multiple questions on epsilon-delta proofs but a lot of them simply say choose $\epsilon$ as _ without really explaining. Also the fact that the proof isn't for a specific point is throwing me off.
As you asked, let's use the definition: we fix $x_0\neq 0$ and we have to find $\varepsilon>0$ which fits the requirement.
Suppose $x_0$ is rational: by the density of $\mathbb{R}\setminus\mathbb{Q}$ in $\mathbb{R}$ we can always find $x_{\delta}$ such that
then $$| f(x_0) - f(x_{\delta})| = |2x_0 - (-2x_{\delta})| = 2|x_0 + x_{\delta}|$$ and using $x_{\delta} = (x_{\delta} - x_0) + x_0 $ we get $$ | f(x_0) - f(x_{\delta})| \geq 2(2|x_0| - |x_0 - x_{\delta}|) \geq 4|x_0| $$ Thus, taking $\varepsilon = 2|x_0|$ we have the desired result. The same reasoning applies if we take $x_0$ irrational.
The only problem is when $x_0 = 0$: in that case the modulus is $0$ so we cannot use the previous estimate, indeed you have to prove the continuity at $x_0 = 0$. It is easy to prove continuity at $0$ using sequential continuity, i.e. showing that for every sequence $\{a_n\}$ such that $a_n \to 0$ as $n\to +\infty$ we get $f(a_n) \to f(0)$ as $n\to \infty$.
The same strategy could also be used to prove that $f$ is not continuous if $x_0\neq 0$, as Surb pointed out.