In Spivak's Calculus, one exercise asks whether the following is true:
Let $f$ and $g$ be functions such that $f(x) < g(x)$, for all $x$. Does it follow that $\lim\limits_{x \to a} f(x) < \lim\limits_{x \to > a} g(x)$?
The previous result holds if the signs $<$ get replaced by $\leq$, but it turns out this is not true in general for strict inequality. However I "proved" it was true. Obviously my argument is wrong, but it is not clear to me where lies the mistake, so I am requesting your help to figure it out.
First I envisioned using one neat trick I found in Terence Tao's blog (second paragraph in item 2), namely that to prove a quantity $x$ vanishes one can prove $\lvert x \rvert \leq \epsilon$, for every $\epsilon > 0$.
So my argument goes as follows: let $f$ and $g$ be functions as in the statement above. Then $\lim\limits_{x \to a} f(x) \leq \lim\limits_{x \to a} g(x)$. We show that equality leads to a contradiction.
If $\lim\limits_{x \to a} f(x) = \lim\limits_{x \to a} g(x) = m$ and $\epsilon > 0$, then there are $\delta_1, \delta_2 > 0$ such that
- if $0 < \lvert x-a \rvert < \delta_1$, we have $\lvert f(x) - m \rvert < \cfrac{\epsilon}{2}$;
- if $0 < \lvert x-a \rvert < \delta_2$, we have $\lvert g(x) - m \rvert < \cfrac{\epsilon}{2}$.
Now, if $0 < \lvert x-a \rvert < \delta$, where $\delta$ equals the smallest number between $\delta_1$ and $\delta_2$, then $$\lvert g(x) - f(x) \rvert = \lvert g(x) -m + m - f(x) \rvert \leq \lvert g(x) -m \rvert + \lvert m - f(x) \rvert < \cfrac{\epsilon}{2} + \cfrac{\epsilon}{2} = \epsilon$$.
This implies, by Prof. Tao's trick, that $f(x) = g(x)$; this is impossible since $f(x) < g(x)$ for all $x$, so we conclude $\lim\limits_{x \to a} f(x) < \lim\limits_{x \to a} g(x)$.
Where's the error? Thanks in advance.
You can conclude that whenever $x$ satisfies $0<|x-a|<\delta$, you have $|g(x)-f(x)|<\varepsilon$. This is not enough to establish that $f(x)=g(x)$. In order to conclude that $f(x)=g(x)$, you'd need to know that for $x$ fixed, $|f(x)-g(x)|<\varepsilon$ for every $\varepsilon>0$. But this might not be true - there's no guarantee in general that for a smaller choice of $\varepsilon$ (say $\varepsilon/2$), the same $\delta$ is still small enough so that $|x-a|<\delta\implies|f(x)-g(x)|<\varepsilon/2$. You might need a smaller $\delta$, say $\delta'$, and it might not be the case that $|x-a|<\delta'$ anymore. (In fact, unless $f$ and $g$ are constant in a deleted neighborhood of $a$, this will never be the case.)