1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Find ratio between dimensions of can w/ largest capacity

  1. Oct 27, 2016 #1
    1. The problem statement, all variables and given/known data
    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.

    2. Relevant equations


    3. 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.
     
  2. jcsd
  3. Oct 27, 2016 #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)].
     
  4. Oct 27, 2016 #3

    fresh_42

    Staff: Mentor

    What would you get, if you gave your can a bottom?
     
  5. Oct 28, 2016 #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:
     
  6. Oct 28, 2016 #5

    Mark44

    Staff: Mentor

    @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/
     
  7. Oct 28, 2016 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  8. Oct 28, 2016 #7

    Mark44

    Staff: Mentor

    You're right -- it says to use this method in the problem description. I missed that.
     
  9. Oct 28, 2016 #8
  10. Oct 28, 2016 #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?
     
  11. Oct 28, 2016 #10

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.)
     
  12. Oct 29, 2016 #11
    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?
     
  13. Oct 29, 2016 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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: Oct 29, 2016
  14. Oct 31, 2016 #13
    Whew! I can't follow what you wrote, but thanks anyway. I don't even understand why the Lagrangian is ##L=V-uA##
     
  15. Nov 1, 2016 #14

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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##.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Find ratio between dimensions of can w/ largest capacity
  1. Finding largest area (Replies: 3)

Loading...