hey, i have this question on a uni past paper.. i've never heard of the lagrange multiplier technique, nor has the lecturer really discussed it properly..
the question is;
by using the langrange multiplier technique, find the values of x and y that either maximize or minimize f(x,y) = x + y +xy  y^2 subject to the constraint y^2 = x .
I am just wondering how i would go about doing this question please! I cant find anything that covers the subject at my level on the internet.
thanks
lagrange multiplier technique
Announcements  Posted on  

Applying to Uni? Let Universities come to you. Click here to get your perfect place  20102014 


I wonder what "your level" is, as that would aid explanation. Anyway...
1) Form the new function g(x,y) which is the constraint with zero on the rhs
2) Form the new function h(x,y,a) = f(x,y)  a g(x,y)
3) Differentiate h(x,y,a) partially wrt x, then wrt y, then wrt a, set all three derivatives = 0 and solve; the stationary points are the max/min of your function subject to your constraint (note the constraint is enforced via the derivative wrt a = 0)
4) Note that the method generalises to functions of as many variables as you want
======
In your example
1)
g(x,y) = y^2  x
2)
h(x,y,a) = x + y +xy  y^2 s  a(y^2  x)
3) left as an exercise
====
You can check your answer in this case by noticing that along the curve specified by your constraint f(x,y) = x + y +xy  y^2 = f(x) = x + x^{1/2} + x^{3/2}  x and differentiating normally wrt x. The point of Lagrange multpliers is that by using the method you can avoid the horrible algebra that would sometimes be involved in backsubstituting your constraint into your function. 
(Original post by miggeros)
I wonder what "your level" is, as that would aid explanation. Anyway...
1) Form the new function g(x,y) which is the constraint with zero on the rhs
2) Form the new function h(x,y,a) = f(x,y)  a g(x,y)
3) Differentiate h(x,y,a) partially wrt x, then wrt y, then wrt a, set all three derivatives = 0 and solve; the stationary points are the max/min of your function subject to your constraint (note the constraint is enforced via the derivative wrt a = 0)
4) Note that the method generalises to functions of as many variables as you want
======
In your example
1)
g(x,y) = y^2  x
2)
h(x,y,a) = x + y +xy  y^2 s  a(y^2  x)
3) left as an exercise
====
You can check your answer in this case by noticing that along the curve specified by your constraint f(x,y) = x + y +xy  y^2 = f(x) = x + x^{1/2} + x^{3/2}  x and differentiating normally wrt x. The point of Lagrange multpliers is that by using the method you can avoid the horrible algebra that would sometimes be involved in backsubstituting your constraint into your function.
1 + y  a = 0; 1 + x  2y + 2ay = 0; [y^2]  x = 0.
The 1st and 3rd equations give you y = [a + 1] and x = [a + 1]^2.
Substitute that into the 2nd equation and you'll get a = 0 or a = 2/3.
Hence you get x = 1, y = 1, function = 0; x = 1/9, y = 1/3, function = 4/27.
In this case, the multiplier method is much longer than the standard method  provided that you express the original function in terms of y. Moreover, the multiplier method doesn't distinguish between max and min.Can anyone provide a problem where the multiplier method really is an advantage over the usual method? 
I agree it is a little difficult to think of very good examples, but I'd be happy if someone could show me one.
Anything where the constraint curve is not oneone would be a bit more work using direct substitution; for example if constraint was something like x^2+y^2=1 you'd need to consider both cases x = +root(1y^2) and x=root(1y^2) separately to make sure you get both sides of the circle. When the constraint curve were not so familiar you might forget to do this.
The multipliers way also generalises easily to multiple constraints and to more than two dimensions. 
hey all. thanks for the help. when i meant "my level" i was just looking for an explanation in plain english really.. a lot of the sites concentrate heavily on mathematical definitions, which i find hard to grasp at this level.
so which bit of this is considered the lagrange multiplier technique? finding g(x,y) and h (x,y,a) ??? thanks 
(Original post by cool beans)
hey all. thanks for the help. when i meant "my level" i was just looking for an explanation in plain english really.. a lot of the sites concentrate heavily on mathematical definitions, which i find hard to grasp at this level.
so which bit of this is considered the lagrange multiplier technique? finding g(x,y) and h (x,y,a) ??? thanks 
(Original post by Maths Buster)
Following the partial differentiation, you get:
1 + y  a = 0; 1 + x  2y + 2ay = 0; [y^2]  x = 0.
The 1st and 3rd equations give you y = [a + 1] and x = [a + 1]^2.
Substitute that into the 2nd equation and you'll get a = 0 or a = 2/3.
Hence you get x = 1, y = 1, function = 0; x = 1/9, y = 1/3, function = 4/27.
In this case, the multiplier method is much longer than the standard method  provided that you express the original function in terms of y. Moreover, the multiplier method doesn't distinguish between max and min.Can anyone provide a problem where the multiplier method really is an advantage over the usual method?
just working through this question now..
wouldn't the differential, wrt to x be 1 + y + a, because when you multiply out the brackets next to a, it becomes + xa..
I'm also working through another question and will post my solution later, would love it for you guys to look through it (answers aren't available from these past papers ) 
(Original post by cool beans)
just working through this question now..
wouldn't the differential, wrt to x be 1 + y + a, because when you multiply out the brackets next to a, it becomes + xa..
I'm also working through another question and will post my solution later, would love it for you guys to look through it (answers aren't available from these past papers ) 
(Original post by Maths Buster)
I always do f(x, y) +ag(x, y) and then differentiate that partially. It leads to the same result in the end. I'll look out for your next question.
Is that the final answer? are they just looking for what x, y and a is? What is this function = thing? How was that worked out??
And here is the other question, completed up to the same point...
f (x,y) = 3x + y +1/3(xy)  2x^2 with constraint y = x^2
which gives x = 1 or 3, y = 1 or root 3, and a = 2 or 4/3
thanks 
Sorry for the double post, just noticed..
the question also says find the values of the lagrange multiplier and the objective function at both solutions. is the lagrange multiplier just the values of a??
but ii) also states, for one of the points found in part i) use appropiate second order conditions to find if the point is a min or a max.
Do i just do f''(x) and substitute in a set of values and determine a stationary point like normal?
thank you, this has been extremely helpful  i hope a question like this comes up now!! 
(Original post by cool beans)
On that question i get all the answers as previously stated, except with the alteration i said, i get a = 0 or +2/3
Is that the final answer? are they just looking for what x, y and a is? What is this function = thing? How was that worked out??
And here is the other question, completed up to the same point...
f (x,y) = 3x + y +1/3(xy)  2x^2 with constraint y = x^2
which gives x = 1 or 3, y = 1 or root 3, and a = 2 or 4/3
thanks
For your 2nd question, I get x = 3 with y = 9 and, here we differ, x = 1 with y = 0. Have another look and post your working if necessary.
PS Iassume that the 3rd term in the function is [xy]/3? 
(Original post by cool beans)
Sorry for the double post, just noticed..
the question also says find the values of the lagrange multiplier and the objective function at both solutions. is the lagrange multiplier just the values of a??
but ii) also states, for one of the points found in part i) use appropiate second order conditions to find if the point is a min or a max.
Do i just do f''(x) and substitute in a set of values and determine a stationary point like normal?
thank you, this has been extremely helpful  i hope a question like this comes up now!!
The values of the objective function will be f(x, y) evaluated at the found points for x and y  which is what I did for your 1st post.
To distinguish between max and min, you would express your objective function in terms of one variable only and then do the usual 2nd derivative stuff. In your example, I think the objective function can be written as 3x + x^2 + [x^3]/3  2x^2. Etc
Reply
Submit reply
Register
Thanks for posting! You just need to create an account in order to submit the post Already a member? Sign in
Oops, something wasn't right
please check the following: