# Homework Help: a+b=236, What numbers to get a maximum product ab?

1. Jun 14, 2018

### opus

1. The problem statement, all variables and given/known data
Among all the pairs of numbers with a sum of 236, find the product whose pair is maximum.

2. Relevant equations

3. 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: Jun 14, 2018
2. Jun 14, 2018

### opus

#### Attached Files:

• ###### 20BC569E-CFD9-4B07-8DB1-CA4F78D1AABD.jpeg
File size:
32.6 KB
Views:
23
3. Jun 14, 2018

### SunThief

This is shown as pre-calculus homework. Have they given you any exposure to some calculus? (It would streamline things a lot.)

4. Jun 14, 2018

### opus

No exposure to Calculus. This is for my College Algebra class which is listed as Pre-Calculus.

5. Jun 14, 2018

### Ray Vickson

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. Jun 14, 2018

### Staff: Mentor

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.

7. Jun 14, 2018

### Staff: Mentor

The problem seems pretty clear to me: maximize the product of two numbers whose sum is 238.

8. Jun 14, 2018

### StoneTemplePython

This is $\text{GM} \leq \text{AM}$ territory. No calculus needed.
- - -
note: this generalizes easily to any arbitrary number of positive numbers.

9. Jun 14, 2018

### Ray Vickson

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. Jun 14, 2018

### Staff: Mentor

I missed that -- sorry!

11. Jun 14, 2018

### Staff: Mentor

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.

12. Jun 14, 2018

### opus

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.

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. Jun 14, 2018

### opus

Could you please explain what you mean?

14. Jun 14, 2018

### opus

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. Jun 14, 2018

### Ray Vickson

Last edited: Jun 14, 2018
16. Jun 14, 2018

### StoneTemplePython

take a look at these two for starters:
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.

17. Jun 15, 2018

### opus

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. Jun 15, 2018

### opus

Thank you! Spending some time looking into these links and trying to work them out.

19. Jun 15, 2018

### PeroK

Good, but these guys got there first!

20. Jun 15, 2018

### StoneTemplePython

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.
- - - -

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. Jun 15, 2018

### mathwonk

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 = ?

22. Jun 16, 2018

### Ray Vickson

What do YOU think is the answer?