I am self-teaching calculus using Spivak's book, and it's hard for me to know whether my proofs are correct, if they are different from the proofs that Spivak gives. Could you help me to check whether the following proof is correct?
(This and this questions show proofs to the same problem, but the logic of the proofs is different. The proofs in this question seem to be the most similar to mine, but still I don't see clearly whether the logic there is the same one I am using or not.)
The problem is:
Suppose that $f(x) \le g(x)$ for all x. Prove that $\lim_{x\to a}f(x) \le \lim_{x\to a}g(x)$, provided that these limits exist.
I use the proof by contradiction.
Suppose the limits exist and let
$\lim_{x\to a}f(x) = L$ and $\lim_{x\to a}g(x) = M$.
This means that that for every $\epsilon > 0$ there is a $\delta_1 > 0$ such that
If $ 0 < |x-a| < \delta_1$ then $|f(x)-L| < \epsilon$
and $\delta_2$ such that
if $0 <|x-a| < \delta_2$ then $|g(x) - M| < \epsilon$
We can rewrite the inequalities without the absolute values:
$L - \epsilon < f(x) < L + \epsilon$
$M - \epsilon < g(x) < M + \epsilon$
Now suppose that contrary to what we are trying to prove $L > M$. Then the two inequalities can be collapsed into one:
$M - \epsilon < L - \epsilon < f(x) \le g(x) < M + \epsilon < L + \epsilon$
From this inequality it follows that
$M - \epsilon < f(x) < M + \epsilon$
$L - \epsilon < g(x) < L + \epsilon$
that is
$\lim_{x\to a}f(x) = M$ and $\lim_{x\to a}g(x) = L$. Since in the beginning of the proof we let $\lim_{x\to a}f(x) = L$ and $\lim_{x\to a}g(x) = M$, it follows that $L = M$. This contradicts our assumption that $L > M$, so it must be false.
It might be easier to start with a special case first. Suppose $\phi(x) \ge 0$ for all $x$, and $\lim_{x \to a} \phi(x)$ exists. Then we must have $\lim_{x \to a} \phi(x) \ge 0$.
The proof by contradiction is straightforward, if $L=\lim_{x \to a} \phi(x) < 0$, then there is some $\delta>0$ such that if $\|x-a\| < \delta$, then $\phi(x) < {1 \over 2} L <0$ (remember $L<0$), which is a contradiction. Hence $L \ge 0$.
Now use the fact that subtraction is continuous to deal with the general case by taking $\phi(x) = g(x)-f(x)$. Since $\phi(x) \ge 0$ w\everywhere, we see that $\lim_{x \to a} (g(x)-f(x)) = \lim_{x \to a} g(x) - \lim_{x \to a} f (x) \ge 0$ which is the desired result.