Ma · Mathematics

Maximize xy Subject to x² + xy + y² = 1

Updated 13 October 2026

At a glance

  1. 1. Use a square inequality

    Since (x − y)² ≥ 0, we have x² + y² ≥ 2xy.

  2. 2. Apply the constraint

    Substitute the constraint to get 1 ≥ 3xy, so xy ≤ 1/3.

  3. 3. Check equality

    Equality requires x = y; the constraint then gives x = y = ±1/√3.

  4. 4. Verify the maximum

    Both equality cases are feasible, so the upper bound is attained.

Interpreting the constraint as x2+xy+y2=1x^2+xy+y^2=1, you can find the maximum of f(x,y)=xyf(x,y)=xy with a one-line inequality. The key is to use a square that is always nonnegative, then check when equality occurs.

A direct proof of the maximum

For every pair of real numbers xx and yy,

(x−y)2≥0.(x-y)^2\ge 0.

Expanding and rearranging gives

x2+y2≥2xy.x^2+y^2\ge 2xy.

Now use the constraint to replace x2+y2x^2+y^2 with 1−xy1-xy:

1−xy≥2xy.1-xy\ge 2xy.

Therefore,

xy≤13.xy\le \frac{1}{3}.

This proves that no feasible pair can give a value larger than 1/31/3. To show that this bound is the actual maximum, find a feasible pair that reaches it. Equality in the square inequality holds when x=yx=y. Substituting y=xy=x into the constraint gives 3x2=13x^2=1, so

x=y=13orx=y=−13.x=y=\frac{1}{\sqrt{3}}\quad\text{or}\quad x=y=-\frac{1}{\sqrt{3}}.

At either point, xy=1/3xy=1/3. Thus the maximum is 1/31/3, attained at both points.

Check the equality cases

For the positive choice, x=y=1/3x=y=1/\sqrt{3}, the constraint evaluates to

13+13+13=1,\frac{1}{3}+\frac{1}{3}+\frac{1}{3}=1,

and the objective is xy=1/3xy=1/3. For the negative choice, x=y=−1/3x=y=-1/\sqrt{3}, the squared terms are still 1/31/3 each and the product is still 1/31/3, so this point also satisfies the constraint and reaches the bound.

The two points matter: the objective depends on the product, so changing both signs leaves xyxy unchanged. The constraint also remains satisfied because its three terms are all unchanged when both variables change sign.

Lagrange multiplier check

The inequality proves the global upper bound directly. You can also check the possible extrema with Lagrange multipliers. Let f(x,y)=xyf(x,y)=xy and g(x,y)=x2+xy+y2g(x,y)=x^2+xy+y^2. At a constrained stationary point,

∇f=λ∇g,\nabla f=\lambda\nabla g,

so

y=λ(2x+y),x=λ(x+2y).y=\lambda(2x+y),\qquad x=\lambda(x+2y).

Subtracting the second equation from the first gives (1+λ)(y−x)=0(1+\lambda)(y-x)=0. There are two cases. If y=xy=x, the constraint gives x=y=±1/3x=y=\pm1/\sqrt{3} and xy=1/3xy=1/3. If λ=−1\lambda=-1, the first equation implies y=−xy=-x; the constraint then gives x=±1x=\pm1, y=∓1y=\mp1, and xy=−1xy=-1.

The constraint describes a closed, bounded ellipse, so the objective has a largest and a smallest value on it. The multiplier check finds the maximum 1/31/3 and the minimum −1-1. It also shows why the points with opposite signs, although they give a product with larger absolute value, are not the maximum.

Common mistakes

  • Choosing the product with the largest absolute value. The question asks for the largest value, not the largest magnitude. The value −1-1 is smaller than 1/31/3.
  • Dropping the xyxy term in the constraint. The equation is not x2+y2=1x^2+y^2=1; it is x2+xy+y2=1x^2+xy+y^2=1.
  • Checking only one equality point. Both (1/3,1/3)(1/\sqrt{3},1/\sqrt{3}) and (−1/3,−1/3)(-1/\sqrt{3},-1/\sqrt{3}) attain the maximum.
  • Stopping after finding an upper bound. A bound alone does not prove it is the maximum. You must also show that a feasible pair attains it.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.