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!

Homework Help: Lagrange Multipliers. Maximizing Area.

  1. Apr 2, 2012 #1
    1. The problem statement, all variables and given/known data
    An open gutter with cross section in the form of a trapezoid with equal base angles is to be made by bending up equal strips along both sides of a long piece of metal 12 inches wide. Find the base angles and the length of the sides for maximum carrying capacity.

    For more clarification the part about bending equal strips of a 12 inch wide sheet means... There are 3 sides to the trapezoid (open top) the 2 sides are equal so then we are left with a varying base.

    2. Relevant equations
    side length = s
    base length = b

    [itex]\nabla[/itex]f = [itex]\lambda[/itex][itex]\nabla[/itex]g(s,b,[itex]\theta[/itex])

    Area of trapezoid = (1/2)(b1 + b2)h

    3. The attempt at a solution
    Ok first I believe this would be a function of three variables; s, b and [itex]\theta[/itex]. This is because each one of those will have a factor on whether it fits the constraint and what the area of the trap to be.

    The constraint will be:
    g(s,b,[itex]\theta[/itex]) = 2*s + b = 12

    Now here's the fun part I believe:
    Area = (1/2)(b1 + b2)h

    if we take a part of the trapezoid thats the triangle and find h in terms of s and [itex]\theta[/itex]:
    h = s*cos([itex]\theta[/itex])

    now we don't care about b2 since this is a top open gutter right and the constraint calls for only 3 sides of the gutter. So here I figured I would still need b2 i just need it in terms of something else.

    b2 = b1 + 2*s*sin([itex]\theta[/itex])

    so we substitute b2 and h into the original Area equation:

    Area = (1/2)(b1+b1+2*s*sin([itex]\theta[/itex])(s*cos)

    now add b1 + b1 = 2b1 and distribute the (1/2) and the s*cos([itex]\theta[/itex]) we end up with:

    Area = s*b1*cos([itex]\theta[/itex]) + s2sin([itex]\theta[/itex])cos([itex]\theta[/itex])

    whew. So now we can use our double angle formula sin(2[itex]\theta[/itex]) = 2sin([itex]\theta[/itex])cos([itex]\theta[/itex])

    Area = s*b1*cos([itex]\theta[/itex]) + (1/2)s2sin(2[itex]\theta[/itex])
    *this is so we can take partials easier and dont have to deal with the product rule*

    Partials of F(s,b,[itex]\theta[/itex]) = Area, then find critical points:
    fs = b1*cos([itex]\theta[/itex]) + s*sin(2[itex]\theta[/itex]) = 0
    if s = 0 then b1 = 0 or [itex]\theta[/itex] = pi/2

    fb1 = s*cos([itex]\theta[/itex]) = 0
    s = 0 or [itex]\theta[/itex] = pi/2

    f[itex]\theta[/itex] = -s*b1*sin([itex]\theta[/itex]) + s2cos(2[itex]\theta[/itex]) = 0
    s = 0

    then I started setting those equal to the g(s,b1,[itex]\theta[/itex]) we have 4 equations 4 unknowns and start solving for various variables and substituting. It got REALLY ugly and then I stopped. Somethings not right... Chances are you haven't even read this far cause you already found a mistake :) which I hope. Cause this is just a ridiculous problem.
    1. The problem statement, all variables and given/known data

    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. Apr 2, 2012 #2


    User Avatar
    Science Advisor

    F=Area+λ(g(s,b,θ)-12), if you want to use Lagrange Multiplier method.

    Alternatively, you can use up constraint early on to say that b=12-2s, and save yourself some trouble.
  4. Apr 2, 2012 #3
    hmm So i have two ways of doing this problem? Using Lagrange's Method and not finding the critical points or using the constraint as a substitution in my equation immediately. Sorry a little hazy on this subject.
  5. Apr 2, 2012 #4


    User Avatar
    Science Advisor

    For Lagrange method, you were doing everything correctly, except you forgot to actually include the Lagrange multiplier. If you are having trouble with Lagrange method and aren't required to use it, substitution is a good way to circumvent it here. Your call.

    By the way, I'm not sure analytic solution exists. Mathematica had no trouble spitting out numerical solution. There are 5 extremes, the one that gives maximum area, is the following.

    {s -> 3.23703, b -> 5.52595, θ -> 0.284924, λ -> 3.10652}

    And that gives area of 18.6391. So once you have the equations, you can check them against these, and see if they work out.

    If you are curious, the other extremes included what is probably a saddle point with a greater angle of the sides, the obvious case of s=0, and the negative area solutions with angle > pi/2, otherwise equivalent to the first two cases.
  6. Apr 2, 2012 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Here is my solution: I let the width be the parameter M instead of 12. The sides have length s each and the base has width b, with b + 2s = M. I measure the angle t up from the horizontal base, so the width at the top is b + 2s*cos(t) and the height is s*sin(t). The cross-sectional area is A = s*sin(t)*[b+s*cos(t)]. We want to maximize A, subject to the constraint that f = b+2s-M = 0. I let u denote the Lagrange multiplier, so L = A + u*g.

    Maple 11 easily get solutions to the equations [itex] L_b=0,\, L_s=0,\, L_t = 0:[/itex]

    S:={b=-2u/sqrt(3), s=-2u/sqrt(3),t=Pi/3}, {b=2u/sqrt(3),s=2u/sqrt(3),t=-Pi/3}

    Substituting these into the equation g=0 gives {s=b=M/3, t = Pi/3} and {s=b=M/3,t=-Pi/3}.

    Alternatively, we can ask Maple for a solution of all 4 equations in the 4 unknowns s,b,t and u. It finds 4 solutions, three of which have either t = 0 or t = Pi (so area = 0); the fourth solution has two branches: the command
    allvalues(sol[4]) produces the two solutions given above.

    You can also develop the solution manually. From [itex]L_b=0 \text{ we get } u = -s \sin(t).[/itex] Putting that into L_s gives [itex] L_s = \sin(t)[2s \cos(t) + b - 2s], [/itex] so either sin(t) = 0 or [itex]b = 2s[1-\cos(t)].[/itex] Choosing the latter in the equation L_t = 0 gives [itex] s^2 [2 \cos(t) - 1] = 0.[/itex] Thus, [itex] t = \pi/3,[/itex] then b = s, and so b = s = M/3 and t = π/3.

  7. Apr 2, 2012 #6
    so I don't have to use Lagrange multipliers. I can use the partials of f and substitute the constraint into each partial and then solve? Either way this seems to be a messy problem by hand with all the trig involved. This is a problem that my professor wants us to solve by hand not getting straight to it by plugging it into the computer. :/

    One question is do you two agree with my area formula for a trapezoid that i derived?
  8. Apr 2, 2012 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Aside from interchanging sin and cos, we are using the same formula; your angle is the complement of mine. BTW: it is better to _not_ use double-angle formulas, etc.: better by far to take derivatives first, then see if trig identities can be used to simplify things. And, of course, you don't need to use Lagrange multipliers, since you can eliminate the constraint by expressing one of the three variables in terms of the other two. However, I do believe you get simpler equations/expressions by keeping the Lagrangian form, but that is primarily a personal preference.

  9. Apr 2, 2012 #8


    User Avatar
    Science Advisor

    And I have a perfect example of it. I entered θ instead of 2θ while typing the area formula into Mathematica, which threw the solution off. After a quick fix, it spits out the same solution that Ray provided.
  10. Apr 3, 2012 #9
    Wow what a problem! Thank you so much for the help you guys! I did it all by hand and it was quite long but I was able to get the same b = s = m/3 = 12/3 = 4 and the base angles to be 120° which is essentially pi/3 because i used sin(θ-90) and cos(θ-90). Thanks again for the help, it was a little hard trying to understand your notations but I finally understood what truly had to be done. This has opened my eyes to some other things I haven't seen before when solving equations like these. :D
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook