Introduction
A circle is a simple constraint, but optimizing a function on it still requires care. The Lagrange equations may produce points on the coordinate axes, points with both coordinates nonzero, or a whole family of stationary points. Which of these occurs depends on the coefficients of the function.
Here we study a diagonal quadratic function: its squared terms have separate coefficients, and it has no term involving the product \(xy\). The constraint is a circle centered at the origin. We will solve the multiplier equations, check the candidate points, and compare their function values to identify the global extrema.
The Function and the Constraint
Let \(a,b,c\) be real numbers and let \(r>0\). Consider the objective function \(f:\mathbb{R}^2\to\mathbb{R}\) and the constraint \(g(x,y)=0\) defined by
The constant \(c\) shifts every function value by the same amount, so it does not change which points maximize or minimize \(f\). The condition \(r>0\) ensures the constraint is a circle of positive radius. It is closed and bounded, and \(f\) is continuous, so \(f\) attains both an absolute maximum and an absolute minimum on that circle.
At every point on this circle, \(\nabla g(x,y)=(2x,2y)\) is nonzero, because \(r>0\) rules out \(x=y=0\). Thus the regularity condition for the one-constraint Lagrange theorem holds: every constrained extremum satisfies \(\nabla f=\lambda\nabla g\) for some real multiplier \(\lambda\).
Deriving and Solving the Multiplier Equations
The gradients are \(\nabla f=(2ax,2by)\) and \(\nabla g=(2x,2y)\). Therefore the multiplier equations, together with the circle constraint, are
Equivalently, after dividing the first two equations by \(2\),
The product equations must be solved by considering whether each coordinate is zero. The constraint prevents both coordinates from being zero, so every feasible point lies either on an axis or has both coordinates nonzero.
The constraint gives \(x^2=r^2\), so \(x=\pm r\). The first multiplier equation then requires \(\lambda=a\). These are feasible candidates \((r,0)\) and \((-r,0)\).
The constraint gives \(y^2=r^2\), so \(y=\pm r\). The second multiplier equation requires \(\lambda=b\). These are feasible candidates \((0,r)\) and \((0,-r)\).
If \(x\ne0\) and \(y\ne0\), the equations require \(\lambda=a\) and \(\lambda=b\). Such points can exist only if \(a=b\).
In particular, when \(a\ne b\), there are no mixed stationary points: every constrained extremum must be among the four axis points. When \(a=b\), the objective is \(a(x^2+y^2)+c\), which has the same value at every point of the circle. In that case, all feasible points, including mixed points, are stationary.
Comparing the Candidate Values
At either point \((\pm r,0)\), the objective value is \(ar^2+c\). At either point \((0,\pm r)\), it is \(br^2+c\). Since \(r^2>0\), comparing these values gives the complete result.
Why the Comparison Works
The multiplier calculation identifies the required candidates. A second short argument makes the value comparison especially transparent. On the circle, \(x^2+y^2=r^2\), so we can rewrite the objective as
As a feasible point moves around the circle, \(x^2\) ranges from \(0\) to \(r^2\), and both endpoint values occur. If \(a-b>0\), the displayed expression increases as \(x^2\) increases; its largest value occurs at \(x^2=r^2\), and its smallest at \(x^2=0\). If \(a-b<0\), it decreases as \(x^2\) increases, so the endpoints exchange roles. If \(a-b=0\), the expression is \(br^2\) for every feasible point. This proves the claimed maximum and minimum values and explains why they are attained on the axes unless the coefficients are equal.
This argument also confirms why comparing the multiplier candidates is enough here: the axis points attain the extreme possible values, and the formula covers every point on the circle. The general compactness guarantee ensures extrema exist; the explicit comparison identifies them.
Worked Examples
Worked Example: Unequal Coefficients with a Larger \(x^2\) Term
Find the maximum and minimum of \(f(x,y)=5x^2+2y^2\) subject to \(x^2+y^2=9\).
Here \(a=5\), \(b=2\), \(c=0\), and \(r=3\). The multiplier equations are
If \(y=0\), then \(x^2=9\), so \(x=\pm3\); the first equation gives \(\lambda=5\). If \(x=0\), then \(y^2=9\), so \(y=\pm3\); the second equation gives \(\lambda=2\). If both coordinates were nonzero, the equations would require \(\lambda=5\) and \(\lambda=2\) simultaneously, which is impossible.
The values at the two types of candidates are
Both types satisfy the constraint: \(3^2+0^2=9\) and \(0^2+3^2=9\). The multiplier equations also hold at each type with the stated multiplier. Therefore the maximum is \(45\) at \((3,0)\) and \((-3,0)\), and the minimum is \(18\) at \((0,3)\) and \((0,-3)\).
Worked Example: A Negative Coefficient
Find the extrema of \(f(x,y)=-3x^2+4y^2+1\) subject to \(x^2+y^2=4\).
Now \(a=-3\), \(b=4\), \(c=1\), and \(r=2\). The multiplier equations are
On the \(x\)-axis, the constraint gives \(x=\pm2\) and the multiplier is \(\lambda=-3\). On the \(y\)-axis, the constraint gives \(y=\pm2\) and the multiplier is \(\lambda=4\). A mixed point would require both \(\lambda=-3\) and \(\lambda=4\), so there are no mixed candidates.
Evaluate the objective at the candidates:
The points are feasible because \(2^2+0^2=4\) and \(0^2+2^2=4\). Substitution into the multiplier equations gives \(\lambda=-3\) for the first pair and \(\lambda=4\) for the second pair. Thus the minimum is \(-11\) at \((\pm2,0)\), and the maximum is \(17\) at \((0,\pm2)\). The negative coefficient causes no difficulty: it simply makes the \(x\)-axis value the smaller one.
Worked Example: Equal Coefficients and Mixed Points
Find the extrema of \(f(x,y)=2x^2+2y^2-7\) subject to \(x^2+y^2=9\), and check a point with both coordinates nonzero.
The multiplier equations are
For any feasible point, at least one coordinate is nonzero. Its corresponding equation requires \(\lambda=2\). With this value, both multiplier equations hold for every feasible point. Also, directly using the constraint gives
For a mixed-point check, take \(x=y=3/\sqrt{2}\). Its constraint value is
and its objective value is
The point satisfies the multiplier equations with \(\lambda=2\). Since the value is \(11\) everywhere on the circle, both the maximum and minimum are \(11\), attained at every feasible point.
Common Mistake: Dividing Away an Axis
A frequent error is to divide \((a-\lambda)x=0\) by \(x\) and \((b-\lambda)y=0\) by \(y\), then conclude that \(\lambda=a=b\). That division assumes \(x\ne0\) and \(y\ne0\), so it discards every axis candidate before checking whether an axis is possible.
For example, for \(5x^2+2y^2\) on \(x^2+y^2=9\), dividing by both coordinates would suggest that a stationary point requires \(5=2\), and hence that there are no candidates. But \((3,0)\) is feasible and satisfies the multiplier equations with \(\lambda=5\), while \((0,3)\) is feasible and satisfies them with \(\lambda=2\).
Why This Problem Matters
This example shows how the Lagrange equations translate geometry into algebra. The constraint fixes the total \(x^2+y^2\), while the coefficients \(a\) and \(b\) determine which coordinate direction contributes more to the objective. If one coefficient is larger, the larger squared coordinate gives the larger value; if they are equal, the direction makes no difference.
The case analysis is just as important as solving the equations. Product equations can have solutions because a factor is zero, not only because another factor vanishes. Keeping both possibilities in view prevents lost candidates and makes the comparison reliable.
Check Your Understanding
Use the multiplier equations and candidate values to answer these questions.
- For \(f(x,y)=3x^2+y^2\) on \(x^2+y^2=16\), what are the maximum and minimum values, and where are they attained?
- Why can a point with both coordinates nonzero satisfy the multiplier equations only when \(a=b\)?
- What changes in the extrema when \(a<b\) rather than \(a>b\)?
- For \(f(x,y)=4x^2+4y^2+2\) on \(x^2+y^2=25\), what is the common value on the circle?
- Why is it invalid to divide \((a-\lambda)x=0\) by \(x\) before checking whether \(x=0\)?