Tutorials › Calculus III › Coordinate Products with Fixed Sum and Sum of Squares

Lagrange Multipliers · Tutorial 475 of 999

Coordinate Products with Fixed Sum and Sum of Squares

Learn how the two constraints determine the feasible parameter range and how the multiplier equations identify and compare every possible extremum of the coordinate product.

Intermediate 10 min read

What You'll Learn

  • Determine exactly which values of the fixed sum and sum of squares are feasible.
  • Apply the two-constraint Lagrange equations and identify when they are valid.
  • Use permutation symmetry to reduce the candidates to triples with two equal coordinates.
  • Compute and compare the product values at every candidate.
  • Handle the single-point constraint and avoid losing solutions when subtracting multiplier equations.

Why these constraints determine more than a plane

Fix the sum \(x+y+z=s\) and the sum of squares \(x^2+y^2+z^2=q\), where \(s\) and \(q\) are real constants. The first condition describes a plane in three-dimensional space; the second describes a sphere when \(q\geq 0\). Their intersection is usually a circle. We will find the least and greatest possible values of the product \(xyz\) on that intersection.

The constraints and the product are unchanged when the coordinates are permuted. That symmetry will matter: the multiplier equations imply that every extremum in the regular case has at least two equal coordinates. We must still check the degenerate case separately, rather than assume the usual multiplier rule applies everywhere.

Definition: For fixed real \(s\) and \(q\), the feasible set is \(\{(x,y,z)\in\mathbb R^3:x+y+z=s,\;x^2+y^2+z^2=q\}\). The objective is the function \(f(x,y,z)=xyz\).

First determine when the constraints are feasible

Write \(m=s/3\), the average of the coordinates. Expanding the sum of squared deviations gives

$$ (x-m)^2+(y-m)^2+(z-m)^2 =x^2+y^2+z^2-\frac{s^2}{3} =q-\frac{s^2}{3}. $$

The left-hand side is nonnegative, so feasibility requires \(q\geq s^2/3\). This condition is also sufficient. If it holds, define \(d=\sqrt{(q-s^2/3)/6}\). The triple \((m+d,m+d,m-2d)\) has sum \(3m=s\), and its sum of squares is \(3m^2+6d^2=q\).

Feasibility condition: The constraints have a real solution exactly when \(q\geq s^2/3\). If \(q=s^2/3\), the only feasible point is \((s/3,s/3,s/3)\). If \(q>s^2/3\), the feasible set is a circle.

For \(q>s^2/3\), the feasible set is closed and bounded: it is the intersection of the plane \(x+y+z=s\) with the sphere of radius \(\sqrt q\). A continuous function on a nonempty closed bounded set attains both its minimum and maximum. Thus \(xyz\) has extrema, and the two-constraint Lagrange multiplier rule can locate them provided the constraint gradients are independent.

The two-multiplier equations

Set \(g(x,y,z)=x+y+z\) and \(h(x,y,z)=x^2+y^2+z^2\). Their gradients are \(\nabla g=(1,1,1)\) and \(\nabla h=(2x,2y,2z)\). These gradients are dependent exactly when \(x=y=z\). On the feasible set, that happens only when \(q=s^2/3\). Therefore, for \(q>s^2/3\), every extremum satisfies \(\nabla f=\lambda\nabla g+\mu\nabla h\) for some real multipliers \(\lambda,\mu\).

Since \(\nabla f=(yz,xz,xy)\), the three coordinate equations are

$$ yz=\lambda+2\mu x,\qquad xz=\lambda+2\mu y,\qquad xy=\lambda+2\mu z. $$

Subtracting the first two equations gives \(z(y-x)=2\mu(x-y)\), or \((x-y)(z+2\mu)=0\). Subtracting the second and third gives \((y-z)(x+2\mu)=0\). These factored equations retain the cases in which coordinates are equal; dividing by a coordinate difference without checking whether it is zero would not be valid.

Why at least two coordinates must agree

Suppose, for contradiction, that \(x,y,z\) are all distinct at a multiplier candidate. Then \(x-y\ne 0\) and \(y-z\ne 0\), so the two factored equations force \(z=-2\mu\) and \(x=-2\mu\). That gives \(x=z\), contradicting the assumption that all three coordinates are distinct. Hence every multiplier candidate has at least two equal coordinates.

Conclusion from the multiplier equations: When \(q>s^2/3\), every global extremum is a permutation of a triple \((a,a,b)\). This conclusion identifies the candidate form; the constraints and a comparison of product values are still needed to determine the extrema.

The reduction respects permutation symmetry. If \((a,a,b)\) is feasible, then each permutation of its coordinates is feasible and has the same product \(a^2b\). Thus it is enough to calculate the candidate values for the two possible branches for \(a\), not to list every ordering separately.

Find and compare every candidate value

For a triple \((a,a,b)\), the constraints give \(2a+b=s\), so \(b=s-2a\). Substituting this into the sum-of-squares condition yields

$$ 2a^2+(s-2a)^2=q, \qquad 6a^2-4sa+s^2-q=0. $$

Solving this quadratic gives \(a=s/3\pm d\), where \(d=\sqrt{(3q-s^2)/18}>0\). The corresponding values of \(b=s-2a\) are \(s/3\mp2d\). Put \(m=s/3\). The two candidate products are therefore

$$ P_{\mathrm{low}}=(m+d)^2(m-2d), \qquad P_{\mathrm{high}}=(m-d)^2(m+2d). $$

Expanding each expression gives

$$ P_{\mathrm{low}}=m^3-3md^2-2d^3, \qquad P_{\mathrm{high}}=m^3-3md^2+2d^3. $$

Since \(d>0\), their difference is \(P_{\mathrm{high}}-P_{\mathrm{low}}=4d^3>0\). Both branches give feasible triples, and every global extremum must be among these candidates. Consequently the lower value is the minimum and the higher value is the maximum.

Result for \(q>s^2/3\): Let \(m=s/3\) and \(d=\sqrt{(3q-s^2)/18}\). The minimum of \(xyz\) is \((m+d)^2(m-2d)\), attained at permutations of \((m+d,m+d,m-2d)\). The maximum is \((m-d)^2(m+2d)\), attained at permutations of \((m-d,m-d,m+2d)\).

Worked Example: A positive fixed sum

Worked Example: A positive fixed sum

Find the minimum and maximum of \(xyz\) when \(x+y+z=6\) and \(x^2+y^2+z^2=18\).

First check feasibility: \(s^2/3=36/3=12\), and \(18>12\), so the constraints give a regular circle. Here \(m=s/3=2\), and \(d=\sqrt{(3q-s^2)/18}=\sqrt{(54-36)/18}=\sqrt1=1\).

The minimum branch has \(a=m+d=3\) and \(b=m-2d=0\), giving the triple \((3,3,0)\) and product \(3\cdot3\cdot0=0\). The maximum branch has \(a=m-d=1\) and \(b=m+2d=4\), giving \((1,1,4)\) and product \(1\cdot1\cdot4=4\).

Check both triples against the constraints. For \((3,3,0)\), the sum is \(3+3+0=6\) and the sum of squares is \(9+9+0=18\). For \((1,1,4)\), the sum is \(1+1+4=6\) and the sum of squares is \(1+1+16=18\). The products are \(0\) and \(4\), respectively, in agreement with the formula and its ordering.

Worked Example: A zero sum

Worked Example: A zero sum

Find the minimum and maximum of \(xyz\) when \(x+y+z=0\) and \(x^2+y^2+z^2=6\).

The feasibility check is \(q=6\geq0=s^2/3\), with strict inequality. Thus \(m=0\), and \(d=\sqrt{(3q-s^2)/18}=\sqrt{18/18}=1\). The two candidate triples are \((1,1,-2)\) and \((-1,-1,2)\).

Their products are \(1\cdot1\cdot(-2)=-2\) and \((-1)\cdot(-1)\cdot2=2\). The first is the minimum and the second is the maximum because the candidate values differ by \(4d^3=4\).

For a direct check, \((1,1,-2)\) has sum \(1+1-2=0\) and sum of squares \(1+1+4=6\). The triple \((-1,-1,2)\) has sum \(-1-1+2=0\) and sum of squares \(1+1+4=6\). Both satisfy the constraints, and their products match the claimed extrema.

Worked Example: The single-point case

Worked Example: The single-point case

Find the product when \(x+y+z=3\) and \(x^2+y^2+z^2=3\).

Here \(s^2/3=9/3=3=q\), so the feasibility condition holds with equality. The sum of squared deviations from \(m=s/3=1\) is \(q-s^2/3=0\). Each squared deviation must therefore be zero, forcing \(x=y=z=1\). The feasible set is a single point, so the minimum and maximum are both \(xyz=1\cdot1\cdot1=1\).

Check: \(1+1+1=3\), \(1^2+1^2+1^2=3\), and the product is \(1\). No regular-point multiplier argument is needed for this case.

Boundary and exceptional cases

When \(q=s^2/3\), the only feasible triple is \((s/3,s/3,s/3)\), and both extrema equal \((s/3)^3\). The constraint gradients there are \((1,1,1)\) and \((2s/3)(1,1,1)\), so they are dependent. If \(s=0\), the second gradient is the zero vector; the feasible point is \((0,0,0)\), and the product is still determined directly. The multiplier equations for regular points should not be used to justify this single-point case.

If \(q<s^2/3\), there are no feasible triples, so there is no minimum or maximum under the stated constraints. For instance, if \(s=3\) and \(q=2\), then \(q<3=s^2/3\), which rules out feasibility before any multiplier calculation begins.

A common mistake: dividing away the equal-coordinate cases

The subtraction step produces \((x-y)(z+2\mu)=0\), not the unconditional equation \(z+2\mu=0\). Dividing by \(x-y\) assumes \(x\ne y\), and so discards precisely the equal-coordinate cases that include the extrema. In the first worked example, the minimum occurs at \((3,3,0)\), where \(x-y=0\). Dividing by \(x-y\) there is division by zero and cannot be used to derive any conclusion about that candidate.

The correction is to keep the product equal to zero and treat its alternatives: either \(x=y\), or \(z=-2\mu\). Applying this logic to the other subtracted equations shows that three distinct coordinates are impossible, while retaining all cases with equal coordinates. Checking the feasibility condition first and treating the equality case separately completes the argument without losing solutions.

Why the symmetry is useful

Both constraints are symmetric in \(x,y,z\), and so is the product. Permuting a feasible triple preserves its constraint values and objective value. The multiplier equations provide a stronger fact at an extremum: at least two coordinates coincide. Together, these observations reduce an optimization problem on a circle to two candidate product values. Comparing those values—not merely identifying stationary points—is what determines which is the minimum and which is the maximum.

Check Your Understanding

Use the feasibility test before applying the multiplier equations, and keep the equal-coordinate cases when subtracting equations.

  1. For \(s=4\) and \(q=6\), is the feasible set empty, a single point, or a circle?
  2. For \(s=0\) and \(q=8\), calculate \(m\), \(d\), and the two extreme product values.
  3. Why is the two-constraint multiplier rule not used at \(q=s^2/3\)?
  4. What contradiction rules out three distinct coordinates at a regular multiplier candidate?
  5. For \(s=3\) and \(q=2\), explain why no extrema exist under the constraints.