• Support PF! Buy your school textbooks, materials and every day products Here!

A+b=236, What numbers to get a maximum product ab?

  • Thread starter opus
  • Start date
  • #1
opus
Gold Member
717
131

Homework Statement


Among all the pairs of numbers with a sum of 236, find the product whose pair is maximum.

Homework Equations




The Attempt at a Solution


I got the correct solution to this, but I feel it was a weak way to do it and I'd like to know how to do it more efficiently. For example this way wouldn't work if it were more than two numbers.

Work:

(i) Let x= the first number and Let y= the second number
(x+y) = 236 and xy = maximum product

(ii) Then I used each number as somewhat of a side of a rectangle in that:
1/2Perimeter of Rectangle = x+ y = 236

(iii) I then redefined the rectangle in terms of y. That is,
Width = y and Length = 236-y

(iii) Put into an equation for area, as Area of Rectangle= lw which I held as synonymous to the given question in that:
Maximum Area of Rectangle = (l)(w) ⇒ product of two numbers with a maximum result (a)(b)
1/2Perimeter of Rectangle = l + w ⇒ two numbers whose sum is 236

(iv) Finding a maximum area of a rectangle ⇒ finding a maximum product of two numbers
a(y) = y(236-y)
a(y) = -y^2+236y
a(y) = -(y^2+236y+13924)+13924
a(y) = -(y-18)^2+13924

Maximum value at vertex = (118,13924)

(v) Maximum area of rectangle with sides that add up to 236 would be sides lengths of 118 and 118
So the two numbers whose sum is 236 and sum is maximum would be

x=118 and y=118.

What is a more efficient way to do this problem that doesn't restrict me to two numbers?
 
Last edited:

Answers and Replies

  • #3
56
10
This is shown as pre-calculus homework. Have they given you any exposure to some calculus? (It would streamline things a lot.)
 
  • #4
opus
Gold Member
717
131
No exposure to Calculus. This is for my College Algebra class which is listed as Pre-Calculus.
 
  • #5
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728

Homework Statement


Among all the pairs of numbers with a sum of 236, find the product whose pair is maximum.

Homework Equations




The Attempt at a Solution


I got the correct solution to this, but I feel it was a weak way to do it and I'd like to know how to do it more efficiently. For example this way wouldn't work if it were more than two numbers.

Work:

(i) Let x= the first number and Let y= the second number
(x+y) = 236 and xy = maximum product

(ii) Then I used each number as somewhat of a side of a rectangle in that:
1/2Perimeter of Rectangle = x+ y = 236

(iii) I then redefined the rectangle in terms of y. That is,
Width = y and Length = 236-y

(iii) Put into an equation for area, as Area of Rectangle= lw which I held as synonymous to the given question in that:
Maximum Area of Rectangle = (l)(w) ⇒ product of two numbers with a maximum result (a)(b)
1/2Perimeter of Rectangle = l + w ⇒ two numbers whose sum is 236

(iv) Finding a maximum area of a rectangle ⇒ finding a maximum product of two numbers
a(y) = y(236-y)
a(y) = -y^2+236y
a(y) = -(y^2+236y+13924)+13924
a(y) = -(y-18)^2+13924

Maximum value at vertex = (118,13924)

(v) Maximum area of rectangle with sides that add up to 236 would be sides lengths of 118 and 118
So the two numbers whose sum is 236 and sum is maximum would be

x=118 and y=118.

What is a more efficient way to do this problem that doesn't restrict me to two numbers?
What do you mean? For example, do you want to maximize ##a \times b \times c## subject to ##a+b+c=N## for some known number ##N > 0?## Or, do you want to solve a similar problem for more than three numbers? In any case, the easiest solutions involve concepts from calculus. (The two-number case is special inasmuch as it can be solved algebraically, without calculus, as you have done it. BTW: your way is about as efficient as possible in the two-number case.)
 
  • #6
33,520
5,198
This is shown as pre-calculus homework. Have they given you any exposure to some calculus? (It would streamline things a lot.)
Maybe so, but calculus isn't necessary in this case. If you let y = the product of the two numbers (with one being x and the other being 236 - x), you get y = x(236 - x). The graph of this equation is a parabola that opens downward, so it's easy enough to find the high point (or vertex) without using calculus.
 
  • Like
Likes opus
  • #7
33,520
5,198
What do you mean? For example, do you want to maximize ##a \times b \times c## subject to ##a+b+c=N## for some known number ##N > 0?## Or, do you want to solve a similar problem for more than three numbers?
The problem seems pretty clear to me: maximize the product of two numbers whose sum is 238.
 
  • Like
Likes Math_QED
  • #8
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,153
560
This is ##\text{GM} \leq \text{AM}## territory. No calculus needed.
- - -
note: this generalizes easily to any arbitrary number of positive numbers.
 
  • #9
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
The problem seems pretty clear to me: maximize the product of two numbers whose sum is 238.
I was not responding to his "two-number" problem (except to tell him he was right); rather, I was responding to the very last sentence in his post, where he wanted to know about methods that do not restrict him to two numbers!
 
  • #10
33,520
5,198
I was responding to the very last sentence in his post, where he wanted to know about methods that do not restrict him to two numbers!
I missed that -- sorry!
 
  • #11
20,148
4,218
I really liked your approach of completing the square to obtain ##A=(118)^2-(y-118)^2##. That truly removed all the uncertainty regarding the value of y at the maximum, as well as the maximum area. Kudos.
 
  • Like
Likes opus
  • #12
opus
Gold Member
717
131
What do you mean? For example, do you want to maximize ##a \times b \times c## subject to ##a+b+c=N## for some known number ##N > 0?## Or, do you want to solve a similar problem for more than three numbers? In any case, the easiest solutions involve concepts from calculus. (The two-number case is special inasmuch as it can be solved algebraically, without calculus, as you have done it. BTW: your way is about as efficient as possible in the two-number case.)
I mean how would I solve the same question, but this time with three numbers instead of two. For example, among all the possible combinations of three positive numbers with a sum of 4398, maximize the product of these three numbers. Clearly the method used for two numbers wouldn't work as there aren't three distinct sides to a rectangle.

I really liked your approach of completing the square to obtain ##A=(118)^2-(y-118)^2##. That truly removed all the uncertainty regarding the value of y at the maximum, as well as the maximum area. Kudos.
Thanks! The idea was to get the expression into the form ##y=a\left(x-h\right)^2+k## so I could identify the vertex of the parabola.
 
  • #13
opus
Gold Member
717
131
This is ##\text{GM} \leq \text{AM}## territory. No calculus needed.
- - -
note: this generalizes easily to any arbitrary number of positive numbers.
Could you please explain what you mean?
 
  • #14
opus
Gold Member
717
131
Maybe so, but calculus isn't necessary in this case. If you let y = the product of the two numbers (with one being x and the other being 236 - x), you get y = x(236 - x). The graph of this equation is a parabola that opens downward, so it's easy enough to find the high point (or vertex) without using calculus.
That's the equation I was trying to come up with when I started. Should've thought of it like that- y as the product of two numbers x and (236-x)
 
  • #15
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
I mean how would I solve the same question, but this time with three numbers instead of two. For example, among all the possible combinations of three positive numbers with a sum of 4398, maximize the product of these three numbers. Clearly the method used for two numbers wouldn't work as there aren't three distinct sides to a rectangle.

So, in other words, your answer to my question is YES!

You can actually solve the three-number problem using the form of solution to your two-number problem, and a technique knows as Dynamic programming. It involves no calculus at all! (So, I take back my statement that you need calculus)

For your two-number problem you have found the (positive) solution of ##\max a \times b## for ##a + b =s## (with ##a, b, s > 0##) to be ##a = b = s/2##; that is, to have equal numbers.

Now look at the three-number problem: ##\max a \times b \times c## for ##a+b+c = N## (with ##a,b,c,N > 0##). For any positive value of ##c## that is less than ##N## you can determine the corresponding ##a,b## by solving ##\max a \times b## for ##a + b = N-c##. The solution will be to take ##a = b##. That is true no matter what value of ##0 < c < N## we choose.

In other words, the solution will have ##a = b##. Similarly, the solution will have ##b = c##. Therefore, the solution will have ##a = b = c##, so ##a,b,c = N/3##.





Thanks! The idea was to get the expression into the form ##y=a\left(x-h\right)^2+k## so I could identify the vertex of the parabola.
 
Last edited:
  • Like
Likes opus
  • #16
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,153
560
Could you please explain what you mean?
take a look at these two for starters:
https://www.physicsforums.com/threads/spivaks-calculus-am-gm-inequality-problem.948630/
https://artofproblemsolving.com/wiki/index.php/Arithmetic_Mean-Geometric_Mean_Inequality
- - - -
A geometric mean can be interpreted as a mean but in logspace, or like compound interest, or if you prefer, multiplying n positive numbers and taking the nth root. There are variations on this, but that's the big one.

It's a very flexible inequality for relating sums of positive numbers to products of positive numbers.
- - - -
Ray's suggestion of using Dynamic Programming for the 3 variable case is amusingly close to a Dynamic Programming proof of the inequality ##\text{Geometric Mean} \leq \text{Arithmetic Mean}## as given by Beckenbach and Bellman (of dynamic programming fame) in their book Inequalities.
 
  • Like
Likes opus
  • #17
opus
Gold Member
717
131
Excellent, thank you! So can we say that the closer the numbers a,b are to each other, the higher the product will be? And following this, if they are equal, then any combination of a+b=s will not have a higher product than a=b? And similarly for 3 numbers a+b+c=N?

For example, I noticed when working with the rectangles, that even though they may have the same perimeter, their areas may not be the same.
Take a rectangle of side lengths l=4 and w=6. Then P=20 and A=24.
Now take a rectangle of side lengths l=3 and w=7. Then P=20 and A=21.
They have equal perimeters but unequal areas. In other words, the closer the sides lengths are to each other, the higher the area will be.
 
  • #18
opus
Gold Member
717
131
take a look at these two for starters:
https://www.physicsforums.com/threads/spivaks-calculus-am-gm-inequality-problem.948630/
https://artofproblemsolving.com/wiki/index.php/Arithmetic_Mean-Geometric_Mean_Inequality
- - - -
A geometric mean can be interpreted as a mean but in logspace, or like compound interest, or if you prefer, multiplying n positive numbers and taking the nth root. There are variations on this, but that's the big one.

It's a very flexible inequality for relating sums of positive numbers to products of positive numbers.
- - - -
Ray's suggestion of using Dynamic Programming for the 3 variable case is amusingly close to a Dynamic Programming proof of the inequality ##\text{Geometric Mean} \leq \text{Arithmetic Mean}## as given by Beckenbach and Bellman (of dynamic programming fame) in their book Inequalities.
Thank you! Spending some time looking into these links and trying to work them out.
 
  • #20
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,153
560
Thank you! Spending some time looking into these links and trying to work them out.
so the big idea, is your product, with a given 'sum' constraint is maximized if and only if each term is identical. Put differently, the equality case of ##\text{GM} \leq \text{AM}## or if you prefer

##\text{product value} = \text{GM}^n \leq \text{AM}^n ##

occurs if and only if all terms have the same value.
- - - -

Excellent, thank you! So can we say that the closer the numbers a,b are to each other, the higher the product will be? And following this, if they are equal, then any combination of a+b=s will not have a higher product than a=b? And similarly for 3 numbers a+b+c=N?
The way I'd think about it is for ##n## terms, sums increase as a function of the size of the (positive) numbers involved. Products increase with the size of the numbers involved and decrease with variation between the numbers. Put differently, if you hold the total sum constant (or equivalently, if you hold the arithmetic mean / average value of each term) constant, then the product goes down in size with increases in variation and goes up in size with decreases in variation.

Unfortunately it takes a lot more machinery and work to make that statement precise and then prove it. But if you just want to know the 'best' configuration when maximizing a product where you have a constraint on the size, then you can use

##\text{product } \leq \text{AM}^n ##
and again you have equality if and only if all terms identically match each other
- - - -
a couple other points

1.) it's a worthwhile exercise to try to take ##\text{GM} \leq \text{AM}## and via creative use of bunching, prove that among all boxes with a given surface area, the cube has the largest volume.

2.) There is a shorter, more gentle book by Beckenbach and Bellman called Introduction to Inequalities that you may like.
 
  • #21
mathwonk
Science Advisor
Homework Helper
10,914
1,077
to refine post #11, call one number 118+z and the other one 118-z. then their product is (118)^2 - z^2, which is maximal when z = ?
 
  • Like
Likes PeroK
  • #22
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
to refine post #11, call one number 118+z and the other one 118-z. then their product is (118)^2 - z^2, which is maximal when z = ?
What do YOU think is the answer?
 

Related Threads on A+b=236, What numbers to get a maximum product ab?

  • Last Post
Replies
2
Views
694
  • Last Post
Replies
19
Views
1K
Replies
2
Views
3K
Replies
11
Views
23K
Replies
7
Views
2K
Replies
6
Views
3K
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
5
Views
39K
  • Last Post
2
Replies
29
Views
2K
  • Last Post
Replies
11
Views
5K
Top