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

In summary, Ray's attempt to find an equation that fits the data fails because he makes errors in his arithmetic and dimensional analysis.
  • #1
Karol
1,380
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,089
Physics news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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
 
  • #8
Karol said:
The edge a contains r so the ratio r/a isn't correct
Again, you have not thought this through.
 
  • #9
$$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: 946
  • #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
 

Similar threads

Replies
14
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
216
  • Calculus and Beyond Homework Help
Replies
2
Views
800
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
562
  • Calculus and Beyond Homework Help
Replies
34
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
697
  • Calculus and Beyond Homework Help
Replies
5
Views
357
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
883
Back
Top