# Maximum and minimum of the function $xy+z^2$

Find the maximum and minimum values of the function $f(x,y,z)=xy+z^2$ in the circumference obtained by intersections between the sphere $x^2+y^2+z^2=4$ and the plane $y-x=0$.

I did Lagrange and found the points $(0,0,\pm2)$ I would call them maximum values and that the function have no minimum values. Not sure if that's correct... Thanks.

Edit: Lagrange calculations:

$\begin{cases}f_x\rightarrow y=4x\gamma\\ f_y\rightarrow x=0\\ f_z\rightarrow 2z=2z\gamma\\ 2x^2+z^2=4 \end{cases}$

• Please show us your Lagrange calculations. – Empy2 Jan 9 '16 at 17:27
• I can't understand why if I calculate Lagrange with one constraint (being the intersection between two planes) I get a different result than if I do Lagrange with two constraints from the beginning... – João Pedro Jan 9 '16 at 18:05
• There are two restrictions, so there are two Lagrange multipliers. Or, eliminate $y$ from the start, and there is one Lagrange multiplier. – Empy2 Jan 9 '16 at 22:28

You know that $x=y$ so you try to maximize/minimize $x^2+z^2$ with the constraint $2x^2+z^2=4$

But : $$x^2+z^2=4-x^2$$ so :

• $x^2+z^2$ is maximal when $x^2$ is minimal and this is at $x=0$ and $z=\pm 2$.

• $x^2+z^2$ is minimal when $x^2$ is maximal and this is at $x^2=2$ .This happens because : $$x^2 \leq \frac{1}{2} \cdot( 2x^2+z^2)=2$$ and this means that $x= \pm \sqrt{2}$ and $z=0$ .

The minimum is $2$ and it's achieved for $\left (\pm \sqrt{2},\pm \sqrt{2},0 \right)$ and the maximum is $4$ achieved for $\left (0,0,\pm 2 \right )$ .

• Where did $x^2+z^2=4-z^2$ come from? – Motun Jan 9 '16 at 17:31
• It should be $2x^2+z^2=4$ .I'll correct it .Thanks . – user252450 Jan 9 '16 at 17:31
• But the function I'm trying to maximize is $xy+z^2$ – João Pedro Jan 9 '16 at 17:42
• @JoãoPedro Yes but you know that $x=y$ . This is one of the conditions .. – user252450 Jan 9 '16 at 17:43