Finding the maximum and minimum of $2x-y-5z=k$

Problem: Find the maximum and minimum of $$2x-y-5z$$ about $$x,y,z \in \mathbb R$$ that satisfy

Conditions

$$x^2+y^2+z^2=9$$ $$x-y-z=1$$ $$2x+y+2z\ge0$$

I can solve the problem without the third condition(inequality), and I have a solution that uses the theorm of Separation of the roots of quadratic equations. I want to find other possible solutions.

I tried Lagrange multiplier, and stuck here:

$$4+\lambda(2x-2)+\alpha=0$$ $$-1+\lambda(4x-2z+2)+3\alpha=0$$.

• Long time no see! Eveeyone. – KYHSGeekCode Nov 11 '18 at 11:40
• Kuhn-Tucker Lagrange is your friend. Working on an answer down below. – Rebellos Nov 11 '18 at 11:45

Formulating the problem a bit better, you have :

Find the maximum and minimum of $$f(x,y,z) = 2x-y-5z$$ over the set of restrictions : $$S = \{(x,y,z) \in \mathbb R^3 : x^2 + y^2 + z^2 = 9, \; x-y-z = 1, \; 2x+y+2z \geq 0\}$$

Recall that one of the most important Lagrange Multiplier methods is the Kuhn-Tucker Lagrange method. The KTL method calculates the total minimum of a function. To yield the maximum from the function $$f(x,y,z)$$, simply take the function $$-f(x,y,z)$$.

Thus, naming our role functions :

$$f_0(x,y,z) = f(x,y,z) = 2x-y-5z, \; \; f_1(x,y,z) = x^2+y^2+z^2-9$$

$$f_2(x,y,z) = x-y-z-1, \; \; f_3(x,y,z) = -2x-y-2z$$

You are now called to solve the system :

$$\begin{cases}\nabla f_0 + \lambda_1\nabla f_1 + \lambda_2 \nabla f_2 + \lambda_3\nabla f_3 & = 0 \\ \lambda_1f_1 & =0 \\ \lambda_2 f_2 & = 0 \\ \lambda_3f_3 & = 0 \end{cases}$$

$$\implies$$

$$\begin{cases} \begin{bmatrix}2\\-1\\-5\end{bmatrix} + \lambda_1\begin{bmatrix}2x\\2y\\2z \end{bmatrix} + \lambda_2\begin{bmatrix} 1\\-1\\-1 \end{bmatrix} + \lambda_3\begin{bmatrix} -2\\-1 \\-2\end{bmatrix}& = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \\\lambda_1(x^2+y^2+z^2-9) &= 0\\\lambda_2(x-y-z-1) & = 0 \\\lambda_3(-2x-y-2z) &= 0\end{cases}$$

Now, yield cases for $$\lambda_1, \lambda_2, \lambda_3 = 0 \; \text{or} \; \neq 0$$ or any combination of them, taking into account possibilities for $$x,y,z = 0 \; \text{or} \; \neq 0$$ too. You will then find some possible minimum points. The point for which the value of $$f_0$$ will be the smaller will be your minimum point.

You can carry on the same procedure for the maximum of the function.

Note that this is an algorithmic method that can be carried out computationally of course, as a programm.

• Thanks! I could find max=10 when $\lamda$s all are not 0, and I'll try the computational method someday. – KYHSGeekCode Nov 11 '18 at 12:36