Guessing Epsilon in Mathematical Proofs Involving Limits I'm trying to get a better handle on mathematical proofs that use the definition of a limit. It seems that there are numerous techniques for constructing such proofs, some of which involve "guessing" a value for epsilon. For example, when given:
$$
f(x) =
        \begin{cases}
            0 & x\in\mathbb Q\\
            1 & x\in\mathbb R \setminus \mathbb Q
        \end{cases}
$$
Prove that $\lim\limits_{x\to0}f(x)$ does not exist.
I've gone through the proof by contradiction. For example:
Assume $\lim\limits_{x\to0}f(x)=L$. If $\epsilon > 0$, there exists $\delta > 0$ such that $ 0 < |x| < \delta \implies |f(x) - L| < \epsilon$. If $q$ is a rational number where $0 < |q| < \delta$, then $|f(x) - L| < \epsilon$ for all $\epsilon > 0$. Since $f(q) = 0$, then $|-L| = |L| < \epsilon$.
Likewise, if $p$ is an irrational number where $0 < |p| < \delta$, then $|f(x) - L| < \epsilon$ for all $\epsilon > 0$. Since $f(p) = 1$, $|1 - L| = |L - 1| < \epsilon$.
Next, we can assume $0 < \epsilon \leqslant \frac 1 2 $ and then reach a contradiction, thus showing that the initial assumption was not valid. What I do not understand is how was $\frac 1 2$ chosen?
 A: The reason is that, when a function $f$ has a limit at $a$, then for all $\epsilon >0$, there is $\delta>0$ such that if $|x-a|<\delta$, then
$$|f(x) - L|<\epsilon.$$
Here $L$ is the limit. In our situation we do not know the limit $L$, than it is better to use triangle inequality to get rid of it: if $|x_1-a|<\delta$ and $|x_2-a|<\delta$, then
$$ |f(x_1) - L|<\epsilon, \ \ \ |f(x_2) - L|<\epsilon,$$
which implies
$$\tag{1} |f(x_1) - f(x_2)|< |f(x_1) - L + L -f(x_2)|\le |f(x_1)-L|+|f(x_2)-L|<2\epsilon.$$
This means that $f(x_1), f(x_2)$ should be closed to each other when $x_1, x_2$ are both closed to $a$. But in our example, one can choose a rational $x_1$ and an irrational $x_2$ so that $|f(x_1) - f(x_2)|=1$. Thus (1) false when you choose $2\epsilon \le 1$.
A: You have:
$$|1-L|\leq \varepsilon \Longleftrightarrow-\varepsilon \leq L-1 \leq \varepsilon \Longleftrightarrow 1-\varepsilon \leq L \leq 1+\varepsilon$$
and:
$$ |L| \leq \varepsilon \Longleftrightarrow -\varepsilon \leq - L \leq \varepsilon$$
to be satisfied.
By summing the two inequalities you end up with:
$$ 1-2\varepsilon \leq 0 \leq 1+2\varepsilon$$
Which is true iff $\varepsilon > 1/2$. So necessarily you choose $\varepsilon \in \, ]0;1/2]$ to have your contradiction.
A: You didn't finish the proof.
So what if $|L| < \epsilon$ and $|L-1| < \epsilon$? why would that be a contradiction?
.....
If you finish the proof you will see why that limit of $\epsilon$ so chosen.
If $|L| < \epsilon$ and $|1-L| < \epsilon$ then by the triangle inequality we have
$1= |L + (1-L)|\le |L| + |1-L| < \epsilon +\epsilon = 2\epsilon$.
And therefore $\epsilon > \frac 12$ which contradicts that $\epsilon$ was arbitrary.
