I was presented with this question in a lab:
Use the method of Lagrange Multipliers to solve the following. Be sure to let Mathematica do all the heavy lifting for you. Determine the points that lie on the intersection of the ellipsoid $$ x^2+y^2+9z^2=25 $$ and the plane $$ x+3y-2z=0 $$ that are closest and furthest from the origin.
Completely lost, can anyone help?
You want to minimise the distance squared from the origin, $x^2+y^2+z^2$, subject to the two conditions $ x^2+y^2+9z^2-25=0 $ and $x+3y-2z=0$. Using Lagrange multipliers means finding the stationary points of $$ L = x^2+y^2+z^2 -\lambda(x^2+y^2+9z^2-25) -\mu(x+3y-2z), $$ considered as a function of $(x,y,z,\lambda,\mu)$, and then determining which of the extrema are actually minima and maxima.
Therefore, differentiate $L$ with respect to all five variables and solve all of these being zero for $x,y,z,\lambda,\mu$, and then plug $x,y,z$ into $x^2+y^2+z^2$ to find the minima and maxima.