Let $S$ be the surface in $\mathbb R^3$ given by the equation $z=\frac12 x^2+\frac12 y^2$ and let $R\subset R^3$ be the surface given by $y^2+z^2=3$ ($R$ is the boundary of the infinite cylinder around the $x$-axis). Let $C$ be the closed curve defined as the intersection between $S$ and $R$. I want to find the maximum and minimum of $f(x,y,z)=x^2+y^2+(z-1)^2$ on $C$.
How can I do this? I've tried using the Lagrange multipliers, but it is quite a lot of work.