# Homework Help: Determining Local Extrema with Lagrange

1. Nov 5, 2008

### cse63146

[SOLVED] Determining Local Extrema with Lagrange

1. The problem statement, all variables and given/known data

Find local extram of f(x,y,z) = 8x+4y-z with constraint g(x,y,z) = x^2 + y^2 + z^2 = 9

2. Relevant equations

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

3. The attempt at a solution

So I did the partial derivatives for F and G:

$$\nabla f(x,y,z) = (8,4,-1)$$ $$\nabla g(x,y,z) = (2x,2y,2x)$$

Now I use Lagrange to get

$$8 =2 \lambda x , 4 = 2\lambda y , -1 =2 \lambda z$$

Now I isolated $$\lambda = \frac{4}{x} = \frac{2}{y} =- \frac{1}{2z}$$

Now I re-write both y and z in terms of x and I get:

$$y = \frac{x}{2}, z =- \frac{x}{8}$$

Then I put them back in to g(x,y,z) = g(x,x/2,x/8)

and get:

$$g(x,x/2,x/8) = x^2 + \frac{x^2}{4} +\frac{x^2}{64} = 9 \Rightarrow \frac{64x^2 + 16x^2 + x^2}{64} = 9 \Rightarrow \frac{81x^2}{64} = 9 \Rightarrow x = \sqrt{\frac{193}{27}}$$

but the book says x = 8/3

Can anyone see what mistake did I make? Thank You.

Last edited: Nov 5, 2008
2. Nov 5, 2008

### Office_Shredder

Staff Emeritus
Yeah I do. It's tricky. Let's rewind to... the step before

81x2/64 = 9

So dividing both sides by 81 we get

x2/64 = 1/9

Multiplying both sides by 64 we get

x2 = 64/9

3. Nov 5, 2008

### cse63146

x = 8/3 which agrees with the book. Thank You.

but why couldn't I multiply 9 by 64, and then divide it by 81?

4. Nov 5, 2008

### gabbagabbahey

You can, but 9*64/81=192/27=64/9 not 193/27