# Optimize f(x,y,z) = x2 + y2 + z2 - 2x

1. Oct 12, 2009

### squenshl

Optimize f(x,y,z) = x2 + y2 + z2 - 2x subject to the constraint g(x,y,z) = x2 + y2 + z2 - 25 = 0

Step 1:
L = f - $$\lambda$$g = x2 + y2 + z2 - 2x - $$\lambda$$(x2 + y2 + z2 - 25).

Step 2:
Lx = 2x - 2 - 2$$\lambda$$x = 0
Ly = 2y - 2$$\lambda$$y = 0
Lz = 2z - 2$$\lambda$$z = 0

What do I do now? Please help.

2. Oct 13, 2009

### Office_Shredder

Staff Emeritus
Re: Lagrange

I see four equations and four unknowns (don't forget that g(x,y,z)=0 gives you another equation!). Have you tried solving for those unknowns?

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook