Let
\(f(x,y,z) = x + 2y + 3z\text{,}\) \(g(x,y,z) = x - y + z - 1\text{,}\) and
\(h(x,y,z) = x^2 + y^2 - 1\text{.}\) Then,
\(\nabla g = (1, -1, 1)\)
\(\nabla h = (2x, 2y, 0)\)
Setting up the Lagrange multiplier equations:
\(1 = \lambda \cdot 1 + \mu \cdot 2x\)
\(2 = \lambda \cdot (-1) + \mu \cdot 2y\)
\(3 = \lambda \cdot 1 + \mu \cdot 0\)
To solve this system, we can express
\(\lambda\) from the third equation as
\(\lambda = 3\text{.}\) Substituting this into the first two equations gives us:
\(2 = -3 + \mu \cdot 2y\)
From the first equation, we have
\(\mu \cdot 2x = -2\text{,}\) which gives us
\(\mu = -\frac{1}{x}\text{.}\) Substituting this into the second equation gives us:
\(2 = -3 - \frac{2y}{x}\)
Substituting this into the cylinder equation gives us:
\(x^2 + \left(-\frac{5x}{2}\right)^2 = 1\)
\(x^2 + \frac{25x^2}{4} = 1\)
\(x = \pm \frac{2}{\sqrt{29}}\)
Substituting back to find
\(y\) and
\(z\) for both values of
\(x\) gives us
\(y = -\frac{5}{2} \cdot \frac{2}{\sqrt{29}} = -\frac{5}{\sqrt{29}}\) and
\(z = 1 - x + y = 1 \pm \frac{2}{\sqrt{29}} \pm \frac{5}{\sqrt{29}}\)
So
\(z=1 - \frac{7}{\sqrt{29}}\) and
\(z=1 + \frac{7}{\sqrt{29}}\text{.}\)
Now we can evaluate the function at these points:
\(f\left(\frac{2}{\sqrt{29}}, -\frac{5}{\sqrt{29}}, 1 - \frac{7}{\sqrt{29}}\right) = \frac{2}{\sqrt{29}} + 2\left(-\frac{5}{\sqrt{29}}\right) + 3\left(1 - \frac{7}{\sqrt{29}}\right)\)
\(= \frac{2}{\sqrt{29}} - \frac{10}{\sqrt{29}} + 3 - \frac{21}{\sqrt{29}} = 3 - \frac{29}{\sqrt{29}} = 3 - \sqrt{29}\)
\(f\left(-\frac{2}{\sqrt{29}}, \frac{5}{\sqrt{29}}, 1 + \frac{7}{\sqrt{29}}\right) = -\frac{2}{\sqrt{29}} + 2\left(\frac{5}{\sqrt{29}}\right) + 3\left(1 + \frac{7}{\sqrt{29}}\right)\)
\(= -\frac{2}{\sqrt{29}} + \frac{10}{\sqrt{29}} + 3 + \frac{21}{\sqrt{29}} = 3 + \frac{29}{\sqrt{29}} = 3 + \sqrt{29}\)
Comparing the values, we find that the maximum value is
\(3 + \sqrt{29}\) and the minimum value is
\(3 - \sqrt{29}\text{.}\)