Results 1 to 4 of 4
Like Tree2Thanks
  • 1 Post By Barioth
  • 1 Post By MarkFL

Math Help - Optimization using Lagrange multipliers

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    Hell
    Posts
    15
    Thanks
    2

    Optimization using Lagrange multipliers

    Hello. I am trying to teach myself the Lagrangean method for purposes of constrained optimization, and I've had a couple of shots at a problem which I, uh, haven't been able to solve for some reason. Mostly because it degenerates to algebraic nonsense, I think. I would appreciate if someone took a look at the first part of my solution, so I can be sure that I am not messing it up before I start solving the equation system it yields, which obviously can be messed up easily.

    I have an objective function (which is to be minimized)

    f(x,y)=2x^2 + 4xy

    and a constraint function

    g(x,y)=x^2y=9

    I make a Lagrangean:

    lagrange(x,h,\lambda)=2x^2+4xy-\lambda(x^2y-9)

    which obviously turns into

    L(x,h,\lambda)=2x^2+4xy-\lambda x^2y-9\lambda,

    and I proceed taking partial derivatives, putting them equal to zero and thus creating a system of equations:

    \frac{\partial L}{\partial x}=4x+4y-2 \lambda y = 0

    \frac{\partial L}{\partial y}=4x - \lambda x^2 = 0

    \frac{\partial L}{\partial \lambda}=-yx^2-9 = 0

    Is there anything obviously messed up so far? When I put the system of equations into CAS, it gives "false" as solution, so I kind of guess that I am messing something up.
    Last edited by JacobOCD; January 18th 2013 at 05:24 PM. Reason: no, I wasn't taking the partial for x three times in a row :/
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Junior Member Barioth's Avatar
    Joined
    Jan 2013
    From
    Canada
    Posts
    54
    Thanks
    16

    Re: Optimization using Lagrange multipliers

    Hi JacobOCD have you tried using the ''jacobian''...

    Sorry I realy tough it was funny...

    I kind of feel bad now...

    I'll try to help you then!

    I think the problem is your ''Lagrangean'' (Well I for sure haven't seen it that way, I can't say it's wrong, but I've no idea what that is)

    The method for Lagrange multiplicator I've in my school book say something like that (It's in french so I'll translate)

    To find the min and max value of f(x,y,z) under a cibstraubt function g(x,y,z)=k (There are some stuff you have to make sure, like the derivate exist.)

    find every value of x,y,z so that:

    \\\nabla f(x,y,z)=\lambda \nabla g(x,y,z)\\g(x,y,z)=k

    then evalaute f with those point


    Note \nabla f(x,y,z)=\lambda \nabla g(x,y,z)
    is the same as

    f'_x=\lambda g'_x\\f'_y=\lambda g'_y\\f'_z=\lambda g'_z\\


    Now this is for the student book I've.

    This is how I leanred lagrange multiplcator.
    Does it help a bit more?

    note: You said: "and I proceed taking partial derivatives, putting them equal to zero and thus creating a system of equations:"
    Tacking the partial derivates is a step in lagrange multiplacator altough you never put them equal to zero. the equation you've to solve

    f'_x=\lambda g'_x\\f'_y=\lambda g'_y\\f'_z=\lambda g'_z\\g(x,y,z)=k

    If that wasn't clear enough let me know I'll try to explain more.
    Thanks from JacobOCD
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor MarkFL's Avatar
    Joined
    Dec 2011
    From
    St. Augustine, FL.
    Posts
    1,988
    Thanks
    734

    Re: Optimization using Lagrange multipliers

    This is the method I was taught:

    Objective function: f(x,y)=2x^2+4xy

    Constraint: g(x,y)=x^2y-9=0

    Set up the system:

    f_x(x,y)=\lambda g_x(x,y)

    f_y(x,y)=\lambda g_y(x,y)

    which is:

    4x+4y=\lambda\cdot2xy

    4x=\lambda\cdot x^2

    The second equation may be written:

    x(4-\lambda\cdot x)=0

    This implies:

    i) x=0 but the constraint precludes this value of x.

    ii) \lambda=\frac{4}{x}=\frac{2(x+y)}{xy}

    x=y

    Now, substitute for y into the constraint:

    x^3-9=0

    x=y=3^{\frac{2}{3}}

    Hence, we find the objective function is minimized by:

    f_{\text{min}}=f(3^{\frac{2}{3}},3^{\frac{2}{3}})=  18\sqrt[3]{3}
    Thanks from JacobOCD
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jan 2013
    From
    Hell
    Posts
    15
    Thanks
    2

    Re: Optimization using Lagrange multipliers

    Guys, thanks alot. I actually tried doing what MarkFL did, actually quite exactly. I, though, made some mistakes along the way, and I couldn't solve the equation system as efficiently.

    Barioth, if you evaluate my expressions with the partials, you will see that they can be re-written into the expressions Mark wrote, as well as the constraint expression, we end up with. Thus it doesn't make any difference, like if you write 2x-3y=0 or 2x=3y. It is still the same equation, so to say. Now I've done a few more problems using the Lagrangean method (this time succesfully), and I've found a good resource where I could see a sort of geometrical proof of the method, so I think I am starting to make a whole lot of sense of it. It's actually quite simple, it seems.

    Under all circumstances: Thanks alot for the help, again. My next project is devising Taylor polynomials, so I guess I'll return with more questions. Maybe I should take a few proper calculus courses instead of building my learning on random pdf notes and YouTube videos
    Last edited by JacobOCD; January 19th 2013 at 06:29 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Confusion...
    Posted in the Calculus Forum
    Replies: 4
    Last Post: January 2nd 2013, 05:35 AM
  2. Economics Lagrangean Method Problem
    Posted in the Business Math Forum
    Replies: 2
    Last Post: June 26th 2012, 03:57 PM
  3. DVs and IVs confusion
    Posted in the Statistics Forum
    Replies: 0
    Last Post: December 4th 2011, 03:09 AM
  4. confusion
    Posted in the Statistics Forum
    Replies: 2
    Last Post: August 15th 2009, 03:17 AM
  5. confusion?
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: August 8th 2009, 11:03 AM

Search Tags


/mathhelpforum @mathhelpforum