If $f(x) \le M$ and $\lim_{x \to a} f(x) = A$, prove that $A \le M$. I am an adult software developer who is trying to do a math reboot. I am working through the exercises in the following book.
Ayres, Frank , Jr. and Elliott Mendelson. 2013. Schaum's Outlines Calculus Sixth Edition (1,105 fully solved problems, 30 problem-solving videos online). New York: McGraw Hill. ISBN 978-0-07-179553-1.
Writing proofs is not yet intuitive for me and I would like to know if my proof for the following problem is complete or if I skipped steps.  I have reviewed the following document about writing proofs.
Cheng, Eugenia. 2004. "How to write proofs: a quick guide." University of Chicago. Last modified October. http://cheng.staff.shef.ac.uk/proofguide/proofguide.pdf.
Chapter 7 Limits, problem 26.
Prove: If $f(x) \le M$ for all $x$ in an open interval containing $a$ and if $\lim_{x \to a} f(x) = A$, then $A \le M$.
(Hint: Assume $A>M$. Choose $\epsilon = \frac{1}{2}(A-M)$ and derive a contradiction.)
My understanding.
The key to this proof is whether or not $A>M$ or $A \le M$.  I do not see how the factor of $\frac{1}{2}$ in the hint helps.
My proof.
Let $f(x) \le M$ for $x \in (a-Q, a+Q)$ where $0 < Q$.
Let $\lim_{x \to a} f(x) = A$. For any $0 < \epsilon$ there exists $0<\delta$ such that $|x-a| < \delta$.
Suppose $\epsilon = A - M$, which implies $M < A$ because $0<\delta$.
$$
|f(x) - A| < \epsilon \\
-\epsilon < f(x) - A < \epsilon \\
-(A - M) < f(x) - A < A - M \\
M - A < f(x) - A < A - M \\
M < f(x) < 2A - M \ \ {\Large \#} \\
$$
By definition $f(x) \le M$, so $\epsilon$ can not possibly have a value that implies $M < A$.  Therefore, $A \le M$. $\square$

When presenting this proof we usually use the factor $\frac{1}{2}$ to make it very clear that $f(x) \geq M + \varepsilon / 2 > M$, and not have to bother with strict inequalities. For instance sometimes in defining the continuity of $f$ at point $a$ you could end your sentence by using a large inequality, those two definitons would be equivalent. It's actually a good exercice to proove it. But then if you use a large inequality to define the continuity at point $a$ you have to use $\varepsilon = (A - M)/2$ in this proof, otherwise your last inequality would be $ M \leq f(x)$ which is not in contradiction with $f(x) \leq M$. I don't know if I made my point clear, but that's reason behind this hint in your book. ;)
Another remark, you should not say $0<Q$ but rather $Q>0$ (easier to read). On this point it might be just a personnal preference though...
