Minimum value of $x+4z$ subject to the constraint $x^2+y^2+z^2\leq 2$?

The function $x+4z$ increases most quickly (measured by the increase per unit length) in the direction of the vector $(1,0,4)$ - the coefficients of the monomials. The inequality $x^2+y^2+z^2 \leq 2$ is a solid ball with radius $\sqrt{2}$. So the minimum value of the linear function is on the boundary of the ball in the direction $(1,0,4)$ from the center which has to be a multiple that belongs to the surface, namely $$-\sqrt{\frac{2}{17}} (1,0,4)$$ The minus sign was added to make it a minimum. The opposite point with the plus sign is a maximum. The minimum itself is $-\sqrt{34}$.


This answer is just meant to compare the solutions obtained by Lagrange multipliers versus elimination. Notice in the first that x and z are treated equally until we needed to solve { u = 2, x = 4z }, but in the second x was heavily favored the entire time. In the first, we only dealt with polynomials, but in the second we divided by square roots of 2−xx, so had to deal with much weirder formulas. Generally, the elimination method will rely on simpler rules (one-variable minimization is "easy"), while the Lagrange method will rely on simpler formulas, but require slightly more complicated ideas (normals to hyper-surfaces and such). If you can get your head around why Lagrange multipliers work, then they should be quite a bit simpler to actually compute.

Lagrange multiplier

Minimize C = x + 4z subject to u = xx + yy + zz ≤ 2. If the minimum occurs when u < 2, then the constraint had no effect and can be ignore. So we minimize C over all x, y, z by finding critical points. ∇C = (1,0,4) is never equal to 0, is always defined and continuous, so C has no critical points within the feasible region (or outside it!). Hence the minimum must occur on the boundary, when u = 2. This is then directly a Lagrange multiplier problem: We want ∇C to be a multiple of ∇u = (2x, 2y, 2z). So we set (1,0,4) = λ(2x, 2y, 2z), and read off that y = 0, and z = 4x. One must still have u = 2, so 17xx = 2, and the solution is (x, y, z) = ±(√(2/17), 0, 4√(2/17)) ≈ (0.34, 0, 1.37) with minimum C = −17√(2/17) ≈ −5.83 and maximum C = +17√(2/17) ≈ +5.83.

Elimination of variables

Minimize C = x + 4z subject to u = xx + yy + zz ≤ 2. Again the interior is not relevant, and neither is y, so we can work the smaller problem: Minimize C = x + 4z subject to xx + zz = 2, that is, minimize C(x) = x ± 4√(2−xx). Take derivatives to get C′(x) = 1 ± 4x/√(2−xx), which is 0, precisely when 4x = ±√(2−xx), that is, when 16xx = 2 − xx, that is, when x = ±√(2/17) ≈ 0.34 with minimum C = −17√(2/17) ≈ −5.83 and maximum C = +17√(2/17) ≈ +5.83.


The constraint $x^2 + y^2 + z^2 \le 2$ is equivalent to the constraint $$(x + 4z)^2 + (4x - z)^2 + 17y^2 \le 34$$

and this gives $x + 4z \ge - \sqrt{34}$ with equality when $y = 4x - z = 0$.

The lesson to take away from this argument is that balls are particularly easy to deal with because they can be rotated.