Find ratio between dimensions of can w/ largest capacity

In summary: But I digress.)In summary, what you are doing isn't wrong, but it isn't complete.In summary, The problem is to determine the ratio between the dimensions of a cylindrical metal can with the largest capacity, given a fixed amount of sheet metal. Using the method of Lagrange multipliers and the objective function V(r,h) = πr^2h and constraint function A(r,h) = 2πrh + πr^2, the ratio can be found by solving for h in terms of r from the constraint equation and then maximizing V(r,h) by using the ordinary derivative. However, to confirm that the dimensions found are indeed those of the largest capacity, further steps such
  • #1
toforfiltum
341
4

Homework Statement


A cylindrical metal can is to be manufactured from a fixed amount of sheet metal. Use the method of Lagrange multipliers to determine the ratio between the dimensions of the can with the largest capacity.

Homework Equations

The Attempt at a Solution


$$V(r,h)=\pi r^2h$$
$$2 \pi rh=k$$
Let $$g(r,h)=2 \pi rh$$
$$\nabla V(r,h)=[2 \pi rh, \pi r^2]$$
$$\nabla g(r,h)=[2 \pi h, 2 \pi r]$$
$$2 \pi rh = c(2 \pi h)$$
$$\pi r^2=c(2 \pi r)$$
$$2 \pi rh=k $$

Now, here I'm stuck. If I eliminate ##c##, I get a nonsensical equation such as ##r= \frac{1}{2}r##.

So, I tried another way. Since ##2 \pi rh=k##, I let ##k- 2 \pi ch##, which after some algebraic manipulation gives me the answer ##h=\frac{k}{\pi r}##

But my answer is wrong. The answer is that the height of cylinder equals its diameter. I don't know how to come to that conclusion.

Is my method wrong?

Thanks.
 
Physics news on Phys.org
  • #2
You need to maximize V(r,h)=π*(r^2)*h, with constant A = 2πrh + πr^2, which is fixed amount of metal sheet. I do not remember the exact steps of Lagrange's method. I will myself solve and then post here. But you can also use those two equations to eliminate one variable say h, which would be simpler to get an expression for V in terms of r and constant A. maximize it to get the value of r and then use equation A to get h and the required ratio [h/(2r)].
 
  • Like
Likes toforfiltum
  • #3
What would you get, if you gave your can a bottom?
 
  • Like
Likes toforfiltum
  • #4
@fresh_42 @Let'sthink Ah, I see now. I didn't think that the can would have a bottom since there is a fixed sheet of metal. I figured that wrapping the sheet around to form a cylinder would leave the bases empty. Thanks so much!:smile:
 
  • #5
Let'sthink said:
You need to maximize V(r,h)=π*(r^2)*h, with constant A = 2πrh + πr^2, which is fixed amount of metal sheet. I do not remember the exact steps of Lagrange's method.
@tofortiltum, since A is a constant, you can solve the second equation above for h in terms of r. From that you can write V(r, h) as a function of r alone, and then find the maximum volume by using the ordinary derivative.

This is almost the same thing I said in this post: https://www.physicsforums.com/threads/determine-the-highest-and-lowest-elevation-on-a-path.891018/
 
  • Like
Likes toforfiltum
  • #6
Mark44 said:
@tofortiltum, since A is a constant, you can solve the second equation above for h in terms of r. From that you can write V(r, h) as a function of r alone, and then find the maximum volume by using the ordinary derivative.

This is almost the same thing I said in this post: https://www.physicsforums.com/threads/determine-the-highest-and-lowest-elevation-on-a-path.891018/
Mark44 said:
@tofortiltum, since A is a constant, you can solve the second equation above for h in terms of r. From that you can write V(r, h) as a function of r alone, and then find the maximum volume by using the ordinary derivative.

This is almost the same thing I said in this post: https://www.physicsforums.com/threads/determine-the-highest-and-lowest-elevation-on-a-path.891018/

I agree: he can do that. But, if his question tells him to use Lagrange multipliers, then that is what he must do.

Besides, Lagrange multipliers play a fundamental role in theory and practice in optimization; for example, many effective numerical optimization methods depend crucially on the ability to compute and update Lagrange multiplier estimates along with solution estimates; this speeds up convergence, and leads to much faster and much more robust algorithms.
 
  • #7
Ray Vickson said:
But, if his question tells him to use Lagrange multipliers, then that is what he must do.
You're right -- it says to use this method in the problem description. I missed that.
 
  • #8
  • #9
Now I have another problem. How do I show that the dimensions I get are those that are of largest capacity? So let me write out my steps again.
$$V(r,h)= \pi r^2h$$
$$A(r,h)= 2 \pi r^2 +2 \pi rh$$
$$\nabla V(r,h)=[2 \pi rh, \pi r^2]$$
$$\nabla A(r,h)=[4 \pi r + 2 \pi h, 2 \pi r]$$
$$2 \pi rh=c(4 \pi r+2 \pi h)$$
$$\pi r^2= c(2 \pi r)$$
$$ 2 \pi r^2+2 \pi rh=k$$

After doing some algebraic manipulation, I did get $$h=2r$$

But when I formed the Hessian matrix for $$H V(r,h)=\begin{bmatrix}
2 \pi h & 2 \pi r \\
2 \pi r & 0
\end{bmatrix}$$, it showed that the point is the saddle point. Am I doing things wrong here?
 
  • #10
toforfiltum said:
Now I have another problem. How do I show that the dimensions I get are those that are of largest capacity? So let me write out my steps again.
$$V(r,h)= \pi r^2h$$
$$A(r,h)= 2 \pi r^2 +2 \pi rh$$
$$\nabla V(r,h)=[2 \pi rh, \pi r^2]$$
$$\nabla A(r,h)=[4 \pi r + 2 \pi h, 2 \pi r]$$
$$2 \pi rh=c(4 \pi r+2 \pi h)$$
$$\pi r^2= c(2 \pi r)$$
$$ 2 \pi r^2+2 \pi rh=k$$

After doing some algebraic manipulation, I did get $$h=2r$$

But when I formed the Hessian matrix for $$H V(r,h)=\begin{bmatrix}
2 \pi h & 2 \pi r \\
2 \pi r & 0
\end{bmatrix}$$, it showed that the point is the saddle point. Am I doing things wrong here?

The second-order optimality tests are more complicated when you have constraints. Basically, the tests are that the Hessian matrix of the Lagrangian (NOT the objective function ##V##), projected onto the subspace of the constraint's tangent plane, should be (i) negative semidefinite---necessary condition for a local maximum; or (ii) negative definite---sufficient condition for a strict local max. Never mind if that sounds like mumbo-jumbo to you; the point is that the test is not what you think it should be.

Even if you use the Lagrange multiplier method to solve the problem, you can look at what the objective ##V## would have become if you had used Mark44's suggestion to solve for h in terms of r from the constraint and so convert the problem to an unconstrained univariate maximization. Standard one-dimensional second-derivative tests apply to that problem. (Perhaps surprisingly, these are equivalent to testing the Hessian of the Lagrangian in the tangent plane of the constraint.)
 
  • #11
Ray Vickson said:
The second-order optimality tests are more complicated when you have constraints. Basically, the tests are that the Hessian matrix of the Lagrangian (NOT the objective function ##V##), projected onto the subspace of the constraint's tangent plane, should be (i) negative semidefinite---necessary condition for a local maximum; or (ii) negative definite---sufficient condition for a strict local max. Never mind if that sounds like mumbo-jumbo to you; the point is that the test is not what you think it should be.

Even if you use the Lagrange multiplier method to solve the problem, you can look at what the objective ##V## would have become if you had used Mark44's suggestion to solve for h in terms of r from the constraint and so convert the problem to an unconstrained univariate maximization. Standard one-dimensional second-derivative tests apply to that problem. (Perhaps surprisingly, these are equivalent to testing the Hessian of the Lagrangian in the tangent plane of the constraint.)
Haha, what you said above was definitely mumbo-jumbo to me. But what do you mean by the tangent plane of the constraint? Is it taking the Hessian of the gradient of the equation of constraint?

So, in the case of this question, I do not need to show that the value I get is indeed largest, is it? I can just assume from instructions of the question?
 
  • #12
toforfiltum said:
Haha, what you said above was definitely mumbo-jumbo to me. But what do you mean by the tangent plane of the constraint? Is it taking the Hessian of the gradient of the equation of constraint?

So, in the case of this question, I do not need to show that the value I get is indeed largest, is it? I can just assume from instructions of the question?

Somehow you need to convince yourself that the value you get is, indeed, the largest possible constrained value. One way would be to show that when you use the constraint to eliminate a variable, the solution you get is the maximum of the resulting one-variable unconstrained problem. Another way is to use the procedure I outlined.

Probably the best way to illustrate the second approach is to go through it in detail from start to finish. Eliminate the factors of ##\pi## (by changing volume and area measurement units) and take Area = 24 to make later writing easier. The problem is to maximize ##V = r^2 h## subject to ##A = 24##, where ##A = 2 r^2 + 2rh##. The Lagrangian is ##L = V - u A## (writing ##u## instead of ##\lambda##), and solving by the usual method gives the solution ##(r,h,u) = (2,4,1)##. The ##(r,h)##-Hessian of the Lagrangian ##L## at the solution is
$$H = \left. \pmatrix{2h - 4u & 2r - 2u\\2r - 2u & 0} \right|_{(r,h,u) = (2,4,1)} = \pmatrix{4 & 2 \\2 & 0 }.$$
The associated quadratic form for ##H## is
$$ Q = \langle \Delta r, \Delta h \rangle H \pmatrix{\Delta r\\\Delta h} = 4 \Delta r^2 + 4 \Delta r \Delta h$$.
The tangent line to the constraint at the point ##(r,h) = (2,4)## is ##16 \Delta r + 4 \Delta h = 0##; that is the line ##(r,h) = (2+\Delta r, 4 + \Delta h)## that is tangent to the constraint curve at the solution.

On the tangent line we have ##\Delta h = - 4 \Delta r##, so on the tangent line we have ##Q = 4 \Delta r^2 + 4 \Delta r (- 4\Delta r) =-12 \Delta r^2##, and that means that the Hessian of ##L## projected onto the tangent line is ##\partial^2 Q/ \partial \Delta r^2 = -24##. Considered as a ##1 \times 1## matrix, this is negative definite, so the point ##(r,h) = (2,4)## is a strict local maximum.

Basically, this calculation means that along the constraint curve we have
$$V(2+\Delta r, 4 + \Delta h) \approx V(2,4) + \frac{1}{2} (-12 \Delta r ^2) = 16 - 6 \Delta r^2,$$
which has a strict local maximum at ##\Delta r = 0##.

Note: what I wrote was not a typo: the constrained value of ##V## is related to the Hessian of the Lagrangian ##L##, not just to the Hessian of ##V## alone.

Note that if we use the area constraint to express ##h## in terms of ##r## we would have ##V = V(r) = 12 r - r^3##, so ##V(2 + \Delta r) \approx 16 - 6 \Delta r^2##. This is exactly what we got by looking at the projected Hessian of the Lagrangian!
 
Last edited:
  • #13
Ray Vickson said:
Somehow you need to convince yourself that the value you get is, indeed, the largest possible constrained value. One way would be to show that when you use the constraint to eliminate a variable, the solution you get is the maximum of the resulting one-variable unconstrained problem. Another way is to use the procedure I outlined.

Probably the best way to illustrate the second approach is to go through it in detail from start to finish. Eliminate the factors of ##\pi## (by changing volume and area measurement units) and take Area = 24 to make later writing easier. The problem is to maximize ##V = r^2 h## subject to ##A = 24##, where ##A = 2 r^2 + 2rh##. The Lagrangian is ##L = V - u A## (writing ##u## instead of ##\lambda##), and solving by the usual method gives the solution ##(r,h,u) = (2,4,1)##. The ##(r,h)##-Hessian of the Lagrangian ##L## at the solution is
$$H = \left. \pmatrix{2h - 4u & 2r - 2u\\2r - 2u & 0} \right|_{(r,h,u) = (2,4,1)} = \pmatrix{4 & 2 \\2 & 0 }.$$
The associated quadratic form for ##H## is
$$ Q = \langle \Delta r, \Delta h \rangle H \pmatrix{\Delta r\\\Delta h} = 4 \Delta r^2 + 4 \Delta r \Delta h$$.
The tangent line to the constraint at the point ##(r,h) = (2,4)## is ##16 \Delta r + 4 \Delta h = 0##; that is the line ##(r,h) = (2+\Delta r, 4 + \Delta h)## that is tangent to the constraint curve at the solution.

On the tangent line we have ##\Delta h = - 4 \Delta r##, so on the tangent line we have ##Q = 4 \Delta r^2 + 4 \Delta r (- 4\Delta r) =-12 \Delta r^2##, and that means that the Hessian of ##L## projected onto the tangent line is ##\partial^2 Q/ \partial \Delta r^2 = -24##. Considered as a ##1 \times 1## matrix, this is negative definite, so the point ##(r,h) = (2,4)## is a strict local maximum.

Basically, this calculation means that along the constraint curve we have
$$V(2+\Delta r, 4 + \Delta h) \approx V(2,4) + \frac{1}{2} (-12 \Delta r ^2) = 16 - 6 \Delta r^2,$$
which has a strict local maximum at ##\Delta r = 0##.

Note: what I wrote was not a typo: the constrained value of ##V## is related to the Hessian of the Lagrangian ##L##, not just to the Hessian of ##V## alone.

Note that if we use the area constraint to express ##h## in terms of ##r## we would have ##V = V(r) = 12 r - r^3##, so ##V(2 + \Delta r) \approx 16 - 6 \Delta r^2##. This is exactly what we got by looking at the projected Hessian of the Lagrangian!
Whew! I can't follow what you wrote, but thanks anyway. I don't even understand why the Lagrangian is ##L=V-uA##
 
  • #14
toforfiltum said:
Whew! I can't follow what you wrote, but thanks anyway. I don't even understand why the Lagrangian is ##L=V-uA##

When you wrote ## 2 \pi rh = c(2 \pi h) ## and ## \pi r^2=c(2 \pi r)## in your post #1 you were essentially setting ##\nabla(V - cA) = 0## (so you called your Lagrange multiplier ##c## instead of my ##u##). The only problem was that you had an incorrect formula for ##A##. Setting ##\nabla(V - cA) = 0## is the same as setting ##\nabla V = c \nabla A##.
 

What does "find ratio between dimensions of can w/ largest capacity" mean?

This means finding the relationship between the dimensions of a can that can hold the largest volume of liquid.

Why is finding the ratio between dimensions important?

Knowing the ratio between dimensions can help determine the most efficient design for a can that can hold the largest volume of liquid. This information can also be useful in manufacturing and packaging processes.

How do I find the ratio between dimensions of a can?

The ratio can be found by dividing the larger dimension by the smaller dimension. For example, if the height of the can is 10cm and the diameter is 5cm, the ratio would be 10/5 or 2.

Can I use any units of measurement to find the ratio?

Yes, as long as the units of measurement are consistent for both dimensions. For example, if the height is measured in centimeters, the diameter should also be measured in centimeters.

Are there any limitations to finding the ratio between dimensions of a can?

Yes, the ratio only represents the relationship between two dimensions and does not take into account other factors such as material thickness or shape, which can also affect the capacity of a can. It is important to consider these factors when designing a can for maximum capacity.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
2
Replies
54
Views
4K
  • Calculus and Beyond Homework Help
Replies
9
Views
751
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
846
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
702
  • Advanced Physics Homework Help
Replies
0
Views
652
Back
Top