<s>[INST] Find the highest and lowest points on the ellipse of intersection of the cylinder $x^2+y^2 = 1$ and the plane $x+y+z=1$ 
Find the highest and lowest points on the ellipse of intersection of the cylinder $x^2+y^2 = 1$ and the plain $x+y+z=1$

Hi i was doing this question but i'm not sure i was right. Does this make sense?
Let
$$f(x) = x^2+y^2 = 1$$
$$f(y) = x+y+z=1, \quad \text{our constraint}$$
$$ \nabla f(x) = \lambda \nabla g(x) $$
$f_x = 2x = \lambda$ ..... (1)
$f_y = 2y = \lambda$ ...... (2)
$f_z = 0 = \lambda$
(1) = (2)
$2x = 2y = \lambda = 0 $
$x=y$
Sub into f(x) 
$$f(x) = x^2 + x^2 = 1$$ $$f(x) = 2x^2 = 1$$ $$f(x) = x = \pm \frac{1}{\sqrt{2}} $$ $$ \therefore \, y =  \pm \frac{1}{\sqrt{2}}$$
Points: $\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}} 
\right), \quad \left(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}} \right)$ 
Sub these points into g
$$g\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, z \right) = \frac{2}{\sqrt{2}} + z = 10 $$ 
$$ z = 1 - \frac{2}{\sqrt{2}} $$
$$g\left(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}, z \right) = -\frac{2}{\sqrt{2}} + z = 10 $$ 
$$ z = 1 + \frac{2}{\sqrt{2}} $$
So highest and lowest points are....
$$\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 1 - \frac{2}{\sqrt{2}}  \right) \quad lowest$$
$$\left(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}, 1 + \frac{2}{\sqrt{2}}  \right) \quad highest$$
 [/INST] No, this is not correct.  It looks like you assumed that the first function described in the problem was the objective function (that which is to be optimized) and the second function is the constraint function.
But if you read the problem, you see that both $x^2 + y^2 = 1$ and $x+y+z=1$ are constraints.  So you need a Lagrange multiplier approach with two multipliers.
But wait!  If these are both constraints, what is the objective function?  Read it again.  What words in the problem say “this is an optimization problem.”  Optimal means superlative, and the superlative words are highest and lowest.
What function would have its maximum value achieved at the highest point of a set?  The height function $f(x,y,z) = z$.

Here is a fleshed-out solution.  The Lagrange equation is
$$
\nabla (z) = \lambda \nabla (x^2 + y^2) + \mu \nabla (x+y+z)
$$
In coordinates,
\begin{align}
    0 &= \lambda(2x) + \mu \tag{1}\\
    0 &= \lambda(2y) + \mu \tag{2}\\
    1 &= \mu \tag{3}
\end{align}
Then we have the equations of constraint
\begin{align}
    x^2 + y^2 = 1 \tag{4} \\
    x + y + z = 1 \tag{5}
\end{align}
Substituting (3) into (1) and (2) gives
\begin{align*}
    x =y= -\frac{1}{2\lambda}
\end{align*}
Then by (4),
$$
\left(-\frac{1}{2\lambda}\right)^2 + \left(-\frac{1}{2\lambda}\right)^2 = 1
\implies \lambda^2 = \frac{1}{2} \implies \lambda = \pm \frac{1}{\sqrt{2}}
$$
If $\lambda = \frac{1}{\sqrt{2}}$, then $x = y = -\frac{1}{\sqrt{2}}$ and by (5) $z=1+\sqrt{2}$.  If $\lambda = - \frac{1}{2}$ then $x=y=\frac{1}{\sqrt{2}}$ and $z=1-\sqrt{2}$.  So the highest point is $\left(-\frac{\sqrt{2}}{2},-\frac{\sqrt{2}}{2},1+\sqrt{2}\right)$ and the lowest point is $\left(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2},1-\sqrt{2}\right)$
</s>