Find ratio between dimensions of can w/ largest capacity

Click For Summary

Homework Help Overview

The problem involves maximizing the volume of a cylindrical can made from a fixed amount of sheet metal, using the method of Lagrange multipliers. The objective is to find the ratio between the dimensions of the can that yields the largest capacity.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the formulation of the volume and surface area equations, and the application of Lagrange multipliers. Some express confusion about the necessity of including a bottom for the can, while others suggest simplifying the problem by eliminating variables.

Discussion Status

Several participants are exploring different methods to approach the problem, including the use of derivatives and the implications of constraints. There is acknowledgment of the need to adhere to the problem's requirements regarding the use of Lagrange multipliers, and some participants are questioning the validity of their results and the interpretation of the Hessian matrix.

Contextual Notes

Participants note the fixed amount of sheet metal as a constraint and discuss the implications of this on the dimensions of the can. There is also mention of potential confusion regarding the nature of the problem and the assumptions made about the can's structure.

toforfiltum
Messages
341
Reaction score
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
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   Reactions: toforfiltum
What would you get, if you gave your can a bottom?
 
  • Like
Likes   Reactions: toforfiltum
@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:
 
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   Reactions: toforfiltum
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.
 
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.
 
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##.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 54 ·
2
Replies
54
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K