1. ## Lagrange Multipliers (Question)

I have to find the points on the sphere $x^2+y^2+z^2=36$ that are closest to and furthest from the point $(1,2,2)$

This is where I am up to. And I will show where I am stuck.
$\nabla f(x,y,z) = 2x+2y+2z$

What do I do now? Do I use the distance formula somehow?

Any help is appreciated!

2. Whichever point maximizes (minimizes) the square of the distance to the point (1,2,2) also maximizes (minimizes) the distance to the point. So the function you want to optimize is $g(x,y,z) = (x-1)^2 + (y-2)^2 + (z-2)^2$. You need to find points on the sphere where the gradient of f is a scalar multiple of the gradient of g. What you have written down is not the gradient of f, by the way. The gradient of f is the vector <2x, 2y, 2z>. The gradient of g is <2(x-1), 2(y-2), 2(z-2)>. Let one gradient be a scalar multiple of the other. This gives you 3 equations (one for each component of the vector). The fourth equation is the equation of the sphere. You have four variables (including the scalar multiple, which is usually denoted by $\lambda$). I'll let you work it from here.

3. $\nabla f(x,y,z)=\lambda( \nabla g(x,y,z))$
where $f(x,y,z) = D^2 = (x-1)^2+(y-2)^2+(z-2)^2$
and where $g(x,y,z)$ = Constraint condition = $x^2+y^2+z^2=36$

$<2(x-1)+2(y-2)+2(z-2)> = \lambda <2x+2y+2z>$

solving for $\lambda$ I got that $\lambda =3/2$
and putting $\lambda$ back into the equations I get

$(-2, -4, -4)$

Is this correct? Is this the answer? If anyone can check that would be amazing! I have a final tomorrow =/

4. You can check it by inputting "maximize (x-1)^2 + (y-2)^2 + (z-2)^2 subject to x^2 + y^2 + z^2 = 36" at wolframalpha.com. Replace maximize with minimize to get the other answer.

5. ^WOW Thank you so much!