= Solution
Use the <Lagrange multiplier> with the sign convention
$$
L(x,\lambda)=3x_1-x_2+2x_3^2+\lambda(x_1^2+x_2^2+x_3-2).
$$
For every $\lambda>0$, this is a <strictly convex> quadratic in $x$, with unique global minimizer
$$
x_1(\lambda)=-\frac3{2\lambda},\qquad x_2(\lambda)=\frac1{2\lambda},\qquad x_3(\lambda)=-\frac\lambda4.
$$
These formulas follow by setting the three partial derivatives of the <optimization Lagrangian> to zero; its <Hessian> is $\operatorname{diag}(2\lambda,2\lambda,4)$, which is <positive-definite>.
Choose $\lambda>0$ to make this minimizer feasible. Its constraint value is $5/(2\lambda^2)-\lambda/4$, so the scalar equation is
$$
\frac5{2\lambda^2}-\frac\lambda4=2,\qquad\text{equivalently}\qquad\lambda^3+8\lambda^2-10=0.
$$
The left side of the first equation is strictly decreasing on $(0,\infty)$, with limits $+\infty$ and $-\infty$. Thus exactly one positive multiplier exists and can be obtained by a bracketed scalar root search. The <Lagrangian sufficiency theorem> proves that its associated feasible point is the global optimum; strict Lagrangian <convexity> makes that optimum unique.
Consequently \b[the unique solution is]
$$
\boxed{x^*=\left(-\frac3{2\lambda},\frac1{2\lambda},-\frac\lambda4\right),\quad\lambda>0,\quad\lambda^3+8\lambda^2-10=0.}
$$
Its objective value is $-5/\lambda+\lambda^2/8$. This <scalar multiplier certificate for a quadratic equality constraint> does not require finding the multiplier in radicals, and does not mistake the nonconvex equality surface for a <convex set>.
Back to article page