Confused This is an independent thread sparked by a different thread. The problem being discussed on the other thread was Find a and b such that if a and b are positive integers and a + b = 20, then a^2b is maximized. A solution was given based on simple calculus. There was a small hole in the solution. $j = \text {the desired value for } a.$ $a + b = 20 \implies b = 20  a \implies a^2b = 20a^2  a^3.$ $f(a) = 20a^2  a^3 \implies f(a) \text { is everywhere differentiable.}$ $0 < a < \dfrac{40}{3} \implies f'(a) = a(40  3a) > 0.$ $\dfrac{40}{3} < a \implies f'(a) < 0 \implies$ $\therefore j = \left \lfloor \dfrac{40}{3} \right \rfloor = 13 \text { or } \left \lceil \dfrac{40}{3} \right \rceil = 14.$ $j = 13 \implies a = 13 \text { and } b = 7 \implies a^2b = 1183.$ $j = 14 \implies a = 14 \text { and } b = 6 \implies a^2b = 1176.$ $\therefore j = 13,\ a = 13, \text { and } b = 7.$ That was said to be "completely invalid." I don't get why it is invalid (although the need to check both floor and ceiling was admittedly missed in the original answer). Furthermore, the method generalizes (unless, as is quite possible, I am missing something). And the method involves nothing more than basic calculus. As I said in the other thread Quote:
I am open to being in error (again), but I would very much appreciate knowing what the error is. 
Your intuition is correct: if $f: [a,b] \to \mathbb{R}$ is continuous, then it takes its maximum on the integers at $\lfloor x \rfloor$ or $\lceil x \rceil$, where $x$ is a local maximum point of $f$ or an endpoint (i.e. $a$ or $b$). (Recall: to say $x$ is a local maximum point of $f$ means there exists some $\epsilon > 0$ with $(x\epsilon, x+\epsilon) \subseteq [a,b]$ such that $f(y) \leq f(x)$ for all $y \in (x\epsilon,x+\epsilon)$.) However, this is something you must prove rather than assume. I'll prove an equivalent statement (you might like to convince yourself that they are indeed equivalent): if $f: [a,b] \to \mathbb{R}$ is continuous and takes its maximum on the integers at $c \in \mathbb{Z}$, then $[c1,c+1]$ contains $a$, $b$ or one of $f$'s local maximum points. Assume $[c1,c+1]$ does not contain $a$ or $b$ (which implies $[c1,c+1] \subset [a,b]$) and let $g$ be the restriction of $f$ to $[c1,c+1]$. Then $g$ is continuous, so attains a (global) maximum on $[c1,c+1]$ by the extreme value theorem. In fact, $g$ must attain a (global) maximum at some point $x$ in $(c1,c+1)$. (Indeed, the alternative is that its only maximums are at $c1$ or $c+1$. But this would imply $f(c1) = g(c1) > g(c) = f(c)$ or $f(c+1) = g(c+1) > g(c) = f(c)$, which contradicts $f$ taking its maximum on the integers at $c$.) We now claim that $x$ is a local maximum point of $f$. To see this, let $\epsilon = \frac{1}{2} \operatorname{min}\left(x(c1),x(c+1)\right) > 0$. Then for all $y \in (x\epsilon,x+\epsilon)$, we have $y \in (c1,c+1)$ and so $f(y) = g(y) \leq g(x) = f(x)$. 
Thanks cjem. I hated analysis because I found it ugly in the extreme. I dropped the course on the second day and took no other math courses as an undergraduate. (In graduate school, I took some more math that I thought might be useful to me but made the mistake of taking abstract algebra rather than linear algebra). I get your point about proof of course. Given my lack of analysis, it would have been very time consuming: I would have chosen an awkward definition for local maximum by including the interval's endpoints and would have had to find the extreme value theorem on my own. I am with you, however, on your proof except here Quote:
In any case, what I was really trying to elicit in the other thread were some criteria on when, if ever, it is not possible to use calculus for finding integer extrema of differentiable functions. But again, thank you. Not having studied analysis, I have nothing to go on with respect to calculus and real numbers except intuition. I am glad to know that in this case my intuition was correct. You always can use calculus to fund a finite set of potential solutions. (Of course, that may not always be the least time consuming method.) 
No worries. Quote:
Here I'm showing, by contradiction, that $g$ attains its max in $(c1,c+1)$. So, assume $g$ does not attain its maximum in $(c1,c+1)$. (In particular, $g$ does not take its max at $c \in (c1,c+1)$.) Then, as $g$ does attain a maximum, it must therefore attain it at $c1$ or $c+1$ (as these are the only other points in its domain). Hence $g(c1) > g(c)$ or $g(c+1) > g(c)$, i.e. $f(c1) > f(c)$ or $f(c+1) > f(c)$. This is a contradiction (as we're assuming $f(d) \leq f(c)$ for all integers $d$). 
Quote:
$a < c  1 < c < c + 1 < b.$ $c, \ c  1, \ c + 1\in \mathbb Z.$ $\text {By hypothesis, } f(c) \ge f(y) \text { if } y \in \mathbb Z \text { and } a \le y \le b.$ Am I following so far? In that case why is it true that $f(c) > f(c + 1) \text { and } f(c) > f(c  1).$ What happened to the $=$ in $\ge$? Is it because we switched from $[c  1,\ c + 1]$ to $(c  1, \ c + 1).$ In that case, the only integer we are talking about is c. But I am missing why f(c) is necessarily greater than f(c  1) and greater than (c + 1)? We started with a definition based on greater than or equal, didn't we? In any case, thanks for being patient. 
Quote:
Quote:

Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
$i \text { is a maximizing integer of } f \in [a,\ b] \iff$ $i \in \mathbb Z, \ a \le i \le b \text { and } f(i)\ge fy) \text { if } a \le y \le b \text { and } y \in \mathbb Z.$ So let's say that c  1 must be a maximizing integer in [c  1, c + 1]. Then, by definition $f(c  1) = g(c  1) \ge g(c).$ And by hypothesis $g(c) \ge g(c  1).$ In other words, $g(c) = g(c  1).$ But that is not a contradiction so far as I can see. 
Okay, I think I see what's causing the confusion. I shall rephrase my argument slightly to hopefully address the issue. In my original post, replace Quote:
Quote:
Quote:

Okay, I think I see what's causing the confusion. I shall rephrase my argument slightly to hopefully address the issue. In my original post, replace Quote:
Quote:
Quote:

Quote:

All times are GMT 8. The time now is 07:03 AM. 
Copyright © 2019 My Math Forum. All rights reserved.