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$
 A: Your proof is correct, however quite twisted. You shouldn't say "suppose $\epsilon=A-M $". You better go the other way around. I would suggest to go this way: Suppose to the contrary that $A>M $. So we can choose $\epsilon=A-M $, and since this specific  $\epsilon $ is positive,  we would get (by your calculation) $$f (x)>M $$ for some $x $ in the interval, different than $a $. This is a contradiction, and thus the assumption is wrong. That is, $A\not >M $, so $A\leq M $.
A: First of all, kudos on doing a math reboot.  Learning to write proofs, especially if you're doing it without benefit of a teacher, ain't easy; it takes time, patience, and practice.  I take it as a good sign that you question the helpfulness of the $1\over2$ in the hint. It shows you're thinking for yourself.
The ideas in your proof are basically correct, but the proof itself will benefit from a rewrite, to express the ideas accurately and clearly.  So let me be a bit picky.
There are two key problems with the presentation of ideas. One, after a pair of "let" statements which basically express the given assumptions of the problem, there is the stand-alone sentence "For any $0\lt\epsilon$ there exists $0\lt\delta$ such that $|a-x|\lt\delta$." As is, this sentence doesn't really say much of anything, since the choice $\delta=Q$ works for all $x\in(a-Q,a+Q)$. What's needed here is a continuation of the sentence that connects back to the $\epsilon$:

For any $0\lt\epsilon$ there exists $0\lt\delta$ such that
  $|a-x|\lt\delta$ implies $|f(x)-A|\lt\epsilon$.

That is, some steps in some proofs boil down to simply stating a definition, in this case the definition of limit. Note, however, that even this isn't quite correct.  What the sentence should really say, in order to be fully logically correct, is

For any $0\lt\epsilon$ there exists $0\lt\delta$ such that
  $0\lt|a-x|\lt\delta$ implies $|f(x)-A|\lt\epsilon$.

I'll leave it to you to spot what I added there, and to think about why it's important. (Hint: The word "continuous" is nowhere among the assumptions about the function $f$.)
The second key problem is in the next stand-alone sentence, "Suppose $\epsilon=A-M$, which implies $M\lt A$ because $0\lt\delta$." The logic, as it's expressed here, is all backwards.  There is no $\delta$ until you've chosen an $\epsilon$, and you have to choose an $\epsilon$ that you already know (or suppose) to be positive, not argue that a choice you've made has to be positive simply because you've called it $\epsilon$ and therefore need for it to be positive.  Instead, you want to say something like this:

Suppose $M\lt A$. Then, if we let $\epsilon=A-M$, we have
  $0\lt\epsilon$, in which case there exists $0\lt\delta$ such that
  $$\begin{align}0\lt|x-a|\lt\delta&\implies|f(x)-A|\lt\epsilon\\&\implies|f(x)-A|\lt
 A-M\\ &\implies-(A-M)\lt f(x)-A\lt A-M\\ &\implies etc. \end{align}$$

(Note, I have a stylistic preference for showing explicit implication arrows, rather than simply writing down a list of seemingly disconnected statements.)
I hope this helps.  Again, it takes time, patience and practice to learn how to marshal your thoughts into a good, clean, well written mathematical prose. But it looks to me like you're off to a good start. Keep at it!
A: 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...
