Can someone help me optimize the function
$$f(x,y,z)=x+y+z$$ subject to
$$(y-1)^2 +z^2\leq 1$$
$$x^2 +(y-1)^2 +z^2\leq 3?$$
I was trying to solve by the Kuhn Tucker method and I still don't get it.
Any ideas please?
Thanks in advance.
I provide my preview here. The restrictions are: $$x^2+(y-1)^2+z^2\leq 3\quad \cdots (1)$$ $$(y-1)^2+z^2\leq 1\quad \cdots (2)$$ subtracting the constraint (1) and (2) we obtain: $$x^2\leq 2$$ $$-\sqrt{2}\leq x\leq \sqrt{2}$$ so i guess i have to optimize the function: $$g(y,z)=-\sqrt{2}+y+z$$ but this last part puts me in doubt: should I minimize this function,and in that case, with what restriction should I work?
Optimization of the objective function for the given constraints does not necessarily require Kuhn Tucker method. With some analysis, we can establish that both maxima and minima occur at the intersection of the boundaries. In any case, if we want to solve using KKT method,
I will first substitute $u = x, v = y - 1, w = z$ and rewrite the problem statement as,
Optimize $f(u, v, w) = 1 + u + v + w$ given the conditions,
$g_1 (u, v, w) = u ^2 + v^2 + w^2 \leq 3$ and $g_2(u, v, w) = v^2 + w^2 \leq 1$
So to apply KKT conditions, let's write Lagrange Multiplier equations in standard form. Say we want to maximize the function. Then,
$L(u, v, w) = 1 + u + v + w - \lambda_1 (u^2 + v^2 + w^2 - 3) - \lambda_2 (v^2 + w^2 - 1), \ \lambda_1, \lambda_2 \gt 0$
Differentiating wrt $u, v, w$,
$\begin{align} 1 - 2 \lambda_1 u &= 0 \tag1 \\ 1 - 2 \lambda_1 v - 2 \lambda_2 v &= 0 \tag2 \\ 1 - 2 \lambda_1 w - 2 \lambda_2 w &= 0 \tag3 \\ \end{align}$
and
$\begin{align} \lambda_1 (u^2 + v^2 + w^2 - 3) &= 0 \tag{c1} \\ \lambda_2 (v^2 + w^2 - 1) &= 0 \tag{c2} \\ \end{align}$
Now let's start with the case that both constraints are binding.
From $c1$ and $c2$, $u = \pm \sqrt2$. Then solving $1, 2$ and $3, v = w = \pm \cfrac{1}{\sqrt2}$
$\lambda_1 = \cfrac{1}{2u}, \lambda_2 = \cfrac{1}{2} \left(\cfrac{1}{v} - \cfrac{1}{u} \right)$
As we must have $\lambda_1, \lambda_2 \gt 0$,
$u = \sqrt2, v = w = \cfrac{1}{\sqrt2}$ does indeed satisfy the conditions.
That leads to maximum of $u + v + w + 1 = x + y + z = 2 \sqrt2 + 1$. Also, $x = \sqrt2, y = 1 + \cfrac{1}{\sqrt2}, z = \cfrac{1}{\sqrt2}$
You can similarly minimize the objective function.