Where the object that moves along the intersection of $x^2+y^2=1$ and $y+z=1$ needs to be if we want the sum $x+2y+z$ to be max/min? 
An object is moving along the curve which is derived from the intersection of the cylinder $x^2+y^2=1$ and the plane $y+z=1$. Where does the object need to be located if we want to maximize/minimize the sum $x+2y+z$? What is the min/max sum?

I'm really not sure how to determine the constraint function. The intersection of the cylinder and the plane is:
$$
x^2+(1-z)^2=1
$$
Then:
$$
z=\frac{x^2+z^2}{2}
$$
I guess we can define new function:
$$
g(x,y)=x+2y+z=x+2y+\frac{x^2+z^2}{2}=x+2y+\frac{x^2+(1-y)^2}{2}
$$
Then we can look for critical points:
$$
g_x=1+x\\
g_y=1+y
$$
Which means that $(-1,-1)$ is the critical point. I don't see how to proceed though.

Express $z$ and we are interested in maximum/minimum of $E = x+y+1$. By the Cauchy inequality we have: $$|x+y|\leq \sqrt{2(x^2+y^2)} = \sqrt{2}$$ So $E_{\max} = 1+\sqrt{2}$ which is reached at $x=y=1/\sqrt{2}$ and  $E_{\min} = 1-\sqrt{2}$ which is reached at $x=y=-1/\sqrt{2}$ 
