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: Optimization With Inequality Constraints: Please Help

  1. Dec 9, 2005 #1
    Hi all, I'm having trouble with the following problem: It was given as a word problem from which to infer the mathematics but basically it is this:

    Maximize: f(x,y,z,t,w)=

    Subject to the constraints:
    0<= .5x+y+3z+3y+2.5w<+30

    the problem is I don't know how to handle constraints like these, where there is an upper and lower bound, and i'm just confused because it seems like there is a lot going on...the only thing i knew how to do to
    1) remark that the max exists because the function is defined on this closed and bounded set 2) compute all of the partials set them equal to zero and find the critical points and hope that I would find the global max and the values at the global max would lie inside the constraints, but this didn't work because when I do this I get the critical point
    (2,3,7/3,10/3,pi) which doesn't satisfy the second constraint.
    I know that when you have a function defined on a closed bounded set to find the local max you find the crit. points and test the values at the boundaries and just compare but i don't know how to obtain bounds on each individual variable from the constraints or what to do. any help would be appreciated
  2. jcsd
  3. Dec 9, 2005 #2
    oh sorry by the way I also know that each variable is >=0 from the context of the problem (each variable represents a serving of food). thank you
  4. Dec 9, 2005 #3


    User Avatar
    Homework Helper

    If you take the first order partials, set them = 0 , and solve the resulting system, you get:

    [tex] x = 2, y = 3, z = \frac{10}{3}, t = \frac{7}{3}, w = \pi [/tex]

    but these values do not fit the first constraint, namely that

    [tex]0\leq \frac{x}{2}+y+3z+3y+\frac{5}{2}w< 30[/tex]

    in fact those values of x,y,z,t, and w, will give [itex]\frac{x}{2}+y+3z+3y+\frac{5}{2}w=23+\frac{5}{2}\pi = 30.86 \mbox{ (appox.)}[/itex]

    Also note that [itex]f(1,1,6.70000000000000016,1,1)=-\infty[/itex].
  5. Dec 10, 2005 #4
    Right, I was just saying all I could figure out how to do was try to find this global max and hope it fit the constraints (it didn't), so any advice on another way to proceed?
  6. Dec 10, 2005 #5


    User Avatar
    Homework Helper

    Crap, I minimized. Let me look again.

    Well, you might try Lagrange Multipliers with the constraints as equalities for the upper and lower bounds of the inequalities.

    That version of Lagrange Multipliers goes:

    To find the extrema of [itex]f(x,y,z,...)[/itex] subject to the constraints [itex]g_{1}(x,y,z,...)=k_{1}, g_{2}(x,y,z,...)=k_{2}, g_{3}(x,y,z,...)=k_{3},...[/itex] set

    [tex]\vec{\nabla} f(x,y,z,...) = \lambda_{1}\vec{\nabla} g_{1}(x,y,z,...) + \lambda_{2}\vec{\nabla} g_{2}(x,y,z,...) + \lambda_{3}\vec{\nabla} g_{3}(x,y,z,...) +\cdot\cdot\cdot [/tex]

    and solve as normal.
  7. Dec 10, 2005 #6
    So what you're saying is then I will have four Lagrange multipliers? I treat it as four constraint equalitites?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook