How to show that there is no condition that can meet two inequalities? Here's an excerpt from Spivak's Calculus, 4th Edition, page 96:

If we consider the function
$$
f(x)= \left\{  \matrix{0, x \text{ irrational} \\
1, x \text{ rational}} \right.
$$
  then, no matter what $a$ is, $f$ does not approach an number $l$ near $a$. In fact, we cannot make $|f(x)-l|<\frac{1}{4}$ no matter how close we bring $x$ to $a$, because in any interval around $a$ there are number $x$ with $f(x)=0$, and also numbers $x$ with $f(x)=1$, so that we would need $|0-l| < \frac{1}{4}$ and also $|1-l| < \frac{1}{4}$.

How do I show that there is no condition that can meet the inequality $|0-l| < \frac{1}{4}$ and also $|1-l| < \frac{1}{4}$ ?
Thank you in advance for any help provided.
 A: Use triangular inequality. Suppose we could find such $l$, then
$$1=|0-1|\le |0-l|+|l-1|<1/4+1/4=1/2,$$
which is impossible.
A: I’ll give you several approaches; all have their uses, though in this case the first seems much the simplest.
For any real numbers $a$ and $b$, $|a-b|$ is the distance between $a$ and $b$. If $|0-\ell|<\frac14$, then the distance between $\ell$ and $0$ is less than $\frac14$. Similarly, if $|1-\ell|<\frac14$, then the distance between $\ell$ and $1$ is less than $\frac14$. If I had such an $\ell$, $0$ and $1$ would be less than $\frac14+\frac14=\frac12$ units apart!
You can think of this in terms of open intervals: if the distance from $0$ to $\ell$ is less than $\frac14$, then $\ell\in\left(-\frac14,\frac14\right)$, and if the distance from $1$ to $\ell$ is also less than $\frac14$, then $\ell\in\left(\frac34,\frac54\right)$. Since these two intervals have empty intersection, this is impossible.
Alternatively, you can use the triangle inequality directly:
$$1=|1-0|=|(1-\ell)+(\ell-0)|\le|1-\ell|+|\ell-0|=|1-\ell|+|\ell-0|<\frac14+\frac14=\frac12\;,$$
which is clearly absurd.
Finally, you can simply translate the absolute value inequalities into pairs of ordinary inequalities: $|a-b|<r$ says exactly the same thing as $-r<a-b<r$, so your hypotheses are that $$-\frac14<0-\ell<\frac14\quad\text{and}\quad-\frac14<1-\ell<\frac14\;.$$ Solve each for $\ell$:
$$-\frac14<\ell<\frac14\quad\text{and}\quad\frac34<\ell<\frac54\;,$$
which again is clearly impossible.
A: When dealing with equations including absolute values, it's often convenient to rewrite them as equations without absolute values.
In your case,
$$|0-l| < \frac{1}{4}$$
gives: 
$$-\frac{1}{4} < l < \frac{1}{4}$$ 
And
$$|1-l| < \frac{1}{4}$$
gives:
$$\frac{3}{4} < l < \frac{5}{4}$$
And now it's easy to spot the contradiction. 
It's easy to sometimes overlook cases when rewriting absolute valued equations, but it's good practice.  
