February 15th, 2019, 02:26 PM  #1  
Senior Member Joined: May 2016 From: USA Posts: 1,310 Thanks: 551  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. Last edited by JeffM1; February 15th, 2019 at 02:30 PM.  
February 16th, 2019, 07:00 AM  #2 
Senior Member Joined: Aug 2017 From: United Kingdom Posts: 312 Thanks: 111 Math Focus: Number Theory, Algebraic Geometry 
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)$. 
February 16th, 2019, 09:14 AM  #3  
Senior Member Joined: May 2016 From: USA Posts: 1,310 Thanks: 551 
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.) Last edited by JeffM1; February 16th, 2019 at 09:35 AM.  
February 16th, 2019, 10:32 AM  #4  
Senior Member Joined: Aug 2017 From: United Kingdom Posts: 312 Thanks: 111 Math Focus: Number Theory, Algebraic Geometry 
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$).  
February 16th, 2019, 11:12 AM  #5  
Senior Member Joined: May 2016 From: USA Posts: 1,310 Thanks: 551  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.  
February 16th, 2019, 12:03 PM  #6  
Senior Member Joined: Aug 2017 From: United Kingdom Posts: 312 Thanks: 111 Math Focus: Number Theory, Algebraic Geometry  Quote:
I didn't say this was the case. You're right that these inequalities need not be strict. (What I did was deduce from an assumption that $f(c) < f(c+1) \text { or } f(c) < f(c1)$, which contradicts $f(c) \geq f(c+1) \text { and } f(c) \geq f(c1)$, showing that the assumption is false.)  
February 16th, 2019, 01:05 PM  #7  
Senior Member Joined: May 2016 From: USA Posts: 1,310 Thanks: 551  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.  
February 16th, 2019, 02:19 PM  #8  
Senior Member Joined: Aug 2017 From: United Kingdom Posts: 312 Thanks: 111 Math Focus: Number Theory, Algebraic Geometry 
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:
You're right that a general continuous function need not take any sort of extrema on an open interval. But, in our case, $g$ has some rather heavy restrictions  as the above shows, $g$ does indeed achieve a global maximum at $x \in (c1, c+1)$.  
February 16th, 2019, 02:19 PM  #9  
Senior Member Joined: Aug 2017 From: United Kingdom Posts: 312 Thanks: 111 Math Focus: Number Theory, Algebraic Geometry 
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:
You're right that a general continuous function need not take any sort of extrema on an open interval. But, in our case, $g$ has some rather heavy restrictions  as the above shows, $g$ does indeed achieve a global maximum at $x \in (c1, c+1)$.  
February 16th, 2019, 05:26 PM  #10 
Senior Member Joined: Dec 2015 From: somewhere Posts: 541 Thanks: 82  

Tags 
confused 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Confused with the Three  SarahW  Algebra  1  May 14th, 2013 12:50 PM 
I am a little Confused.  Siedas  Algebra  9  March 10th, 2012 01:29 PM 
Confused  Ballser  Academic Guidance  60  January 14th, 2012 05:23 PM 
Confused  katfisher1208  Algebra  1  April 20th, 2010 06:59 PM 
I am new and confused....  momoftwo  New Users  4  August 19th, 2009 06:15 PM 