Finding the ratio of the volumes of a cube and a sphere

Karol
Messages
1,380
Reaction score
22

Homework Statement


Capture.JPG


Homework Equations


Volue of a sphere: ##~\displaystyle V=\frac{4}{3}\pi r^3##
Area of a sphere: ##~\displaystyle A=4\pi r^2##
Minimum/Maximum occurs when the first derivative=0

The Attempt at a Solution


The fixed area is k, the edge is a:
$$6a+4\pi r^2=k~\rightarrow~a=\frac{k-4\pi r^2}{6}$$
$$V=a^3+\frac{4}{4}\pi r^3=\left[ \frac{k-4\pi r^2}{6} \right]^3+\frac{4}{4}\pi r^3$$
$$V'=\frac{3}{216}(k-4\pi r^2)^2(-8)\pi r+4\pi r^2$$
$$V'=0:~~4\pi r-\frac{8}{72}(k-4\pi r^2)^2\pi=0~\rightarrow~r=\frac{3k-2}{12\pi}$$
$$\frac{a}{r}=\frac{(k-4\pi r^2)12\pi}{6(3k-2)}=\frac{\pi(k-4\pi r^2}{3k-2}$$
The k doesn't cancel
 

Attachments

  • Capture.JPG
    Capture.JPG
    13.2 KB · Views: 1,180
Physics news on Phys.org
Karol said:
The fixed area is k, the edge is a:
$$6a+4\pi r^2=k~\rightarrow~a=\frac{k-4\pi r^2}{6}$$
This is dimensionally inconsistent.

To be honest, many of your errors in all of your similar threads could be avoided if you:
  • Were more careful in your arithmetic.
  • Were more careful in the construction of your basic expressions.
  • Checked your expressions for dimensional consistency.
 
Moderator's note: Thread title adjusted to be more descriptive and less generic.

@Karol, please avoid choosing thread titles that are (a) too generic, and (b) too similar to the titles of previous threads.
 
Karol said:
The k doesn't cancel

That's because your formulas for both total area and total volume are wrong. As @Orodruin says, you need to check your work more carefully.
 
Karol said:

Homework Statement


View attachment 222596

Homework Equations


Volue of a sphere: ##~\displaystyle V=\frac{4}{3}\pi r^3##
Area of a sphere: ##~\displaystyle A=4\pi r^2##
Minimum/Maximum occurs when the first derivative=0

The Attempt at a Solution


The fixed area is k, the edge is a:
$$6a+4\pi r^2=k~\rightarrow~a=\frac{k-4\pi r^2}{6}$$
$$V=a^3+\frac{4}{4}\pi r^3=\left[ \frac{k-4\pi r^2}{6} \right]^3+\frac{4}{4}\pi r^3$$
$$V'=\frac{3}{216}(k-4\pi r^2)^2(-8)\pi r+4\pi r^2$$
$$V'=0:~~4\pi r-\frac{8}{72}(k-4\pi r^2)^2\pi=0~\rightarrow~r=\frac{3k-2}{12\pi}$$
$$\frac{a}{r}=\frac{(k-4\pi r^2)12\pi}{6(3k-2)}=\frac{\pi(k-4\pi r^2}{3k-2}$$
The k doesn't cancel

Since when has the area of a cube of side-length ##a## become ##6 a##? Shouldn't the ##a## be squared?

Or, you could let the area of one face be ##a##, but then the side would be ##\sqrt{a}##.

I have told you many times before in numerous other threads: you need to be more careful. You will NEVER succeed if you persist in continually making such elementary errors.
 
So Ray put it more straight up than I did, but the idea is the same. You keep making errors that you should easily be able to catch if you checked your work. This makes it appear as if you have speeded through the problem rather sloppily, predictably made a mistake that you do not want to spend time on finding, and posted it all here for us to troubleshoot. An important part of learning all of this is checking your own work and finding mistakes. By not doing so you are just hurting your own learning and wearing out helpers so that they become less likely to help you once you really run into trouble.
 
Correct. i will try to check before i post.
$$6a^2+4\pi r^2=k~\rightarrow~a=\sqrt{\frac{k-4\pi r^2}{6}}$$
$$V=a^3+\frac{4}{3}\pi r^3=\left[ \frac{k-4\pi r^2}{6} \right]^{3/2}+\frac{4}{3}\pi r^3$$
$$V'=\frac{3}{2}\left[ \frac{k}{6}-\frac{2\pi}{3}r^2 \right]^{1/2}\left( -\frac{4\pi}{3} \right)r+4\pi r^2$$
$$V'=0:~~r=\frac{1}{2}\left[ \frac{k}{6}-\frac{2\pi}{3}r^2 \right]^{1/2}~\rightarrow~r=\sqrt{\frac{k}{6+\pi}}$$
The edge a contains r so the ratio r/a isn't correct
 
Karol said:
The edge a contains r so the ratio r/a isn't correct
Again, you have not thought this through.
 
$$a=\sqrt{\frac{k-4\pi r^2}{6}}=\sqrt{\frac{k-4\pi\frac{k}{6+\pi}}{6}}=\sqrt{\frac{(2-\pi)k}{2(6+\pi)}}$$
$$\frac{r}{a}=\sqrt{\frac{2-\pi}{2}}$$
Wrong, and i can't distinguish between maximum and minimum.
The answers:
Capture.JPG
 

Attachments

  • Capture.JPG
    Capture.JPG
    1.9 KB · Views: 1,015
  • #10
Because somewhere you have made an arithmetic error. Just plotting your volume function for some k, you could conclude that the minimum is not where you found it.
 
  • #11
Karol said:
$$a=\sqrt{\frac{k-4\pi r^2}{6}}=\sqrt{\frac{k-4\pi\frac{k}{6+\pi}}{6}}=\sqrt{\frac{(2-\pi)k}{2(6+\pi)}}$$
$$\frac{r}{a}=\sqrt{\frac{2-\pi}{2}}$$
Wrong, and i can't distinguish between maximum and minimum.
The answers:
View attachment 222610

You can use a second-derivative test to distinguish between a (local) max vs. min. However, you should definitely avoid trying that until you have solved the first-order problem correctly.

Also: you need worry about the fact that your ##r## is restricted to a finite interval, so the derivative might not vanish at a global max or min.
 
  • #12
Regarding the first-order problem, I'm not sure that finding expressions as a function of ##r## and taking their derivatives is actually what is needed. The real question is where the maximum and minimum of the total volume are as a function of the ratio of the edge of the cube to the diameter of the sphere. If we call that ratio ##\rho##, then it seems to me that what is needed is an expression for the total volume as a function of ##\rho##.
 
  • #13
Also, based on how many of this type of problems you have been looking at, you should consider learning the method of Lagrange multipliers.
 
  • #14
PeterDonis said:
Regarding the first-order problem, I'm not sure that finding expressions as a function of ##r## and taking their derivatives is actually what is needed. The real question is where the maximum and minimum of the total volume are as a function of the ratio of the edge of the cube to the diameter of the sphere. If we call that ratio ##\rho##, then it seems to me that what is needed is an expression for the total volume as a function of ##\rho##.
That will not work; somehow the constant value of total area needs to come into the expressio.
 
  • #15
Ray Vickson said:
somehow the constant value of total area needs to come into the expressio

It does. You start out with two quantities that could potentially vary, the ratio ##\rho## and the diameter ##D## of the sphere. You use the area equation to eliminate ##D## by finding an expression for it in terms of ##\rho## and the constant total area; that basically eliminates one degree of freedom in the problem by imposing a constraint. Then you can derive an equation for the total volume as a function of ##\rho## and the total area; ##\rho## is then the only variable.
 
  • #16
PeterDonis said:
It does. You start out with two quantities that could potentially vary, the ratio ##\rho## and the diameter ##D## of the sphere. You use the area equation to eliminate ##D## by finding an expression for it in terms of ##\rho## and the constant total area; that basically eliminates one degree of freedom in the problem by imposing a constraint. Then you can derive an equation for the total volume as a function of ##\rho## and the total area; ##\rho## is then the only variable.
But this is just a change of variables relative to what the OP has attempted.
 
  • #17
Orodruin said:
this is just a change of variables relative to what the OP has attempted

Yes, agreed. I'm just wondering if it might be easier to "read off" the behavior if everything is expressed as a function of ##\rho##.
 
  • #18
Does anyone except me find it surprising that the minimum occurs when the cube edge equals the diameter of the sphere?
 
  • Like
Likes vela
  • #19
$$V'=\frac{3}{2}\left[ \frac{k}{6}-\frac{2\pi}{3}r^2 \right]^{1/2}\left( -\frac{4\pi}{3} \right)r+4\pi r^2=4\pi\left[ r^2-\frac{1}{2}\left( \frac{k-4\pi r^2}{6}\right)^{1/2}\right]$$
$$V'=0:~~r=\frac{1}{2}\left[ \frac{k}{6}-\frac{2\pi}{3}r^2 \right]^{1/2}~\rightarrow~r=\sqrt{\frac{k}{4(6+\pi)}}$$
$$2r=\sqrt{\frac{4k}{4(6+\pi)}}=\sqrt{\frac{k}{6+\pi}}$$
$$a=\sqrt{\frac{k-4\pi r^2}{6}}=\sqrt{\frac{k-4\pi\frac{k}{4(6+\pi)}}{6}}=\sqrt{\frac{k}{6+\pi}}~\rightarrow~\frac{a}{2r}=1$$
The second derivative:
$$V''=4\pi \left[ 2r-\frac{1}{2} \left( \frac{k-4\pi r^2}{6}\right)^{-1/2} \left( -\frac{8\pi}{6} \right) r \right]=4\pi r\left[ 2-\frac{\pi}{3}\left( \frac{k-4\pi r^2}{6}\right)^{-1/2} \right]$$
$$V''\left( \sqrt{\frac{k}{4(6+\pi)}} \right)=4\pi \sqrt{ \frac{k}{4(6+\pi)}} \left[ 2-\frac{\pi}{3}\left( \frac{k-4\pi \frac{k}{4(6+\pi)}}{6} \right)^{-1/2} \right]$$
$$V''=2\pi \sqrt{\frac{k}{4(6+\pi)}} \left[ 2-\frac{\pi}{3} \sqrt{\frac{6+\pi}{k}} \right]$$
The last parentheses depend on k, so how know if V'' is negative or positive?
The ##~\rho=\frac{a}{2r}~## method:
$$\rho=\frac{a}{2r}~\rightarrow~r^2=\frac{a^2}{4\rho ^2},~~a=\sqrt{\frac{k-4\pi r^2}{6}}$$
$$a=\sqrt{\frac{k-4\pi \frac{a^2}{4\rho ^2}}{6}}~\rightarrow~a=\rho\sqrt{\frac{k}{6\rho^2+\pi}}$$
$$r^2=\frac{a^2}{4\rho^2}=\frac{k}{4(6\rho^2+\pi)}$$
$$V=a^3+\frac{4}{3}\pi r^3=\rho^3\left( \frac{k}{4(6\rho^2+\pi} \right)^{3/2}+\frac{4\pi}{3}\left( \frac{k}{4(6\rho^2+\pi} \right)^{3/2}$$
Complicated
 
  • #20
Again you end up with something dimensionally inconsistent. For the last time, check your work for obvious errors!
 
  • #21
my take would be to look for a (quasi) linear representation of the problem. You lose some units interpretability this way so I'm not going to post much right now and I'd suggest Karol complete existing methods.

Hopefully the problem is solved in coming days and I can post over the weekend.
- - - -
A sketch:

Geometrically the approach is quite nice (and I'm wondering if OP is not using pictures enough?). I think this approach is a lot easier to interpret if you work through graphically

The idea is define:

##s_1 := 6a^2 ##
##s_2 := 4\pi r^2##

hence the surface area constraint is linearized:

##s_1 + s_2 = c##

note that ##s_1 \geq 0## and ##s_2 \geq 0## and the problem statement indicates this applies for any ##c \gt 0## so it may be instructive to consider setting ##c := 1## and also consider ##c := \delta##, for some small ##\delta \gt 0##, though these special cases aren't needed per se.

##\text{Total Volume Sum} = f( s_1 ) +g(s_2)##

##f## and ##g## are both differentiable, and strictly convex over positive numbers.

The minimization then follows from either (a) interpretting the respective tangent lines special role as being the best (linear) approximation of our functions ##f## and ##g## over some small neighborhood and/or (b) interpretting the tangent lines as the linear lower bounds of convex functions ##f## and ##g##. The argument via (a) is a bit looser but probably more intuitive, while the argument via (b) is strict.

The maximization is even easier.
 
  • #22
As stated in #13, let me make another pitch for the method of Lagrange multipliers, which solves this problem in about three lines (plus the check of which of the bounding limits is the other extreme) without any need for differentiating square roots.
 
  • Like
Likes vela and SammyS
  • #23
##\rho~## is dimensionless, k[m2] so the units of:
$$\rho^3\left( \frac{k}{4(6\rho^2+\pi} \right)^{3/2}=[m^2]^{3/2}=[m^3]$$
Are of volume
 
  • #24
Karol said:
##\rho~## is dimensionless, k[m2] so the units of:
$$\rho^3\left( \frac{k}{4(6\rho^2+\pi} \right)^{3/2}=[m^2]^{3/2}=[m^3]$$
Are of volume
I am not talking about the part with ##\rho##. Doing that ##\rho## will always be dimensionless and you will lose the possibility to do dimensionsl analysis to check your answers.
 
  • #25
I had a mistake in V':
$$V'=\frac{3}{2}\left[ \frac{k}{6}-\frac{2\pi}{3}r^2 \right]^{1/2}\left( -\frac{4\pi}{3} \right)r+4\pi r^2=4\pi r \left[ r-\frac{1}{2}\left( \frac{k-4\pi r^2}{6}\right)^{1/2}\right]$$
$$V'' = 4\pi\left[ r - \frac{1}{2} \sqrt{ \frac{ k-4 \pi r^2}{6} }+r\left( 1-\frac{\pi r}{3\sqrt{\frac{k-4\pi r^2}{6}}} \right) \right]$$
Now the dimensions of all the parenthesis of V'' are [m], correct.
$$V''\left( r=\frac{1}{2}\sqrt{\frac{k}{6+\pi}} \right)=\frac{\pi(6-\pi)}{3}\sqrt{\frac{k}{6+\pi}}>0$$
So it's a minimum.
$$V(a=0)=4\pi r^2=\frac{\pi}{6+\pi}k$$
$$V(r=0)=a^3=\left( \frac{k}{6} \right)^{3/2}$$
How to know which is bigger? they depend on k.
I don't understand:
StoneTemplePython said:
The minimization then follows from either (a) interpreting the respective tangent lines special role as being the best (linear) approximation of our functions fff and ggg over some small neighborhood and/or (b) interpreting the tangent lines as the linear lower bounds of convex functions ##f## and ##g##. The argument via (a) is a bit looser but probably more intuitive, while the argument via (b) is strict.
 
  • #26
Karol said:
$$V(a=0)=4\pi r^2=\frac{\pi}{6+\pi}k$$
$$V(r=0)=a^3=\left( \frac{k}{6} \right)^{3/2}$$
How to know which is bigger? they depend on k.
I don't understand:
Again a trivial mistake. Double check your results.
 
  • #27
$$V(r=0)=a^3=\left( \frac{k}{6} \right)^{3/2}$$
$$a=0~\rightarrow~4\pi r^2=k~\rightarrow~r^2=\frac{k}{4\pi}$$
$$V(a=0)=\frac{4}{3}\pi r^3=\frac{4}{3}\pi\left( \frac{k}{4\pi} \right)^{3/2}$$
On the a=0 side, ##~\frac{4\pi}{3}>1~## but ##~\frac{k}{4\pi}<\frac{k}{6}##
So how to know which is bigger?
 
  • #28
Just compare the numbers?
 
  • #29
$$V(r=0)=a^3=\left( \frac{k}{6} \right)^{3/2}=0.07\sqrt{k^3}$$
$$V(a=0)=\frac{4}{3}\pi r^3=\frac{4}{3}\pi\left( \frac{k}{4\pi} \right)^{3/2}=0.09\sqrt{k^3}$$
The maximum V is at ratio:
$$V(a=0)>V(r=0)~\rightarrow~\frac{a}{2r}=0$$
StoneTemplePython said:
##s_1 := 6a^2 ##
##s_2 := 4\pi r^2##
hence the surface area constraint is linearized:
##s_1 + s_2 = c##
note that ##s_1 \geq 0## and ##s_2 \geq 0## and the problem statement indicates this applies for any ##c \gt 0## so it may be instructive to consider setting ##c := 1## and also consider ##c := \delta##, for some small ##\delta \gt 0##, though these special cases aren't needed per se.
##\text{Total Volume Sum} = f( s_1 ) +g(s_2)##
##f## and ##g## are both differentiable, and strictly convex over positive numbers.
The minimization then follows from either (a) interpretting the respective tangent lines special role as being the best (linear) approximation of our functions ##f## and ##g## over some small neighborhood and/or (b) interpretting the tangent lines as the linear lower bounds of convex functions ##f## and ##g##. The argument via (a) is a bit looser but probably more intuitive, while the argument via (b) is strict.
The maximization is even easier.
$$V=\frac{r}{3}(s_2)+6a(s_1)$$
Now what?
 
  • #30
Karol said:
$$V=\frac{r}{3}(s_2)+6a(s_1)$$
Now what?

surely what you meant to write instead is:

$$V=\frac{r}{3}(s_2)+\frac{1}{6}a(s_1)$$- - - - -
but in order to make use of units and strict convexity what I actually have in mind is

##f(x) = \big(\frac{x}{6}\big)^\frac{3}{2} = \frac{x^\frac{3}{2}}{6^\frac{3}{2}}##
and
##g(x) = \Big(\frac{x^\frac{3}{2}}{6 \pi^\frac{1}{2}}\Big)##

(confirm that these are correct and give the right volume equations for ##f(s_1) + g(s_2)## )

and remember the problem is that ##s_1 + s_2 = c## where ##c\gt 0## and ##s_1, s_2 \geq 0##
- - - -
To start easy:

For the maximization problem
:

First: show that for any ##x\gt 0##

##f(x) \lt g(x) ##

and confirm that ##g(0) = 0 = f(0)##

Second

Thus, for the maximization problem, for real non-negative numbers -- call them ##s_1##, ##s_2##, we have the below inequality

##f(s_1) + g(s_2) \leq g(s_1) + g(s_2) \leq g(s_1 + s_2) = g(c) = f(0) + g(c)##

The left inequality is immediate because
##f(s_1) \leq g(s_1) ##
and we then add ##g(s_2)## to each side to get ##f(s_1) + g(s_2) \leq g(s_1) + g(s_2)##

The second inequality needs proven: why is it that
##g(s_1) + g(s_2) \leq g(s_1 + s_2)##

After you have that proven, the maximization problem is done -- i.e. the Right Hand Side of the inequality tells you that you get the best possible 'score' when you allocate everything to ##g## which maps to sphere volume.
 
  • #31
I like to tackle this type of problem in two steps.

Step 1: Find a numerical solution. I set the problem up in a spreadsheet and solved it in less than ten minutes. There are two answers, I got one answer exactly and the other answer approximately.

Step 2: Now that you have preliminary answers, start the mathematical solution. The numerical solution can eliminate booby traps, such as trying to find a minimum or maximum by setting a derivative to zero, when the minimum or maximum is an extremum. Also, the process of creating the spreadsheet may help you to create a mathematical approach. And, of course, you have a way to check your results.
 
  • #32
Since the problem has now been solved, let me offer up the Lagrange multiplier solution.

The target function to find the extrema of is ##V(r,x)## given a constraint ##A(r,x) = A_0##. We therefore find the extrema of the Lagrange function ##L(r,x) = V(r,x) - \lambda A(r,x)##. We find that
$$
L(r,x) = \frac{4\pi r^3}{3} + x^3 - \lambda 4\pi r^2 - \lambda 6x^2
\quad \Longrightarrow \quad
L_r = 4\pi r(r - 2\lambda) = 0, \ L_x = 3x(x - 4\lambda) = 0.
$$
It follows directly that an extremum is obtained when ##r = x/2 = 2\lambda##, i.e., when the diameter of the sphere is equal to the cube side. The constant ##\lambda## is fixed through the constraint equation, but we might as well solve for ##x## directly
$$
(\pi + 6)x^2 = A_0 \quad \Longrightarrow \quad x = \sqrt{\frac{A_0}{\pi+6}}.
$$
The volume for the extremum is therefore
$$
V = \frac{x^3}{6} (\pi + 6) = \frac{A_0^{3/2}}{6\sqrt{\pi+6}}.
$$

The boundary values for ##r = 0## and ##x = 0## are easily checked explicitly.
 
  • #33
StoneTemplePython said:
The second inequality needs proven: why is it that
##g(s_1) + g(s_2) \leq g(s_1 + s_2)##
I have to prove that:
$$(6a^2)^{3/2}\leq(4\pi r^2)^{3/2}~\rightarrow~c^d+e^d\leq(c+e)^d$$
I even don't know what 32.5 means, for example. i thought that ##~3^{2.5}=3\cdot 3\cdot 1.5=13.5~## but it's not true
 
  • #34
Karol said:
I have to prove that:
$$(6a^2)^{3/2}\leq(4\pi r^2)^{3/2}~\rightarrow~c^d+e^d\leq(c+e)^d$$
I even don't know what 32.5 means, for example. i thought that ##~3^{2.5}=3\cdot 3\cdot 1.5=13.5~## but it's not true
##3^{1/k}## is the number ##x## such that ##x^k = 3##. Using the exponent laws, you can show that ##3^{2.5} = 3\cdot 3 \cdot 3^{0.5}##. Note that if ##x = 3^{1/2}##, then ##x^2 = 3##. What number has this property?

Edit: Another useful property of exponents is ##x^{k\cdot \ell} = (x^k)^\ell##. Hence, ##3^{3/2} = (3^3)^{1/2}## is the number ##x## such that ##x^2 = 3^3 = 27##.
 
  • Like
Likes StoneTemplePython
  • #35
StoneTemplePython said:
The second inequality needs proven: why is it that
##g(s_1) + g(s_2) \leq g(s_1 + s_2)##
I have to prove that ##~c^d+e^d\leq(c+e)^d~##
Newton's binomial's: ##(a+b)^n=C^0_n a^n+C^1_n a^{n-1}b+...+C^n_n b^n##
$$\rightarrow~a^n+b^n\leq(a+b)^n$$
Because ##~a^n+b^n~## are only part of the binomial.
But in this method you can't find Vmin
 
  • #36
Karol said:
I have to prove that ##~c^d+e^d\leq(c+e)^d~##
Newton's binomial's: ##(a+b)^n=C^0_n a^n+C^1_n a^{n-1}b+...+C^n_n b^n##
$$\rightarrow~a^n+b^n\leq(a+b)^n$$
Because ##~a^n+b^n~## are only part of the binomial.
But in this method you can't find Vmin

note that the inequality holds for real non-negative ##c## and ##e## and for any ##d \geq 1##

Your instincts to expand the binomial are good -- but note that ##d## is not positive integer here. There are some generalizations of binomial expansions with non-integer powers but they're kind of ugly.

I'd suggest just squaring each side and simplifying the algebra. (A fancier approach is to re-write it as ##(c^d+e^d)^\frac{1}{d} \leq c+e## which is true by direct application of Minkowki Inequality, but just squaring each side and simplifying gets you there.)

I'll post the minimization approach a bit later today. Your problem was seemingly Taylor made for Lagrange Multipliers. The approach I'll post doesn't use them (though if you know where to look you can see them lurking nearby) and just uses linearity and convexity. The approach is a touch longer but it has a very nice visual component to it which I think could be very beneficial in understanding why the solution you found is correct.
 
  • #37
Minimization problem

main goal: practice using, drawing, and visualizing tangent lines and how they interact with convexity

What's the typical approach for minimizing a convex function? Setting derivative equal to zero. Suppose you have two functions ##f## and ##g## as in above, and your constraint is a linear combination of them. Why not set the derivative of each of them equal to zero -- which means you could set the derivative of one function equal to the other? (Technical nit -- setting both derivatives equal to zero is too strict a goal here and would lead to violating the constraint, but setting the derivatives equal to each other gives you more flexibility, and as will be shown, ultimately works.) I.e. if we pursue this, we find that there are these optimal points ##s_1^*## and ##s_2^*## given by working through ##f'(s_1) = g'(s_2)##.

At these respective points if you evaluate the derivative, you get a tangent line for each function. The slope of said line is the same (because the derivatives are the same).

So what's the equation of each line (that doesn't necessarily go through the origin)?

These tangent lines at our optimal points are now completely determined and have very familiar formulas of

##A_f^*(x) = mx + b_f##
##A_g^*(x) = mx + b_g##

(i.e. they are technically affine because in general the lines don't go through the origin -- draw a picture to confirm!)

Again, the slopes of these tangent lines are equal -- both are equal to some fixed value of ##m## which you can calculate. We can now, with some care, harness linearity:

##A_f^*(s_1) + A_g^*(s_2) = \big(ms_1 + b_f\big) + \big(m s_2 + b_g\big) = m(s_1 + s_2) + b_f + b_g = m(c) + b_f + b_g ##

which is valid, and constant, for any legal choice of ##s_1## and ##s_2##
- - - -
The magic is that since ##f## and ##g## are differentiable convex functions over positive numbers, we know that the tangent lines are linear lower bounds of the function elsewhere. This is a very nice property for convex functions. (Note that if the functions were not differentiable, but were convex, we'd still have linear lower bounds, they just wouldn't be tangent lines per se.)

I.e. at any and every point on the function, the given tangent lines go through the point of tangency, and *everything* else given by the function (over our domain) is above the tangent line -- if you're not familiar with this, I strongly recommend drawing the picture here for things like ##y = x^2## and ##y= e^x## and sketching a few tangent lines -- the visualization is very helpful. (Technical nit: the above is the story for strict convexity, for non-strict convexity I should adjust the wording slightly to say that tangent line goes through the point of tangency, and nothing else on the function is below tangent line)

- - - -
How do I know that ##s_1^*## and ##s_2^*## in fact give a minimum for our problem? Well consider the following, for a contradiction:

Suppose there is a better solution than the one we've found and this better solution is given by ##\bar{s_1}, \bar{s_2}##, where as always both are real non-negative, and ##\bar{s_1} + \bar{s_2} = c##, but ##\bar{s_1} \neq s_1^*## and ##\bar{s_2} \neq s_2^*##, then if we examine the tangent line as a lower bound, we see:

##f(\bar{s_1}) \geq A_f^*(\bar{s_1})##

and also

##g(\bar{s_2}) \geq A_g^*(\bar{s_2})##

because of the linear lower bound property of tangent lines of convex functions. But, if we put everything together:

##f(\bar{s_1}) + g(\bar{s_2}) \geq A_f^*(\bar{s_1}) + g(\bar{s_2}) \geq A_f^*(\bar{s_1}) + A_g^*(\bar{s_2}) = A_f^*(s_1^*) + A_g^*(s_2^*) = f(s_1^*) + g(s_2^*)##

which contradicts the fact that we've found a better solution.

(please sketch this out for a very immediate, visual interpretation of these inequalities -- the idea is that tangent line given by ##A_f^*## is equal to the ##f(s_1^*)##, by design, and ##A_g^*## does so at ##g(s_2^*)## but in general these tangent lines are each lower bounds for everything else. If you sketch this out it's a very, very nice result.)

Hence there can be no better solution than that given by using ##s_1^*## and ##s_2^*##. In fact this is strictly the best solution, which we can show by tightening the argument slightly via use of strict convexity, though I don't think it is needed for the exercise. Another nit: framing this as a contradiction isn't technically needed but it feels a lot like an exchange argument, which I like, so I went with it.

This completes the minimization problem. What I was hoping you'd get is some kind of visualization for what's going on in the minimization problem, and I think you'll get it if you sketch out the functions and some relevant tangent lines.
- - - -
The approach here is awfully close to that in Lagrange Multipliers, but I tried to evade partial derivatives and said multiplier in favor of single variable derivatives and tangent lines -- which we can combine via linearity and bound the results because of convexity.

it may be worthwhile to confirm that ##f## and ##g## are (strictly) convex over positive numbers. The easy way in this case is to differentiate each function twice and show the second derivatives are always positive.
 
Last edited:
  • #38
StoneTemplePython said:
I'd suggest just squaring each side and simplifying the algebra.
I have to prove ##~~c^d+e^d\leq(c+e)^d~##:
$$(c^d+e^d)^2=c^{2d}+2c^de^d+e^{2d}=c^{2d}+2(ce)^d+e^{2d}\leq(c+e)^{2d}=(c^2+2ce+e^2)^d$$
I can't simplify no longer on the right side since d isn't a positive integer
 
  • #39
Karol said:
I have to prove ##~~c^d+e^d\leq(c+e)^d~##:
$$(c^d+e^d)^2=c^{2d}+2c^de^d+e^{2d}=c^{2d}+2(ce)^d+e^{2d}\leq(c+e)^{2d}=(c^2+2ce+e^2)^d$$
I can't simplify no longer on the right side since d isn't a positive integer

If you're going to take the square and simplify approach, then it's better to make this less abstract -- in this problem ##d :=\frac{3}{2}## i.e. you are proving

##g(s_1) + g(s_2) = \Big(\frac{s_1^\frac{3}{2}}{6 \pi^\frac{1}{2}}\Big) + \Big(\frac{s_2^\frac{3}{2}}{6 \pi^\frac{1}{2}}\Big) \leq \Big(\frac{(s_1 + s_2)^\frac{3}{2}}{6 \pi^\frac{1}{2}}\Big) = g(s_1 + s_2)##

you can always re-scale by positive numbers without changing the inequality, so this reduces your problem to proving

## s_1^\frac{3}{2} +s_2^\frac{3}{2} \leq (s_1 + s_2)^\frac{3}{2}##
noting that both sides must be positive (so squaring is invertible and preserves ordering)
if you square both sides, you get

## s_1^3 +s_2^3 + 2(s_1 s_2)^\frac{3}{2} \leq (s_1 + s_2)^3 = s_1^3 + 3s_1^2s_2 + 3 s_1 s_2^2 + s_2^3##

which simplifies to
## 2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2##

if either ##s_1 = 0## or ##s_2 =0## then the LHS =0 and the RHS = 0 which verifies the above relationship.

Alternatively they could both be positive, so to finish it off, assuming both ##s_1 \gt 0## and ##s_2 \gt 0##, simplify the relationship and show the final result...
 
  • #40
Karol said:

Homework Statement


View attachment 222596

Homework Equations


Volue of a sphere: ##~\displaystyle V=\frac{4}{3}\pi r^3##
Area of a sphere: ##~\displaystyle A=4\pi r^2##
Minimum/Maximum occurs when the first derivative=0

The Attempt at a Solution


The fixed area is k, the edge is a:
$$6a+4\pi r^2=k~\rightarrow~a=\frac{k-4\pi r^2}{6}$$
$$V=a^3+\frac{4}{4}\pi r^3=\left[ \frac{k-4\pi r^2}{6} \right]^3+\frac{4}{4}\pi r^3$$
$$V'=\frac{3}{216}(k-4\pi r^2)^2(-8)\pi r+4\pi r^2$$
$$V'=0:~~4\pi r-\frac{8}{72}(k-4\pi r^2)^2\pi=0~\rightarrow~r=\frac{3k-2}{12\pi}$$
$$\frac{a}{r}=\frac{(k-4\pi r^2)12\pi}{6(3k-2)}=\frac{\pi(k-4\pi r^2}{3k-2}$$
The k doesn't cancel

Now that the problem has been solved, let me offer a simple alternative solution. You want to solve
$$\begin{array}{cc}
\max / \min & \rm{Vol} = a^3 + \frac{4}{3} \pi r^3 \\
\rm{s.t.} & A = 6 a^2 + 4 \pi r^2 = A_0\\
& a \geq 0, r \geq 0
\end{array}
$$
for some fixed value ##A_0 > 0##. Since the cubic and spherical areas and volumes scale in the same way, we might as well let ##A_0 = 1##, which we now do.

Changing variables to ##x,y##, with ##a = (1/\sqrt{6}) \: x## and ##r = (1/\sqrt{4 \pi}) \: y## gives the constraint as ##x^2+y^2 = 1## and the volume as
$$\rm{Vol} = V(x,y) = \frac{\sqrt{6}}{36} x^3 + \frac{1}{6 \sqrt{\pi}} y^3.$$
Going to polar coordinates ##x = \cos(t), y = \sin(t)## gives the volume as ##{\rm{Vol} }= v(t)##:
$$v(t) = \frac{\sqrt{6}}{36} \cos^3(t) + \frac{1}{6 \sqrt{\pi}} \sin^3(t)$$.
Here is a plot of ##v(t)## for ##0 \leq t \leq \pi/2##:
upload_2018-4-5_9-23-28.png

Finding closed-form expressions for the values of ##t## that set ##dv/dt = 0## is straightforward.
 

Attachments

  • upload_2018-4-5_9-23-28.png
    upload_2018-4-5_9-23-28.png
    1.1 KB · Views: 349
Last edited:
  • #41
Ray Vickson said:
Since the areas and volumes scale in the same way, we might as well let A0=1A0=1A_0 = 1
Just to clarify this, I believe you are saying that the volume of the sphere scales the same way as that of the cube and the same thing for the areas, but it may be misread as saying that the volume and area scale in the same way, which they do not. Either way, I don't see a real point in setting ##A_0 = 1## as it is anyway just a scale that factors out of everything (i.e., set ##a = x\sqrt{A_0/6}## etc. and you still get ##x^2 + y^2 = 1##).
 
  • #42
Orodruin said:
Just to clarify this, I believe you are saying that the volume of the sphere scales the same way as that of the cube and the same thing for the areas, but it may be misread as saying that the volume and area scale in the same way, which they do not. Either way, I don't see a real point in setting ##A_0 = 1## as it is anyway just a scale that factors out of everything (i.e., set ##a = x\sqrt{A_0/6}## etc. and you still get ##x^2 + y^2 = 1##).

I meant that when we replace ##V_0## by ##k V_0## we need only scale both ##a## and ##r## by ##k^{1/3}##, so both areas scale as ##k^{2/3}## and both volumes scale as ##k##. Optimality is preserved.
 
  • #43
StoneTemplePython said:
## s_1^3 +s_2^3 + 2(s_1 s_2)^\frac{3}{2} \leq (s_1 + s_2)^3 = s_1^3 + 3s_1^2s_2 + 3 s_1 s_2^2 + s_2^3##
which simplifies to
## 2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2##
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2=3s_1s_2(s_1+s_2)$$
But ##~(s_1 s_2)^\frac{3}{2}\geqslant s_1 s_2##
$$s_1 s_2\leq(s_1 s_2)^\frac{3}{2} \leq \frac{3}{2}s_1s_2(s_1+s_2)$$
$$1\leq\frac{3}{2}(s_1+s_2)$$
If s1 and s2 > 1 it is shurley true. it might be true in some cases if these are <1. do they?
 
  • #44
Karol said:
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2=3s_1s_2(s_1+s_2)$$
But ##~(s_1 s_2)^\frac{3}{2}\geqslant s_1 s_2##
$$s_1 s_2\leq(s_1 s_2)^\frac{3}{2} \leq \frac{3}{2}s_1s_2(s_1+s_2)$$
$$1\leq\frac{3}{2}(s_1+s_2)$$
If s1 and s2 > 1 it is shurley true. it might be true in some cases if these are <1. do they?

Try another approach. When you look at

##2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2##

Notice that everything is positive on each side so you can always divide out the positive items without changing the inequality.

What happens if you divide each side by ##2(s_1 s_2)^\frac{3}{2}##? Note you can verify that resulting inequality by inspection, but a more slick approach is to lower bound the resulting right hand side via ##GM \leq AM## -- something we've certainly used in these threads before. I think you can get there.

- - - -
edit:
alternatively, consider running with this factorization

Karol said:
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2=3s_1s_2(s_1+s_2)$$

again, we've assumed ##s_1 \gt 0## and ##s_2 \gt 0## so why not divide both sides by ##(s_1 s_2)## which you've isolate on the RHS. This gives you

##2(s_1 s_2)^\frac{1}{2} = 2 GM \leq 2 AM \lt 3(s_1+s_2)##

perhaps you can interpret this and fill in the blank for what the resulting value of 2 times Arithmetic mean is?
 
Last edited:
  • #45
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2~\rightarrow~1\leq\frac{3}{2}\left[ \frac{s_1^2s_2}{\sqrt{(s_1s_2)}}+\frac{s_1s_2^2}{\sqrt{(s_1s_2)}} \right]$$
$$1\leq\frac{3}{2}\left[ \sqrt{\frac{s_1}{s_2}}+\sqrt{\frac{s_2}{s_1}} \right]$$
It resembles ##~\displaystyle \frac{1}{x}+\frac{x}{1}\geq1##
The first ##~GM \leq AM~## method:
$$GM \leq AM~\rightarrow~\frac{s_1^2s_2+s_1s_2^2}{2}\geq\sqrt{(s_1^2s_2)(s_1s_2^2)}=\sqrt{(s_1s_2)^3}=(s_1s_2)^{3/2}$$
$$3s_1^2s_2 + 3 s_1 s_2^2=3(s_1^2s_2+s_1s_2^2)\geq3(s_1s_2)^{3/2}\geq2(s_1s_2)^{3/2}$$
And the second approach:
$$GM \leq AM~\rightarrow~2\sqrt{s_1s_2}\leq2\frac{s_1+s_2}{2}=s_1+s_2\leq2(s_1s_2)\leq3(s_1s_2)$$
Which makes true:
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2=3s_1s_2(s_1+s_2)\rightarrow~
2(s_1 s_2)^\frac{1}{2}\leq3(s_1s_2)$$
 
Last edited:
  • #46
Karol said:
$$2(s_1 s_2)^\frac{3}{2} \leq 3s_1^2s_2 + 3 s_1 s_2^2~\rightarrow~1\leq\frac{3}{2}\left[ \frac{s_1^2s_2}{\sqrt{(s_1s_2)}}+\frac{s_1s_2^2}{\sqrt{(s_1s_2)}} \right]$$

The right hand side isn't right, but maybe that's a typo? If you're going to show it this way the RHS should say

##\frac{3}{2}\left[ \frac{s_1^2s_2}{s_1 s_2 \sqrt{(s_1s_2)}}+\frac{s_1s_2^2}{s_1 s_2 \sqrt{(s_1s_2)}} \right]##

Your very next line is correct.

Karol said:
$$1\leq\frac{3}{2}\left[ \sqrt{\frac{s_1}{s_2}}+\sqrt{\frac{s_2}{s_1}} \right]$$
It resembles ##~\displaystyle \frac{1}{x}+\frac{x}{1}\geq1##

Yes. And that is what you can verify by inspection if you wanted -- i.e. if ##0 \lt x \lt 1##, then you have the first term greater than 1 and second term is positive, so sum is ##\gt 1##. If ##1 \leq x## then second term is at least one, and first term is positive so the sum is again ##\gt 1##. From there, of course, you multiply by 1.5 -- the product of any number ##\gt 1## and ##1.5## must be ##\gt 1##.

From ##GM \leq AM## standpoint, it resembles

##\frac{1}{2}\big(\frac{1}{x}+\frac{x}{1}\big) \geq 1##

because by ##GM \leq AM##, you have

##\frac{1}{2}\big(\frac{1}{x}+\frac{x}{1}\big) \geq \big(\frac{x}{1}\frac{1}{x}\big)^\frac{1}{2} = \big(1 \big)^\frac{1}{2} = 1##

now all you need to do is note that -- again since everything is positive --

##3\Big(\frac{1}{2}\big(\frac{1}{x}+\frac{x}{1}\big)\Big) \gt \frac{1}{2}\big(\frac{1}{x}+\frac{x}{1}\big) \geq 1##

and define ##x:= \sqrt{\frac{s_1}{s_2}}## and you are done.
- - - - -

Karol said:
The first ##~GM \leq AM~## method:
$$GM \leq AM~\rightarrow~\frac{s_1^2s_2+s_1s_2^2}{2}\geq\sqrt{(s_1^2s_2)(s_1s_2^2)}=\sqrt{(s_1s_2)^3}=(s_1s_2)^{3/2}$$

Yes.

Karol said:
$$3s_1^2s_2 + 3 s_1 s_2^2=3(s_1^2s_2+s_1s_2^2)\geq 3(s_1s_2)^{3/2}\geq2(s_1s_2)^{3/2}$$

Maybe you are skipping steps here? What happened to the ##\frac{1}{2}## on the LHS and how does the 3 flow though? If it were me, I'd be very deliberate and take the conclusion from your prior statement, i.e. that

##\frac{s_1^2s_2+s_1s_2^2}{2}\geq (s_1s_2)^{3/2}##

then step 1: multiply each side by 2

##s_1^2s_2+s_1s_2^2 \geq 2(s_1s_2)^{3/2}##

step 2: note that 3 of some positive number is bigger than that positive number, i.e.

##3(s_1^2s_2+s_1s_2^2) \gt s_1^2s_2+s_1s_2^2 \geq 2(s_1s_2)^{3/2}##

or if you prefer, the slightly looser, but true, statement that

##3(s_1^2s_2+s_1s_2^2) \geq s_1^2s_2+s_1s_2^2 \geq 2(s_1s_2)^{3/2}##

and you are done.

Karol said:
And the second approach:
$$GM \leq AM~\rightarrow~2\sqrt{s_1s_2}\leq2\frac{s_1+s_2}{2}=s_1+s_2\leq2(s_1s_2)\leq3(s_1s_2)$$

yikes -- some careless errors here -- missing plus signs (and I'm not sure what the introduction of ##\leq2(s_1s_2)## on the RHS was for?) This should read as

##GM \leq AM~\rightarrow~2\sqrt{s_1s_2}\leq2\frac{s_1+s_2}{2}=s_1+s_2 \leq3(s_1 + s_2)##which gives us what we want: ##2\sqrt{s_1s_2}\leq 3(s_1 + s_2)##

but yes, once you have the above you simply multiply each side by ##(s_1 s_2)## -- which is positive, and hence doesn't change the inequality-- and you recover

##2(s_1 s_2)^\frac{3}{2} =(s_1 s_2) 2\sqrt{s_1s_2}\leq (s_1 s_2)3(s_1 + s_2) = 3(s_1^2 s_2) + 3(s_1 s_2^2)##

- - - -
it's good practice to play around with inequalities like this. And hopefully you can spot things like

##\frac{1}{x}+\frac{x}{1}\geq1##

lurking amongst things you want to prove in the future. It's a quite nice result.
 
Last edited:
  • #47
StoneTemplePython said:
Thus, for the maximization problem, for real non-negative numbers -- call them ##s_1##, ##s_2##, we have the below inequality

##f(s_1) + g(s_2) \leq g(s_1) + g(s_2) \leq g(s_1 + s_2) = g(c) = f(0) + g(c)##

After you have that proven, the maximization problem is done -- i.e. the Right Hand Side of the inequality tells you that you get the best possible 'score' when you allocate everything to ##g## which maps to sphere volume.
I am not sure i understand. i think i can satisfy with only:
##V_{general}=f(s_1) + g(s_2) \leq g(s_1) + g(s_2)=g(s_1=0)+g(s_2=max)=0+g(s_2=max)##
Since ##s_1+s_2=A_0~## and when ##s_1=0~##, meaning there is no cube, then ##s_2=max~## is only the aphere
 
  • #48
Karol said:
I am not sure i understand. i think i can satisfy with only:
##V_{general}=f(s_1) + g(s_2) \leq g(s_1) + g(s_2)=g(s_1=0)+g(s_2=max)=0+g(s_2=max)##
Since ##s_1+s_2=A_0~## and when ##s_1=0~##, meaning there is no cube, then ##s_2=max~## is only the aphere

Welcome back!

In the interim I discarded my train of thought here... it was something clever with linearity and convexity but I'll have to revert a bit later.
 
  • #49
Karol said:
I am not sure i understand. i think i can satisfy with only:
##V_{general}=f(s_1) + g(s_2) \leq g(s_1) + g(s_2)=g(s_1=0)+g(s_2=max)=0+g(s_2=max)##
Since ##s_1+s_2=A_0~## and when ##s_1=0~##, meaning there is no cube, then ##s_2=max~## is only the aphere

it's coming back to me... the idea is

##V_{general}=f(s_1) + g(s_2) \leq g(s_1) + g(s_2) \leq g(s_1 + s_2) = g(c) = 0 + g(c) = f(0) + g(c)##

where I used some constant ##c \gt 0## but, equivalently, to bridge the notation ##c = A_0 = s_1 + s_2##
- - - -
the key point, though is, do you believe

##g(s_1) + g(s_2) \leq g(s_1 + s_2)##

i.e. it in general is an inequality, not an equality. Why is this true?

- - - -
edit:

for avoidance of doubt, I'd say:

## g(s_1) + g(s_2)\neq g(s_1=0)+g(s_2=max)=0+g(s_2=max)##

for arbitrary legal ##s_1, s_2## on the left hand side. It's possible you meant something else here notationally, but the thing to keep in mind is we want to show, not only that ##g## "beats" ##f## for maximizing, but also that ##g## attains its maximum at ##c## -- that's the purpose of the second inequality

##g(s_1) + g(s_2) \leq g(s_1 + s_2) = g(c)##

to be certain that we have a maximum when we allocate everything ##g(c)##...

maybe it was too much symbol manipulation to get to this final inequality. A different but easy idea is: go back to post 39:

##s_1^\frac{3}{2} +s_2^\frac{3}{2} \leq (s_1 + s_2)^\frac{3}{2} ##

suppose without loss of generality that ##s_1\geq s_2## (This means ##s_1 \gt 0## btw)

now multiply each side by ##\big(\frac{1}{s_1}\big)^\frac{3}{2}## . This should give you

##1 + x^\frac{3}{2}= 1 + \big(\frac{s_2}{s_1}\big)^\frac{3}{2} \leq (1 + \frac{s_2}{s_1})^\frac{3}{2} = (1 + x)^\frac{3}{2} ##

this implies ##0 \leq x \leq 1##. (Why?) You could apply Newton's binomial formula here though I don't think that helps with intuition. Before we did something similar and battered it with ##\text{GM} \leq \text{AM}##.

A better, and succinct finish would be to note

##1 + x^\frac{3}{2} \leq (1+ x) \leq (1 + x)(1 + x)^\frac{1}{2} = (1 + x)^\frac{3}{2} ##

why is that true?
 
Last edited:
  • #50
StoneTemplePython said:
suppose without loss of generality that ##s_1\geq s_2## (Why assume that?)
##1 + x^\frac{3}{2}= 1 + \big(\frac{s_2}{s_1}\big)^\frac{3}{2} \leq (1 + \frac{s_2}{s_1})^\frac{3}{2} = (1 + x)^\frac{3}{2} ##
this implies ##0 \leq x \leq 1##. (Why?)
If we assume ##s_1\geq s_2## then ##0 \leq x \leq 1##, is it the reason?
 
Back
Top