# How would you approach this type of System of Equations? Could you give me a solid method to approach these?

$$\left\{ \begin{array}{c} y+2\lambda x=0 \\ x+2z+2\lambda y=0 \\ 2y+2\lambda z=0 \\ x^2+y^2+z^2-1=0 \end{array} \right.$$

And yeah the problem is to find maximum and minimum for the function:

$$f(x,y,z)=xy+2yz$$

with the constraint being the unit sphere.

• Not commenting on the system of equations, but I would ask myself: Would it be easier to work in spherical coordinates? – Matti P. Oct 22 '19 at 10:48
• Why not use a symbolic solver? – Rodrigo de Azevedo Oct 22 '19 at 10:50
• @RodrigodeAzevedo Not allowed in the test, but I think the equations will be easier in the test. I just want to know a solid step-by-step method in general to solve these? – MatiasC Oct 22 '19 at 10:59
• @MattiP. Oh that's true never thought of it! – MatiasC Oct 22 '19 at 11:04

The first three equations lead to the fact that the matrix $$\begin{bmatrix} y & x\\ x+2z & y\\ 2y & z \end{bmatrix}$$ has rank one. (There is an obvious linear combination of the columns with scalars $$1$$, $$2\lambda$$ giving zero as a result.) We get the vanishing of some determinants, in particular $$2y^2 = 2x(x+2z)=z(x+2z)\ .$$ The last equality gives $$(2x-z)(x+2z)=0$$, so either $$2x=z$$, or $$x=-2z$$.

• For $$z=2x$$ we get $$y^2=5x^2$$, so the point on the sphere is $$(x,\pm x\sqrt 5,2x)$$, and we obtain $$x=\pm1/\sqrt {10}$$.
• For $$x=-2z$$ we get $$y^2=0$$, so the point on the sphere is $$(-2z,0,z)$$, and we obtain $$z=\pm1/\sqrt 5$$.

A check using sage:

sage: var('x,y,z,t');
sage: F = x*y + 2*y*z - t*(x^2+y^2+z^2-1);
sage: solve( [diff(F, u) == 0 for u in (x,y,z,t)], [x,y,z,t], solution_dict=True )
[{t: -1/2*sqrt(5), z: -1/5*sqrt(10), y: 1/2*sqrt(2), x: -1/10*sqrt(10)},
{t: 1/2*sqrt(5), z: -1/5*sqrt(10), y: -1/2*sqrt(2), x: -1/10*sqrt(10)},
{t: -1/2*sqrt(5), z: 1/5*sqrt(10), y: -1/2*sqrt(2), x: 1/10*sqrt(10)},
{t: 1/2*sqrt(5), z: 1/5*sqrt(10), y: 1/2*sqrt(2), x: 1/10*sqrt(10)},
{t: 0, z: 1/5*sqrt(5), y: 0, x: -2/5*sqrt(5)},
{t: 0, z: -1/5*sqrt(5), y: 0, x: 2/5*sqrt(5)}]


Using the second equation to get $$x=-2z-2\lambda y$$ plugging this in the first equation to get $$y(1-4\lambda^2)-4\lambda z=0$$ and from the third equation we get $$-z\lambda(1-4\lambda^2)-4\lambda z=0$$ so we have $$z(\lambda(1-4\lambda^2)+4\lambda)=0$$ and you will obtain $$z(\lambda(1-4\lambda^2)+4\lambda)=0$$ so $$z=0$$ or $$\lambda(1-4\lambda^2)+4\lambda=0$$ Can you proceed?

• Yeah, thanks! I started by evaluating x,y,z with respect to lambda and the resulting equation when plugged into the unit sphere equation wasn't very solvable. – MatiasC Oct 22 '19 at 11:20

As I understood you where using the lagrange multipliers technique. In problems like the actual which is homogeneous we can choose another approach.

Making $$y = \lambda x, z = \mu x$$ we have the equivalence

$$\max/\min_{x,y,z} xy+2yz, \ \ \text{s. t.}\ \ \ x^2+y^2+z^2=1\Rightarrow\max/\min_{\lambda,\mu}\frac{\lambda(1+\mu)}{1+\lambda^2+\mu^2}$$