I need to find the extreme values of a function $$f(x,y,z)=x^2+y^2+z^2$$ on the set $S=\{(x,y,z) \in \mathbb R^3: z=xy+2\}$.
Set $S$ is not compact, so we cannot be sure the local extrema exist. Guess I'd need to use differentiation, but not sure how.
Any help would be appreciated.
By AM-GM $$x^2+y^2+z^2=x^2+y^2+(2+xy)^2\geq2|xy|+x^2y^2+4xy+4\geq$$ $$\geq2|xy|+x^2y^2-4|xy|+4=\left(|xy|-1\right)^2+3\geq3.$$ The equality occurs for $|xy|=1$ and $|xy|=-xy$, id est, for $(x,y)=(1,-1)$ for example,
which says that $3$ is a minimal value of $f$.
The maximum does not exist, of course.