Let \(g(x,y,z) = x^2 + y^2 + z^2 - 36 = 0\text{.}\) The Lagrange equations \(\nabla f = \lambda \nabla g\) yield:
\begin{align*}
y \amp = 2\lambda x \\
x \amp = 2\lambda y \\
2 \amp = 2\lambda z \implies 1 = \lambda z \\
x^2 + y^2 + z^2 \amp = 36
\end{align*}
Substitute the second equation into the first:
\begin{gather*}
y = 2\lambda(2\lambda y) \implies y = 4\lambda^2 y \implies y(1 - 4\lambda^2) = 0
\end{gather*}
This gives us two cases: either \(y = 0\) or \(4\lambda^2 = 1\text{.}\)
Case 1: \(y = 0\text{.}\) If \(y = 0\text{,}\) then \(x = 2\lambda(0) = 0\text{.}\) Substituting \(x=0\) and \(y=0\) into the constraint gives:
\begin{align*}
0^2 + 0^2 + z^2 \amp = 36 \implies z = \pm 6
\end{align*}
This gives the points \((0,0,6)\) and \((0,0,-6)\text{.}\)
Case 2: \(4\lambda^2 = 1 \implies \lambda = \pm \frac{1}{2}\text{.}\) If \(\lambda = \frac{1}{2}\text{,}\) then \(y = x\) and from the third equation, \(z = \frac{1}{1/2} = 2\text{.}\) Substituting these into the constraint:
\begin{align*}
x^2 + x^2 + 2^2 \amp = 36 \implies 2x^2 = 32 \implies x^2 = 16 \implies x = \pm 4
\end{align*}
This gives the points \((4,4,2)\) and \((-4,-4,2)\text{.}\)
If \(\lambda = -\frac{1}{2}\text{,}\) then \(y = -x\) and \(z = \frac{1}{-1/2} = -2\text{.}\) Substituting into the constraint:
\begin{align*}
x^2 + (-x)^2 + (-2)^2 \amp = 36 \implies 2x^2 = 32 \implies x = \pm 4
\end{align*}
This gives the points \((4,-4,-2)\) and \((-4,4,-2)\text{.}\)
Now evaluate \(f(x,y,z) = xy + 2z\) at all these points:
\begin{align*}
f(0,0,6) \amp = 0 + 12 = 12 \\
f(0,0,-6) \amp = 0 - 12 = -12 \\
f(4,4,2) \amp = 16 + 4 = 20 \\
f(-4,-4,2) \amp = 16 + 4 = 20 \\
f(4,-4,-2) \amp = -16 - 4 = -20 \\
f(-4,4,-2) \amp = -16 - 4 = -20
\end{align*}
The absolute maximum is \(20\) and the absolute minimum is \(-20\text{.}\)