Basic Math Problem of the Week 1/02/2017

  • Context: Challenge 
  • Thread starter Thread starter PF PotW Robot
  • Start date Start date
Click For Summary
SUMMARY

This discussion revolves around solving the mathematical problem of maximizing the product of two non-negative numbers, ##a## and ##b##, under the constraint ##\sqrt{1-\frac{a^2}{4}}+\sqrt{1-\frac{b^2}{16}}=\frac{3}{2}##. The maximum product, determined using Lagrangian multipliers and verified through spreadsheet calculations, is found to be approximately ##ab=3.5## when ##a=1.322876## and ##b=2.645751##. Various methods, including algebraic manipulation and numerical approximation, were discussed to arrive at this solution.

PREREQUISITES
  • Understanding of Lagrangian multipliers
  • Familiarity with algebraic manipulation and cubic equations
  • Basic knowledge of calculus, particularly derivatives
  • Experience with spreadsheet tools for numerical analysis
NEXT STEPS
  • Explore advanced applications of Lagrangian multipliers in optimization problems
  • Learn about cubic equations and their roots in algebra
  • Study numerical methods such as Newton-Raphson for solving equations
  • Investigate convexity and Jensen's inequality in mathematical analysis
USEFUL FOR

Mathematicians, students studying optimization techniques, and anyone interested in advanced algebraic problem-solving methods.

PF PotW Robot
Here is this week's basic math problem. We also encourage finding different methods to the solution. If one has been found, see if there is another way. Using spoiler tags is optional. Occasionally there will be prizes for extraordinary or clever methods.

Let ##a,\,b## be non-negative numbers with ##\sqrt{1-\frac{a^2}{4}}+\sqrt{1-\frac{b^2}{16}}=\frac{3}{2}##

Find the maximum value of ##ab##

(PotW thanks to our friends at http://www.mathhelpboards.com/)
 
  • Like
Likes   Reactions: QuantumQuest and Charles Link
Physics news on Phys.org
PF PotW Robot said:
Here is this week's basic math problem. We also encourage finding different methods to the solution. If one has been found, see if there is another way. Using spoiler tags is optional. Occasionally there will be prizes for extraordinary or clever methods.

Let ##a,\,b## be non-negative numbers with ##\sqrt{1-\frac{a^2}{4}}+\sqrt{1-\frac{b^2}{16}}=\frac{3}{2}##

Find the maximum value of ##ab##

(PotW thanks to our friends at http://www.mathhelpboards.com/)
A standard calculation using Lagrangian multipliers yielded the result that, at the maximum, ## a=1.20 ## and ## b=2.85 ## (approximately). I found the roots by hand without the benefit of a computer or calculator, so I could be off on the second decimal place. That would make the maximum product ## ab=3.42 ##.
 
I think this is a bit too low.
 
I have a=1.322876, b=2.645751, ab=3.5
That's from Excel Spreadsheet
 
  • Like
Likes   Reactions: Charles Link
.Scott said:
I have a=1.322876, b=2.645751, ab=3.5
That's from Excel Spreadsheet
It looks reasonable. I could easily have been off that much in my hand calculation for ## a ## and ## b ##. Algebraically I had a clumsy (but accurate) expression involving ## a ## and was plugging in different values of ## a ## to make the two sides of the equation approximately equal. ## \\ ## Editing: My expression for ## a ## from the Lagrangian multiplier processing is ## (9-2a^2)(\sqrt{1-\frac{a^2}{4}})+(\frac{9}{2})a^2=12 ##. Yes, I tried @.Scott 's ##a=1.32 ## and it fits it almost perfectly.
 
Last edited:
This is correct (I think), although a bit of an usual way to write it. A bit engineerish :wink:
 
I had my spread sheet set up to handle a guess for A and B then it would compute how far from the that 1.5 value those guesses got you.
From there, it did 6 iterations of an approximate Newton-Raphson (I supplied a guess at the first derivative).
When the 1st derivative was close enough, I would see it close in just a couple of iterations.
Then I took the result from the last iteration and computed the a*b product.

So I would pick an a, adjust my initial b and derivative to get it to close, and note how far my a*b changed.
Once I started getting close, I didn't need to change the derivative or the initial guess any more - just the a.

I agree - very Engineeringish. I am a Software Engineer.

I also notice that a*a = 1.75 and b*b = 7.
 
  • Like
Likes   Reactions: Charles Link
The trick is to find an argument, why ##b=2a## has to hold.
 
  • Like
Likes   Reactions: Charles Link
fresh_42 said:
The trick is to find an argument, why ##b=2a## has to hold.
So ## a=\frac{\sqrt{7}}{2} ## and ## b=\sqrt{7} ##. See my also my edited post 5. I can plug in this value for ## a ## and show it is exact. See post 12 where I took the expression of post 5 and converted to a cubic equation in ## a^2 ##.
 
Last edited:
  • #10
Both roots are strictly monotone on their domains. So the maximum of ##ab## is an extremum of each root (under the given sum). And the maximum of ##ab## given ##a+b=c## leads to ##b=2a##. However, I haven't found a more mathematical way to express this, i.e. why it is allowed to require ##a+b=c## instead of ##f(a)+g(b)=c##. I assume monotony as the key here.
 
  • Like
Likes   Reactions: QuantumQuest
  • #11
My spreadsheet effort led to the following:
a = 1.322875622
ab = 3.49999999999999​
a = 1.322875623 through 1.322875688
ab = 3.5​
a = 1.322875689
ab = 3.49999999999999
 
  • Like
Likes   Reactions: Charles Link
  • #12
See my post 5 at the bottom. The result after some algebra is ## 4a^6+29 a^4-207a^2+252=0 ##. This is a cubic in ## a^2##. Factoring this gives ## (4u-7)(u^2+9u-36)=0 ## where ## u=a^2 ##, and it is evident ## u=a^2=\frac{7}{4} ## is one solution. The corresponding ## b^2=7 ##, with the result that ## ab=\frac{7}{2} ## is the maximum value for the product ## ab ##. ## \\ ## Having @.Scott 's spreadsheet solution was very helpful,( thank you @.Scott ), in solving the for the solution. Without knowing there was an exact solution, I probably would not have had any reason to look for one. :) ## \\ ## Additional item: The quadratic factors to ## (u-3)(u+12)=0 ##. One solution is ##u=3 ##.This means ## a=\sqrt{3} ## should also be a local extremum of some kind. ## \\ ## Editing: For the case of ## a=\sqrt{3} ##, ## b=0 ##, so it is not a maximum.
 
Last edited:
  • #13
Make it symmetric.

A maximum of ab is also a maximum of ab/8=xy where x=a/2 and y=b/4. Now we have the additional condition ##\sqrt{1-x^2}+\sqrt{1-y^2}=\frac 3 2##
It is quite easy to see that xy is maximized when x=y, or ##1-x^2=1-y^2=\frac {9} {16}##, which leads to ##x=y=\frac{\sqrt{7}}{4}## and therefore ##a=\frac{\sqrt{7}}{2}##, ##b=\sqrt{7}##

Edit: Fixed some denominators.
 
Last edited:
  • Like
Likes   Reactions: QuantumQuest, Buzz Bloom, StoneTemplePython and 1 other person
  • #14
mfb said:
Make it symmetric.

A maximum of ab is also a maximum of ab/8=xy where x=a/2 and y=b/4. Now we have the additional condition ##\sqrt{1-x^2}+\sqrt{1-y^2}=\frac 3 2##
It is quite easy to see that xy is maximized when x=y, or ##1-x^2=1-y^2=\frac {9} {16}##, which leads to ##x=y=\frac{\sqrt{7}}{2}## and therefore ##a=\sqrt{7}##, ##b=\frac{\sqrt{7}}{2}##
A very minor correction: ## x=y=\frac{\sqrt{7}}{4} ##, so that ## a=\frac{\sqrt{7}}{2} ##, and ##b=\sqrt{7} ##, but this is incidental. The method is clearly much simpler than applying Lagrangian multipliers to the original equation.
 
  • #15
mfb said:
Make it symmetric.

A maximum of ab is also a maximum of ab/8=xy where x=a/2 and y=b/4. Now we have the additional condition ##\sqrt{1-x^2}+\sqrt{1-y^2}=\frac 3 2##
It is quite easy to see that xy is maximized when x=y, or ##1-x^2=1-y^2=\frac {9} {16}##, which leads to ##x=y=\frac{\sqrt{7}}{2}## and therefore ##a=\sqrt{7}##, ##b=\frac{\sqrt{7}}{2}##

I like this restatement -- it cleans things up nicely.

I'd probably run the argument in full with convexity and ##GM \leq AM## as below.

- - - -

The map ##f(u) = \sqrt{1-u^2}## is strictly negative convex (over real solutions) as confirmed by second derivative test.

Hence we have

##\frac{3}{4} = \frac{1}{2}\sqrt{1-x^2} +\frac{1}{2}\sqrt{1-y^2} = E\big[f(u)\big] \leq f(E\big[u\big]) = \sqrt{\frac{1}{2}(1-x^2) + \frac{1}{2}(1-y^2) } = \sqrt{1-\big(\frac{x^2 + y^2}{2}\big)} ##

with equality iff ##x = y## by strict convexity.

- - - - - -
edit:
To make this coherent it's better to for me to say I'm using the mapping

##f(u)=\sqrt{u}##

not ##f(u) = \sqrt{1-u^2}##

as pointed out by @Charles Link

This function is is still strictly negative convex, and gives us the above inequality.

In the interest of clarity, it should say

"with equality iff ##(1-x^2) = (1-y^2)## by strict negative convexity. This is equivalent to ##x^2 = y^2##. Since our domain is confined to real non-negative ##x, y## this is equivalent to insisting on ##x = y \geq 0##"
- - - - - -

Taking advantage of positivity, square both sides.

##\frac{9}{16} \leq 1-\big(\frac{x^2 + y^2}{2}\big)##

##- \frac{7}{16} \leq -\big(\frac{x^2 + y^2}{2}\big)##

multiply by negative one

## \frac{x^2 + y^2}{2} \leq \frac{7}{16} ##

recognizing that our actual objective function is maximized iff ##xy## is maximized, we see

##xy = \big(x^2y^2\big)^\frac{1}{2} \leq \frac{x^2 + y^2}{2} \leq \frac{7}{16}##

By ##GM \leq AM## and the the above inequality. Our function reaches maximum iff x = y.
 
Last edited:
  • Like
Likes   Reactions: mfb and Charles Link
  • #16
StoneTemplePython said:
I like this restatement -- it cleans things up nicely.

I'd probably run the argument in full with convexity and ##GM \leq AM## as below.

- - - -

The map ##f(u) = \sqrt{1-u^2}## is strictly negative convex (over real solutions) as confirmed by second derivative test.

Hence we have

##\frac{3}{4} = \frac{1}{2}\sqrt{1-x^2} +\frac{1}{2}\sqrt{1-y^2} = E\big[f(u)\big] \leq f(E\big[u\big]) = \sqrt{\frac{1}{2}(1-x^2) + \frac{1}{2}(1-y^2) } = \sqrt{1-\big(\frac{x^2 + y^2}{2}\big)} ##

with equality iff ##x = y## by strict convexity.

taking advantage of positivity, square both sides.

##\frac{9}{16} \leq 1-\big(\frac{x^2 + y^2}{2}\big)##

##- \frac{7}{16} \leq -\big(\frac{x^2 + y^2}{2}\big)##

multiply by negative one

## \frac{x^2 + y^2}{2} \leq \frac{7}{16} ##

recognizing that our actual objective function is maximized iff ##xy## is maximized, we see

##xy = \big(x^2y^2\big)^\frac{1}{2} \leq \frac{x^2 + y^2}{2} \leq \frac{7}{16}##

By ##GM \leq AM## and the the above inequality. Our function reaches maximum iff x = y.
@StoneTemplePython My formal mathematics might be lacking somewhat here, but I have a question or two that might make it easier to follow in detail. If I am not mistaken you are applying Jensen's inequality, and isn't the function for this case ## f(u)=\sqrt{u} ## ? Also, isn't ## x_1=1-x^2 ## and ## x_2=1-y^2 ##, with weights of 1/2 for each? The condition ## x_1=x_2 ## would be equivalent to ## x=y ##. ## \\ ## In any case, I found your solution quite interesting. :)
 
  • Like
Likes   Reactions: StoneTemplePython
  • #17
Charles Link said:
@StoneTemplePython My formal mathematics might be lacking somewhat here, but I have a question or two that might make it easier to follow in detail. If I am not mistaken you are applying Jensen's inequality

Strictly speaking you can call it Jensen's Inequality-- the general statement that

##E\big[f(u)\big] \leq f(E\big[u\big])## is Jensen's Inequality for a negative convex function. However

##f(p u_1 + (1-p)u_2) \leq (p)f(u_1) + (1-p)f(u_2)## for ##p \in [0,1]##

is actually the definition of convexity for ##u_1, u_2## in a suitable domain. For negative convexity, the inequality sign flips to:

##f(p u_1 + (1-p)u_2) \geq (p)f(u_1) + (1-p)f(u_2)## for ##p \in [0,1]##

in our problem, set ##p := \frac{1}{2}##

So either Jensen's Inequality or the definition of negative convexity works when you're just doing an average of two terms.

Charles Link said:
and isn't the function for this case ## f(u)=\sqrt{u} ## ? Also, isn't ## x_1=1-x^2 ## and ## x_2=1-y^2 ##, with weights of 1/2 for each? The condition ## x_1=x_2 ## would be equivalent to ## x=y ##. ## \\ ## In any case, I found your solution quite interesting. :)

actually I was thinking of a few different mappings-- and kind of used a motley crew of them o_O

I like your idea better and will update my post.
 
Last edited:
  • Like
Likes   Reactions: Charles Link
  • #18
It is still interesting that the method of Lagrangian multipliers furnished the same result. (See posts 5,9 and 12 above). To give the some of the details of that solution, the function ## f(x,y, \lambda)=xy+\lambda(\sqrt{1-\frac{x^2}{4}}+\sqrt{1-\frac{y^2}{16}}-\frac{3}{2}) ## is examined for maxima by solving the three equations ## \frac{\partial{f}}{\partial{x}}=0 ##, ## \frac{\partial{f}}{\partial{y}}=0 ##, and ## \frac{\partial{f}}{\partial{\lambda}}=0 ##. ## \\ ## The last equation is simply the constraint equation. (Note ## x=a ##, and ## y=b ##). This results in the equation of post 5 for ## a ##: ## (9-2a^2)\sqrt{1-\frac{a^2}{4}}+(\frac{9}{2})a^2=12 ##. After some algebra, this results in the cubic equation in ## a^2 ## given in post 12 : ## 4a^6+29a^4-207a^2+252=0 ##. This factors as ## (4u-7)(u+12)(u-3)=0 ##, and gives ## u= a^2=\frac{7}{4} ## as the root of interest.
 
Last edited:
  • Like
Likes   Reactions: QuantumQuest and fresh_42
  • #19
edit -- I had a follow up idea that had a fatal bug. Unable to delete posting unfortunately.
 
Last edited:
  • #20
Here is the geometric interpretation of the problem that I was looking for.

Consider Minkowski's Light Cone and the Lorentz Product. It gives something that looks like backward Cauchy Schwarz:

##[\mathbf x, \mathbf x]^\frac{1}{2}[\mathbf y, \mathbf y]^\frac{1}{2}\leq [\mathbf x, \mathbf y]##

this may be proven several ways, including via ##GM \leq AM##. If you go through the proof, you can get a slightly more detailed inequality that:

##\big([\mathbf x, \mathbf x][\mathbf y, \mathbf y]\big)^\frac{1}{2}\leq \frac{1}{2} \big([\mathbf x, \mathbf x] + [\mathbf y, \mathbf y]\big) \leq [\mathbf x, \mathbf y] ##

the inequality is strict except in a special case -- said case for our problem implies that ##x_1 = \frac{a}{2} = \frac{b}{4} = y_1##

- - - -
our original problem constraint can now be written in terms of Lorentz products

##[\mathbf x, \mathbf x]^\frac{1}{2} + [\mathbf y, \mathbf y]^\frac{1}{2} = \sqrt{1-\frac{a^2}{4}}+\sqrt{1-\frac{b^2}{16}}=\frac{3}{2}##

taking advantage of non-negativity, we may square both sides.

##[\mathbf x, \mathbf x] + [\mathbf y, \mathbf y] + 2\big([\mathbf x, \mathbf x][\mathbf y, \mathbf y]\big)^\frac{1}{2} =\frac{9}{4}##

for convenience, divide each side by two and get

##\frac{9}{8} = \frac{1}{2} \Big([\mathbf x, \mathbf x] + [\mathbf y, \mathbf y]\Big) + \Big(\big([\mathbf x, \mathbf x][\mathbf y, \mathbf y]\big)^\frac{1}{2}\Big) \leq \Big([\mathbf x, \mathbf y]\Big) + \Big([\mathbf x, \mathbf y]\Big) = 2[\mathbf x, \mathbf y] ##

dividing by 2 gives us

##\frac{9}{16} \leq [\mathbf x, \mathbf y] = 1 - \big(x_1\big)\big(y_1\big) = 1 - \big(\frac{a}{2}\big)\big(\frac{b}{4}\big) = 1 - \frac{ab}{8} ##

subtract one from each side

##\frac{-7}{16} \leq -\frac{ab}{8}##

multiply each side by ##-8##

##\frac{7}{2} \geq ab##

and again this inequality is strict, unless ## a = \frac{b}{2}##
 
  • Like
Likes   Reactions: Charles Link
  • #21
Are these done with? :frown:
 
  • #22
I will reboot the PotW feature soon! There was a little mishap that I need to fix.
 
  • Like
Likes   Reactions: PetSounds

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K