My Math Forum  

Go Back   My Math Forum > Math Forums > Math

Math General Math Forum - For general math related discussion and news


Thanks Tree7Thanks
Reply
 
LinkBack Thread Tools Display Modes
February 15th, 2019, 02:26 PM   #1
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,310
Thanks: 550

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:
Originally Posted by JeffM1 View Post
I can see that things become more complex if there are multiple points in an interval where the function's derivative is zero, but, for a differentiable function on an interval that includes at least one integer, how can the maximum on the integers not be near an endpoint or a critical point?
Actually, I should have said "endpoint or extremum."

I am open to being in error (again), but I would very much appreciate knowing what the error is.
Thanks from topsquark and idontknow

Last edited by JeffM1; February 15th, 2019 at 02:30 PM.
JeffM1 is offline  
 
February 16th, 2019, 07:00 AM   #2
Senior Member
 
Joined: Aug 2017
From: United Kingdom

Posts: 311
Thanks: 109

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 $[c-1,c+1]$ contains $a$, $b$ or one of $f$'s local maximum points.

Assume $[c-1,c+1]$ does not contain $a$ or $b$ (which implies $[c-1,c+1] \subset [a,b]$) and let $g$ be the restriction of $f$ to $[c-1,c+1]$. Then $g$ is continuous, so attains a (global) maximum on $[c-1,c+1]$ by the extreme value theorem. In fact, $g$ must attain a (global) maximum at some point $x$ in $(c-1,c+1)$. (Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$. But this would imply $f(c-1) = g(c-1) > 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-(c-1)|,|x-(c+1)|\right) > 0$. Then for all $y \in (x-\epsilon,x+\epsilon)$, we have $y \in (c-1,c+1)$ and so $f(y) = g(y) \leq g(x) = f(x)$.
Thanks from topsquark and JeffM1
cjem is offline  
February 16th, 2019, 09:14 AM   #3
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,310
Thanks: 550

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:
Originally Posted by cjem View Post
(Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$. But this would imply $f(c-1) = g(c-1) > g(c) = f(c)$ or $f(c+1) = g(c+1) > g(c) = f(c)$
I am missing this inference unless c is supposed to be the unique maximum on the integers in the interval [a, b]. Again, my academic training was in history so I may be missing some subtlety of analysis.

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.)
Thanks from topsquark

Last edited by JeffM1; February 16th, 2019 at 09:35 AM.
JeffM1 is offline  
February 16th, 2019, 10:32 AM   #4
Senior Member
 
Joined: Aug 2017
From: United Kingdom

Posts: 311
Thanks: 109

Math Focus: Number Theory, Algebraic Geometry
No worries.

Quote:
Originally Posted by JeffM1 View Post
I am missing this inference unless c is supposed to be the unique maximum on the integers in the interval [a, b].
Apologies for the confusion. No, $c$ need not be unique in this respect.

Here I'm showing, by contradiction, that $g$ attains its max in $(c-1,c+1)$. So, assume $g$ does not attain its maximum in $(c-1,c+1)$. (In particular, $g$ does not take its max at $c \in (c-1,c+1)$.) Then, as $g$ does attain a maximum, it must therefore attain it at $c-1$ or $c+1$ (as these are the only other points in its domain). Hence $g(c-1) > g(c)$ or $g(c+1) > g(c)$, i.e. $f(c-1) > 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$).
cjem is offline  
February 16th, 2019, 11:12 AM   #5
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,310
Thanks: 550

Quote:
Originally Posted by cjem View Post
if $f: [a,b] \to \mathbb{R}$ is continuous and takes its maximum on the integers at $c \in \mathbb{Z}$, then $[c-1,c+1]$ contains $a$, $b$ or one of $f$'s local maximum points.

Assume $[c-1,c+1]$ does not contain $a$ or $b$ (which implies $[c-1,c+1] \subset [a,b]$) and let $g$ be the restriction of $f$ to $[c-1,c+1]$. Then $g$ is continuous, so attains a (global) maximum on $[c-1,c+1]$ by the extreme value theorem. In fact, $g$ must attain a (global) maximum at some point $x$ in $(c-1,c+1)$. (Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$. But this would imply $f(c-1) = g(c-1) > 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$.)
OK. I seem to be extra dense today.

$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.
JeffM1 is offline  
February 16th, 2019, 12:03 PM   #6
Senior Member
 
Joined: Aug 2017
From: United Kingdom

Posts: 311
Thanks: 109

Math Focus: Number Theory, Algebraic Geometry
Quote:
Originally Posted by JeffM1 View Post
OK. I seem to be extra dense today.

$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?
Yes, this is all correct.

Quote:
Originally Posted by JeffM1 View Post
In that case why is it true that

$f(c) > f(c + 1) \text { and } f(c) > f(c - 1).$
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(c-1)$, which contradicts $f(c) \geq f(c+1) \text { and } f(c) \geq f(c-1)$, showing that the assumption is false.)
cjem is offline  
February 16th, 2019, 01:05 PM   #7
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,310
Thanks: 550

Quote:
Originally Posted by cjem View Post
Yes, this is all correct.



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(c-1)$, which contradicts $f(c) \geq f(c+1) \text { and } f(c) \geq f(c-1)$, showing that the assumption is false.)
It is exactly that deduction that I am not seeing.

Quote:
$g$ is continuous,
Yes because f is continuous by hypothesis and g is just f definied on a subinterval. No trouble there at all.

Quote:
so attains a (global) maximum on $[c-1,c+1]$ by the extreme value theorem.
I follow that.

Quote:
In fact, $g$ must attain a (global) maximum at some point $x$ in $(c-1,c+1)$.
This I do not get get. But I am not quite sure what you are saying. g(c) is the global maximum on the integers in [a, b] by hypothesis and so is also the global maximum on the integers in (c - 1, c + 1), and is indeed the only integer in that open interval. But g(c) is not necessarily a maximum with respect to g(x) if we are considering x as a real number in (c - 1, c + 1). Does there need to be even a local maximum, let alone a global maximum, on the open interval (c - 1, c + 1). There are obviously limits on the value of g as x approaches a and b, but g(x) need never attain those limits before reaching the endpoint. Right?


Quote:
(Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$.
Why "only"? This is why I asked if our hypothesis is that c is the unique maximizer in the integers? If it is, then I understand the "only" qualifier. But that was not, I thought, what our hypothesis was.

Quote:
But this would imply $f(c-1) = g(c-1) > 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$.)
But if we say that the definition of a maximizing integer is

$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.
Thanks from idontknow
JeffM1 is offline  
February 16th, 2019, 02:19 PM   #8
Senior Member
 
Joined: Aug 2017
From: United Kingdom

Posts: 311
Thanks: 109

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:
Originally Posted by cjem View Post
so attains a (global) maximum on $[c-1,c+1]$ by the extreme value theorem. In fact, $g$ must attain a (global) maximum at some point $x$ in $(c-1,c+1)$. (Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$. But this would imply $f(c-1) = g(c-1) > 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$.)
with the following:

Quote:
so attains a global maximum at some real point $y$ in $[c-1,c+1]$ by the extreme value theorem. There are now two possibilities:

Case (1): $y \in (c-1,c+1)$
Case (2): $y \in \{c-1,c+1\}$

In case (1), set $x = y$.
In case (2), $y$ happens to be an integer. So, as $c$ is a maximizing integer for $g$, we have $g(c) \geq g(y)$. But $y$ is a global maximum point of $g$ and so we also have $g(y) \geq g(c)$. Hence $g(c) = g(y)$. In this case, set $x = c$.

In each case, $g$ takes achieves its maximum at $x$ and $x \in (c-1,c+1)$.
Aside:

Quote:
Originally Posted by JeffM1 View Post
Does there need to be even a local maximum, let alone a global maximum, on the open interval (c - 1, c + 1).
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 (c-1, c+1)$.
cjem is offline  
February 16th, 2019, 02:19 PM   #9
Senior Member
 
Joined: Aug 2017
From: United Kingdom

Posts: 311
Thanks: 109

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:
Originally Posted by cjem View Post
so attains a (global) maximum on $[c-1,c+1]$ by the extreme value theorem. In fact, $g$ must attain a (global) maximum at some point $x$ in $(c-1,c+1)$. (Indeed, the alternative is that its only maximums are at $c-1$ or $c+1$. But this would imply $f(c-1) = g(c-1) > 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$.)
with the following:

Quote:
so attains a global maximum at some real point $y$ in $[c-1,c+1]$ by the extreme value theorem. There are now two possibilities:

Case (1): $y \in (c-1,c+1)$
Case (2): $y \in \{c-1,c+1\}$

In case (1), set $x = y$.
In case (2), $y$ happens to be an integer. So, as $c$ is a maximizing integer for $g$, we have $g(c) \geq g(y)$. But $y$ is a global maximum point of $g$ and so we also have $g(y) \geq g(c)$. Hence $g(c) = g(y)$. In this case, set $x = c$.

In each case, $g$ attains its maximum at $x$ and $x \in (c-1,c+1)$.
Aside:

Quote:
Originally Posted by JeffM1 View Post
Does there need to be even a local maximum, let alone a global maximum, on the open interval (c - 1, c + 1).
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 (c-1, c+1)$.
cjem is offline  
February 16th, 2019, 05:26 PM   #10
Senior Member
 
Joined: Dec 2015
From: iPhone

Posts: 442
Thanks: 68

Quote:
Originally Posted by cjem View Post
$\epsilon = \frac{1}{2} \operatorname{min}\left(|x-(c-1)|,|x-(c+1)|\right) > 0$. Then for all $y \in (x-\epsilon,x+\epsilon)$, we have $y \in (c-1,c+1)$ and so $f(y) = g(y) \leq g(x) = f(x)$.
I think this proves it .
idontknow is offline  
Reply

  My Math Forum > Math Forums > Math

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





Copyright © 2019 My Math Forum. All rights reserved.