# Thread: Lagrange multiplier

1. ## Lagrange multiplier

A firm that manufactures speciality bicycles has a profit function
π = 5x^2 − 10xy + 3y^2 + 240x
where x denotes the number of frames and y denotes the number of wheels. Find the maximum profit
assuming that the firm does not want any spare frames or wheels left over at the end of the produc-
tion run.

PLEASE HELP ME TO SOLVE THIS EXCERSISE

2. ## Re: Lagrange multiplier

You have a function, in this case a profit function. To optimize a function subject to one or more constraints, you must construct a different function, let's call it the L function, and optimize that. What are the elements of the L function?

3. ## Re: Lagrange multiplier

in fact I already got the L function. The constraint is 2x-y=0 so L(x,y,λ)=5x^2-10xy+3y^2+240x+ λ(2x-y)
But the problem is that after I apply 2nd derivative test to see if the critical point I got is really local maximum point,I get the discriminant less than zero, which mean that its a saddle point,not a local maximum point..Maybe I missed something?

4. ## Re: Lagrange multiplier

Does it mean that its impossible to solve the excersise?

5. ## Re: Lagrange multiplier

If the maximum point is not in the interior (i.e. no critical points) then it lies on the boundary of your constraint function.

In this case you are so constrained, you have to use all your parts, that there is really only one possible solution. The one where you use all your parts.

In this case as you noted $2x=y$

thus your profit function is simply

$5x^2 − 10xy + 3y^2 + 240x|_{y=2x} = 5x^2-10x(2x) + 3(2x)^2 + 240x$

It's trivial to find the critical point here and a 2nd derivative check shows that it is indeed a maximum.

6. ## Re: Lagrange multiplier

Originally Posted by Dagne3
in fact I already got the L function. The constraint is 2x-y=0 so L(x,y,λ)=5x^2-10xy+3y^2+240x+ λ(2x-y)
But the problem is that after I apply 2nd derivative test to see if the critical point I got is really local maximum point,I get the discriminant less than zero, which mean that its a saddle point,not a local maximum point..Maybe I missed something?
$profit = P = 5x^2 - 10xy + 3y^2 + 240x.$

$L = P + \lambda (2x - y) = 5x^2 - 10xy + 3y^2 + 240x + \lambda (2x - y) \implies$

$\dfrac{\delta L}{\delta x} = 10x - 10y + 240 + 2\lambda;$

$\dfrac{\delta L}{\delta y} = -\ 10x + 6y - \lambda;\ and$

$\dfrac{\delta L}{\delta \lambda} = 2x - y.$

So first order conditions are:

$10x - 10y + 240 + 2\lambda = 0 \implies 2\lambda = 10y - 10x - 240 \implies \lambda = 5y - 5x - 120;$

$-\ 10x + 6y - \lambda = 0 \implies \lambda = 6y - 10x \implies 6y - 10x = 5y - 5x - 120 \implies y = 5x - 120;\ and$

$2x - y = 0 \implies 2x = y \implies 2x = 5x - 120 \implies 3x = 120 \implies x = 40 \implies y = 80.$

I presume that is what you got. The second order conditions for L are not relevant because we are REALLY trying to maximize P, not L. We must go back to P.

$x = 40\ and\ y = 80 \implies P = 5(40^2) - 10(40)(80) + 3(80^2) + 240(40) = 8000 - 32000 + 19200 + 9600 = 4800.$

$x = 40 + a\ and\ y = 80 + 2a \implies$

$P = 5(40 + a)^2 - 10(40 + a)(80 + 2a) + 3(80 + 2a)^2 + 240(40 + a) =$

$5(1600 + 80a + a^2) - 10(3200 + 160a + 2a^2) + 3(6400 +320a + 4a^2) + 9600 + 240a =$

$8000 + 400a + 5a^2 - 32000 - 1600a - 20a^2 + 19200 + 960a + 12a^2 + 9600 + 240a = 4800 - 3a^2 < 4800.$

This kind of analysis is important because you may have constraints that are inequalities rather than equalities, in which case you may find that the inequalities are not real constraints.

EDIT: Romsek has given you a simpler analysis, which comes to the same thing, that will always apply if your constraints are all equalities.

7. ## Re: Lagrange multiplier

Originally Posted by JeffM
$profit = P = 5x^2 - 10xy + 3y^2 + 240x.$

$L = P + \lambda (2x - y) = 5x^2 - 10xy + 3y^2 + 240x + \lambda (2x - y) \implies$

$\dfrac{\delta L}{\delta x} = 10x - 10y + 240 + 2\lambda;$

$\dfrac{\delta L}{\delta y} = -\ 10x + 6y - \lambda;\ and$

$\dfrac{\delta L}{\delta \lambda} = 2x - y.$

So first order conditions are:

$10x - 10y + 240 + 2\lambda = 0 \implies 2\lambda = 10y - 10x - 240 \implies \lambda = 5y - 5x - 120;$

$-\ 10x + 6y - \lambda = 0 \implies \lambda = 6y - 10x \implies 6y - 10x = 5y - 5x - 120 \implies y = 5x - 120;\ and$

$2x - y = 0 \implies 2x = y \implies 2x = 5x - 120 \implies 3x = 120 \implies x = 40 \implies y = 80.$

I presume that is what you got. The second order conditions for L are not relevant because we are REALLY trying to maximize P, not L. We must go back to P.

$x = 40\ and\ y = 80 \implies P = 5(40^2) - 10(40)(80) + 3(80^2) + 240(40) = 8000 - 32000 + 19200 + 9600 = 4800.$

$x = 40 + a\ and\ y = 80 + 2a \implies$

$P = 5(40 + a)^2 - 10(40 + a)(80 + 2a) + 3(80 + 2a)^2 + 240(40 + a) =$

$5(1600 + 80a + a^2) - 10(3200 + 160a + 2a^2) + 3(6400 +320a + 4a^2) + 9600 + 240a =$

$8000 + 400a + 5a^2 - 32000 - 1600a - 20a^2 + 19200 + 960a + 12a^2 + 9600 + 240a = 4800 - 3a^2 < 4800.$

This kind of analysis is important because you may have constraints that are inequalities rather than equalities, in which case you may find that the inequalities are not real constraints.

EDIT: Romsek has given you a simpler analysis, which comes to the same thing, that will always apply if your constraints are all equalities.
Okay,I got what you did here,I got the same, only I used 2nd derivative test which is not neccessary as I see. But can you explain how you get x = 40 + a and y = 80 + 2a ?

8. ## Re: Lagrange multiplier

Originally Posted by Dagne3
Okay,I got what you did here,I got the same, only I used 2nd derivative test which is not neccessary as I see. But can you explain how you get x = 40 + a and y = 80 + 2a ?
The idea is this. Consider any arbitrary pair of numbers that differs from 40 and 80 while retaining the constraint that one of the pair is double the other. So if I change 40 by an arbitrary a, I must also change 80 by 2a to continue to meet that constraint.

9. ## Re: Lagrange multiplier

Originally Posted by romsek
If the maximum point is not in the interior (i.e. no critical points) then it lies on the boundary of your constraint function.

In this case you are so constrained, you have to use all your parts, that there is really only one possible solution. The one where you use all your parts.

In this case as you noted $2x=y$

thus your profit function is simply

$5x^2 − 10xy + 3y^2 + 240x|_{y=2x} = 5x^2-10x(2x) + 3(2x)^2 + 240x$

It's trivial to find the critical point here and a 2nd derivative check shows that it is indeed a maximum.
-------

Hi, I would really appreciate if you could clarify why the constraint is 2x=y or 2x-y=0?? Doesn't x refer to the frames and y to the wheels? Hence, I thought that a bycicle would have 2 wheels and 1 frame, meaning that the constraint is 2y-x=0?

10. ## Re: Lagrange multiplier

What if the profit function was: π = 5x^2 − 10xy + 3y^2 = 240x (just: =240x, changes), Its a question from a book.... Thanks in advance

### A firm, which manufactures specialty bicycles, has a profit function π = 5x2 – 10xy 3y2 240x where x denotes the number of frames and y denotes the number of wheels. Find the maximum profit

Click on a term to search for related topics.