How can I find the maxima and minima of the function $f:\mathbb{RP}^2 \rightarrow \mathbb{R},\space f([x,y,z])=\frac{xy+yz+2zx}{x^2+y^2+z^2}$ ?
I believe that I have to use the Lagrange multipliers to get the desired result, but I have absolutely no idea how.