Results 1 to 10 of 10

Math Help - Constrained Optimization with a three variable function

  1. #1
    Member
    Joined
    Sep 2009
    Posts
    242
    Thanks
    1

    Constrained Optimization with a three variable function

    Hi, I need help maximizing a function of three variables subject to a constraint. I understand how to do this for a function of two variables, but now I need to do it for a function of three variables.

    If someone could point me in the right direction, recommend a webpage, etc., that would be great. Cursory googling has not helped.


    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Junior Member eddie2042's Avatar
    Joined
    Apr 2010
    Posts
    70
    Thanks
    1
    it would help if you post the question...
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member Anonymous1's Avatar
    Joined
    Nov 2009
    From
    Big Red, NY
    Posts
    517
    Thanks
    1
    Quote Originally Posted by rainer View Post
    Hi, I need help maximizing a function of three variables subject to a constraint. I understand how to do this for a function of two variables, but now I need to do it for a function of three variables.

    If someone could point me in the right direction, recommend a webpage, etc., that would be great. Cursory googling has not helped.


    Thanks
    Econ, huh?

    http://people.ucsc.edu/~rgil/Optimization.pdf

    See page 42.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Sep 2009
    Posts
    242
    Thanks
    1
    Quote Originally Posted by eddie2042 View Post
    it would help if you post the question...
    Formalizing my question:

    I need to maximize f(x, y, z) subject to the constraint g(x,y,z)=c

    I believe you write this as...


    \underset{\left \{ \left. x,y,z \right \} \right.}{max}\left [ f(x,y,z) \right ]


    s.t.\: \: \: \: g(x,y,z)=c


    If it's easier to help me if I offer an example problem, here is an example problem:

    Maximize f(x,y,z)=\frac{x}{y+z} subject to the constraint x+y+z=c


    I.e. \underset{\left \{ \left. x,y,z \right \} \right.}{max}\left [ \frac{x}{y+z} \right ]


    s.t.\: \: \: \: x+y+z=c


    1) How would I use the substitution method to find the solution? Is it even possible when there are three variables?

    2) If I use the Lagrangian method, what do I do after getting my first order conditions?

    The Lagrangian is \Lambda(x,y,z,\lambda )=\frac{x}{y+z}+\lambda(x+y+z-c)

    Here are my first order conditions:

    \frac{\partial \Lambda}{\partial x}=\frac{1}{y+z}+\lambda=0

    \frac{\partial \Lambda}{\partial y}=\frac{-x}{(y+z)^2}+\lambda=0

    \frac{\partial \Lambda}{\partial z}=\frac{-x}{(y+z)^2}+\lambda=0

    \frac{\partial \Lambda}{\partial \lambda }=x+y+z-c=0

    This is as far as I get. I don't know what to do from here.
    Last edited by rainer; April 2nd 2010 at 08:21 PM. Reason: forgot the zeros
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member Anonymous1's Avatar
    Joined
    Nov 2009
    From
    Big Red, NY
    Posts
    517
    Thanks
    1
    Set your first order conditions = 0. Solve for \lambda to get it out of there. Then you solve the system of equations.

    Why don't you try and show me where you are stuck.

    Note that your solutions x*, y*, and z* are going to be functions of the other two variables.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member Anonymous1's Avatar
    Joined
    Nov 2009
    From
    Big Red, NY
    Posts
    517
    Thanks
    1
    You may have to use the fact x+y+z= c => x = c-y-z.

    And sub these into your equation before taking the first order conditions.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Sep 2009
    Posts
    242
    Thanks
    1
    Quote Originally Posted by Anonymous1 View Post
    Set your first order conditions = 0. Solve for \lambda to get it out of there. Then you solve the system of equations.
    I forgot to add the zeros. Now I've edited them into my last post up there.

    Now, I'm not sure what you mean by "solve the system of equations."

    I'm guessing you mean I get them all into the same equation by substituting them in for 0?

    In the example above, this leads me to:

    \frac{1}{y+z}+\frac{2x}{(y+z)^2}-x-y+c=0

    Is that what you're talking about? And then I just solve for each variable to get its respective maximization formula?

    So the maximization formula for c, for example, would be:

    c_{\max}=x+y-\frac{1}{y+z}-\frac{2x}{(y+z)^2}

    Is that right?

    By the way thanks for that link. I had already come across it and it is one of the reasons why I have gotten as far as I have. But it does not deal with the three variable case so that is why I am asking here.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member Anonymous1's Avatar
    Joined
    Nov 2009
    From
    Big Red, NY
    Posts
    517
    Thanks
    1
    A few things.

    c is a constant. Think of x+y+z=c as the budget constraint. c (sometimes denoted by m) is the purchasing power.

    We want to maximize f constrained by x+y+x=c. f is your utility function, so the Lagrangian is a function that takes into account both the budget constraint and the utility function.

    If we want to maximize a specific variable of the function \Lambda, we take the derivative w.r.t that variable and set it equal to 0. Why do we do this? Because the derivative describes the slope of our function at a point. And when the slope = 0, we are at the zenith, i.e., maximum of the function.

    Now, we have

    \frac{\partial \Lambda}{\partial x}=\frac{1}{y+z} +\lambda=0

    \Rightarrow -\frac{1}{y+z} = \lambda

    Now sub \lambda into your other two equations and simplify them.

    Now we have three equations and three unknowns.

    Solve equation 1 for x, say, then sub the obtained value of x(y,z) (a function of the other two variables) into equation 2. Proceed in this manner to find the solutions, [x^*, y^*, z^*] to your system of equations.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Sep 2009
    Posts
    242
    Thanks
    1
    Thanks. I think I got it now. Just to follow through:

    So having solved for \lambda as you demonstrate...

    \lambda=-\frac{1}{y+z}

    I then substitute this in for \lambda in one of the other equations...

    \frac{-x}{(y+z)^2}-\frac{1}{y+z}=0

    Simplifying...

    x+y+z=0

    And then solving for any of these variables gives me the maximization formula for that variable? I.e. y_{\max}=-x-z? Is that it?

    Oh, one last question. What if the constraint only involves two of the three variables. I.e. instead of x+y+z=c it were only y+z=c. In that case one of the first order condition equations would be without a lambda. Would that pose a problem for solving the system of equations? Thanks.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Super Member Anonymous1's Avatar
    Joined
    Nov 2009
    From
    Big Red, NY
    Posts
    517
    Thanks
    1
    Quote Originally Posted by rainer View Post
    Oh, one last question. What if the constraint only involves two of the three variables. I.e. instead of x+y+z=c it were only y+z=c. In that case one of the first order condition equations would be without a lambda. Would that pose a problem for solving the system of equations? Thanks.
    You will always have f.o.c. w.r.t. \lambda. This is default.

    In the two variable case you would have a f.o.c. w.r.t. x, and w.r.t. y because you are only trying to find the zenith for those two variables.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Multivariable Constrained Optimization
    Posted in the Advanced Applied Math Forum
    Replies: 8
    Last Post: June 10th 2010, 03:36 AM
  2. Constrained Optimization
    Posted in the Calculus Forum
    Replies: 0
    Last Post: May 19th 2010, 02:05 AM
  3. Constrained Optimization again
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 5th 2010, 05:45 AM
  4. A Question on Constrained Optimization
    Posted in the Advanced Applied Math Forum
    Replies: 2
    Last Post: December 3rd 2009, 08:00 AM
  5. Need help with Constrained Optimization
    Posted in the Calculus Forum
    Replies: 3
    Last Post: December 1st 2006, 12:41 PM

Search Tags


/mathhelpforum @mathhelpforum