Answer
The maximum value of $f\left( {x,y,z} \right) = xy + xz + yz - xyz$ subject to the constraint $x+y+z=1$ is $\frac{8}{{27}}$.
Work Step by Step
We have $f\left( {x,y,z} \right) = xy + xz + yz - xyz$ and the constraint $g\left( {x,y,z} \right) = x + y + z - 1 = 0$, for $x \ge 0$, $y \ge 0$, $z \ge 0$.
Step 1. Write out the Lagrange equations
Using Theorem 1, the Lagrange condition $\nabla f = \lambda \nabla g$ yields
$\left( {y + z - yz,x + z - xz,x + y - xy} \right) = \lambda \left( {1,1,1} \right)$
$y + z - yz = \lambda $, ${\ \ }$ $x + z - xz = \lambda $, ${\ \ }$ $x + y - xy = \lambda $
Step 2. Solve for $\lambda$ in terms of $x$ and $y$
Since $x \ge 0$, $y \ge 0$, $z \ge 0$ and $\left( {0,0,0} \right)$ does not satisfy the constraint, we may assume that $x \ne 0$, $y \ne 0$, $z \ne 0$.
From Step 1, we obtain
$\lambda = y + z - yz = x + z - xz = x + y - xy$
From which we obtain three cases:
(1) ${\ \ \ }$ $y + z - yz = x + z - xz$, ${\ \ }$ $x + z - xz = x + y - xy$
(2) ${\ \ \ }$ $y + z - yz = x + z - xz$, ${\ \ }$ $y + z - yz = x + y - xy$
(3) ${\ \ \ }$ $y + z - yz = x + y - xy$, ${\ \ }$ $x + z - xz = x + y - xy$
Step 3. Solve for $x$ and $y$ using the constraint
Case 1. Equation (1)
From the first equation of (1) we obtain
$y - yz = x - xz$
$y - x = \left( {y - x} \right)z$
So, $z=1$.
From the second equation of (1) we obtain
$z - xz = y - xy$
$z - y = \left( {z - y} \right)x$
So, $x=1$.
Substituting $z=1$ and $x=1$ in the constraint $x+y+z-1=0$ gives $y=-1$.
So, the critical point is $\left( {1, - 1,1} \right)$.
Case 2. Equation (2)
From the first equation of (2) we obtain
$y - yz = x - xz$
$y - x = \left( {y - x} \right)z$
So, $z=1$.
From the second equation of (2) we obtain
$z - yz = x - xy$
$z - x = \left( {z - x} \right)y$
So, $y=1$.
Substituting $z=1$ and $y=1$ in the constraint $x+y+z-1=0$ gives $x=-1$.
So, the critical point is $\left( { - 1,1,1} \right)$.
Case 3. Equation (3)
From the first equation of (3) we obtain
$z - yz = x - xy$
$z - x = \left( {z - x} \right)y$
So, $y=1$.
From the second equation of (3) we obtain
$z - xz = y - xy$
$z - y = \left( {z - y} \right)x$
So, $x=1$.
Substituting $y=1$ and $x=1$ in the constraint $x+y+z-1=0$ gives $z=-1$.
So, the critical point is $\left( {1,1, - 1} \right)$.
Case 4.
From Step 1, we obtain
$y + z - yz = \lambda $, ${\ \ }$ $x + z - xz = \lambda $, ${\ \ }$ $x + y - xy = \lambda $
The first and the second equation gives
$y + z - yz = x + z - xz$
$y - yz = x - xz$
$\left( {y - x} \right) - \left( {y - x} \right)z = 0$
$\left( {y - x} \right)\left( {1 - z} \right) = 0$
So, $y=x$ or $z=1$. Note that $z=1$ has been accounted for in Case 1 and Case 2 above.
The first and the third equation gives
$y + z - yz = x + y - xy$
$z - yz = x - xy$
$\left( {z - x} \right) - \left( {z - x} \right)y = 0$
$\left( {z - x} \right)\left( {1 - y} \right) = 0$
So, $z=x$ or $y=1$. Note that $y=1$ has been accounted for in Case 2 and Case 3 above.
Since $y=x$ and $z=x$, we conclude that $x=y=z$.
Substituting $x=y=z$ in the constraint $x+y+z-1=0$ gives
$3x-1=0$
So, $x = \frac{1}{3}$.
Using $x=y=z$, we obtain the critical point $\left( {\frac{1}{3},\frac{1}{3},\frac{1}{3}} \right)$.
Step 4. Calculate the critical values
We evaluate $f$ at the critical points and list them in the following table:
$\begin{array}{*{20}{c}}
{{\rm{Critical{\ }point}}}&{f\left( {x,y,z} \right)}\\
{\left( {1, - 1,1} \right)}&0\\
{\left( { - 1,1,1} \right)}&0\\
{\left( {1,1, - 1} \right)}&0\\
{\left( {\frac{1}{3},\frac{1}{3},\frac{1}{3}} \right)}&{\frac{8}{{27}}}
\end{array}$
From this table, we conclude that the maximum value of $f\left( {x,y,z} \right) = xy + xz + yz - xyz$ subject to the constraint $x+y+z-1=0$ is $\frac{8}{{27}}$.