# Lagrange multipliers

• Feb 22nd 2009, 02:35 PM
Frostking
Lagrange multipliers
I am suppose to calculate the max and min of f(x,y,z) = x^2 - 2y + 2z^2 with the constraint function of x^2 + y^2 + z^2 = 1

I am to use Lagrange multipliers for this. When I do I get F sub y equal to -2 so how can this be set equal to zero!!! I am so confused. I also get lambda = 1 and = - y I am suppose to get max of function at 4 and min at -2 but I am really confused here.
• Feb 22nd 2009, 02:39 PM
Moo
Quote:

Originally Posted by Frostking
I am suppose to calculate the max and min of f(x,y,z) = x^2 - 2y + 2z^2 with the constraint function of x^2 + y^2 + z^2 = 1

I am to use Lagrange multipliers for this. When I do I get F sub y equal to -2 so how can this be set equal to zero!!! I am so confused. I also get lambda = 1 and = - y I am suppose to get max of function at 4 and min at -2 but I am really confused here.

Define $F(x,y,z,\lambda)=x^2-2y+2z^2-\lambda (x^2+y^2+z^2-1)$

thus $F_y=-2-2 \lambda y$

take the successive derivatives of F and make them equal 0.
• Feb 22nd 2009, 02:48 PM
Frostking
Lagrange mulitplier problem

I have f sub x as 2x - lambda 2x = 0
f sub z as 4z - lambda 2 z = 0

So I think since I get lambda = -y and also to 1 that y is -1 and since a squared is involved it could be 1 also. BUt when I plug these values in to original equation with x and z = to zero I get max of function at 2 and min at -2 whereas the answer says it should be 4 and -2

Can you advise as to my error???? FrostKing
• Feb 22nd 2009, 02:57 PM
Moo
Quote:

Originally Posted by Frostking

I have f sub x as 2x - lambda 2x = 0
f sub z as 4z - lambda 2 z = 0

So I think since I get lambda = -y and also to 1 that y is -1 and since a squared is involved it could be 1 also. BUt when I plug these values in to original equation with x and z = to zero I get max of function at 2 and min at -2 whereas the answer says it should be 4 and -2

Can you advise as to my error???? FrostKing

I think it is more complicated. And it's y=-1/lambda

You have the following system :
$\left\{\begin{array}{llll} 2x-2\lambda x=0 \\ -2-2\lambda y=0 \\ 4z-2 \lambda z=0 \\ x^2+y^2+z^2-1=0 \end{array} \right.$

$\left\{\begin{array}{llll} x(1-\lambda)=0 \\ y=-1/\lambda \\ z(2-\lambda)=0 \\ x^2+y^2+z^2-1=0 \end{array} \right.$

So from the first one, x=0 or lambda=1.
- If x=0, then from the third equation, we have z=0 or lambda=2
• if z=0, the fourth one will give y^2=1, so y=1 or -1. f(0,1,0)=-2 and f(0,-1,0)=2
• if lambda=2, y=-1/2. From the fourth one, you'll get z=...

- If lambda=1, y=-1. And from the third equation, we have z=0. The fourth equation will give you x=...

can you see the reasoning ?
• Feb 22nd 2009, 03:17 PM
Frostking