Why Careful Algebra Matters
The Lagrange multiplier rule turns a constrained optimization problem into a system of equations. Solving that system is often the most delicate part of the method. A division by a coordinate, a multiplier, or a polynomial expression can quietly remove a valid solution. Multiplying by an expression that might be zero can create a false one.
The safe approach is to preserve the original equations, identify every factor that might vanish, and consider its zero case before dividing. Once the algebra is complete, substitute each proposed candidate back into the original system.
The Equations and Their Conditions
For a differentiable objective \(f(x,y)\) and a differentiable equality constraint \(g(x,y)=c\), a constrained local extremum at a feasible point where \(\nabla g\ne\mathbf{0}\) must satisfy the Lagrange equations \(\nabla f=\lambda\nabla g\), together with the constraint. Here \(\lambda\) is an unknown real number. The nonzero-gradient condition is important: at a singular feasible point, this rule need not capture an extremum, so such points must be checked separately.
These are equations in \(x\), \(y\), and \(\lambda\). When \(f\) and \(g\) are polynomials, the equations are polynomial too. But a polynomial equation such as \(x(y-\lambda)=0\) does not say that \(y-\lambda=0\): it permits either factor to be zero.
A Reliable Algebraic Routine
Before manipulating a Lagrange system, keep a copy of its original equations and constraint. Then work through the possible zero cases systematically. This simple discipline makes it easier to see exactly which assumptions justify each step.
Include every multiplier equation and the original constraint. Do not replace the system with an equation obtained by dividing before checking the divisor.
Check \(\lambda=0\) and any coordinate or factor that appears as a multiplier in an equation. The constraint may rule out some of these cases, but that must be shown.
After establishing that a divisor is nonzero in a branch, divide there. If an equation factors, follow each factor branch that has not already been excluded.
Substitute each candidate into the original constraint and multiplier equations. Then compare objective values if the task is to find extrema.
The routine does not require avoiding division altogether. It requires keeping track of where division is valid. In particular, the constraint can supply useful information: if it implies \(xy\ne0\), then dividing by \(x\) or \(y\) is valid for every feasible point.
Worked Example: A Zero-Multiplier Branch
Worked Example: A Zero-Multiplier Branch
Find the constrained stationary candidates for \(f(x,y)=x^2y\) on the circle \(x^2+y^2=1\), and compare their objective values. The constraint gradient is \((2x,2y)\), which is nonzero everywhere on this circle.
The gradients are \(\nabla f=(2xy,x^2)\) and \(\nabla g=(2x,2y)\). Thus the system is
First take the branch \(\lambda=0\). The second equation gives \(x^2=0\), so \(x=0\). The constraint then gives \(y^2=1\), hence \(y=1\) or \(y=-1\). Both candidates satisfy the first equation, and \(f(0,1)=f(0,-1)=0\).
Now take \(\lambda\ne0\). The first equation can be written \(2x(y-\lambda)=0\), so it has two possible branches. The branch \(x=0\) is impossible here: the second equation would give \(0=2\lambda y\), and the constraint gives \(y=\pm1\), forcing \(\lambda=0\), contrary to this case. On the remaining branch \(x\ne0\), divide the first equation by \(2x\) to obtain \(\lambda=y\). Substituting this into the second equation gives \(x^2=2y^2\). With the constraint,
Therefore \(y=\pm1/\sqrt{3}\), and \(x=\pm\sqrt{2/3}\), with the signs independent. For each of these four candidates, \(\lambda=y\), and the objective value is
For a check, \(x^2+y^2=2/3+1/3=1\). Also, with \(\lambda=y\), the first multiplier equation becomes \(2xy=2yx\), and the second becomes \(2y^2=2y^2\). The two zero-multiplier candidates satisfy the original equations as well. The circle is compact, so a global maximum and minimum exist; comparing the candidate values shows that the maximum is \(2/(3\sqrt{3})\) and the minimum is \(-2/(3\sqrt{3})\).
Worked Example: When the Constraint Makes Division Safe
Worked Example: When the Constraint Makes Division Safe
Find the stationary candidates for \(f(x,y)=x^2+y^2\) subject to \(x^2y^2=1\). In this case, the constraint itself ensures that neither coordinate is zero.
Let \(g(x,y)=x^2y^2\). The equations are
The constraint implies \(x\ne0\) and \(y\ne0\). Dividing the first equation by \(2x\) and the second by \(2y\) is therefore valid for every feasible point. The reduced equations are
In particular, \(\lambda\ne0\). Equating the two expressions for \(\lambda\), with \(x,y\ne0\), gives \(x^2=y^2\). Using the constraint then gives \(x^4=1\), so \(x^2=1\) and \(y^2=1\). The four candidates are \((1,1)\), \((1,-1)\), \((-1,1)\), and \((-1,-1)\). At each one, \(\lambda=1\).
Check the original equations: \(2\lambda xy^2=2x\) and \(2\lambda yx^2=2y\), because \(\lambda=x^2=y^2=1\). The constraint also holds at all four points. Each has \(f=2\). These are global minima because
There is no global maximum: the feasible points \((t,1/t)\), for \(t\ne0\), have objective \(t^2+1/t^2\), which grows without bound as \(t\) grows. The Lagrange calculation identifies stationary candidates; it does not, by itself, promise a maximum on a noncompact constraint.
Worked Example: Following Both Factor Branches
Worked Example: Following Both Factor Branches
Return to \(f(x,y)=x^2y\) on \(x^2+y^2=1\), but now focus on the factored equation rather than beginning with \(\lambda=0\). This illustrates why both branches of a product equation must be considered.
The first multiplier equation factors as
The first branch is \(x=0\). The constraint gives \(y=\pm1\); the second multiplier equation, \(x^2=2\lambda y\), then gives \(\lambda=0\). Thus this branch contributes \((0,1,0)\) and \((0,-1,0)\), where the entries are \(x,y,\lambda\). Substitution into both multiplier equations verifies them.
The second branch is \(y=\lambda\). Substitute this into the second multiplier equation and the constraint:
Adding the information gives \(3y^2=1\), so \(y=\pm1/\sqrt3\) and \(x=\pm\sqrt{2/3}\). Here too the signs of \(x\) and \(y\) can be chosen independently, and \(\lambda=y\). Substitution gives \(2xy=2yx\) in the first equation and \(x^2=2y^2=2\lambda y\) in the second. The constraint is \(2/3+1/3=1\). Thus the factor branches recover exactly the candidates found in the previous example.
A branch may overlap another branch. In this example, \(x=0\) and \(y=\lambda\) together would require \(y=0\), which violates the constraint. Overlap is harmless; failing to examine a branch is not.
Clearing Denominators Without Changing the Solution Set
Sometimes solving a multiplier equation for \(\lambda\) produces a fraction. Cross-multiplying can simplify the system, but it is safe only when the denominators are known to be nonzero. For example, from \(\lambda=1/x\) and \(\lambda=1/y\), equating the fractions gives \(y=x\) only if \(x\ne0\) and \(y\ne0\). If those facts have not been established, the fraction equations do not even describe cases where a denominator vanishes.
More generally, the equations \(A/B=C/D\) and \(AD=BC\) are equivalent only when \(B\ne0\) and \(D\ne0\). If you multiply an equation by a variable expression that might be zero, the multiplied equation can also hold when the original equation does not. Always retain the original system for the final check.
A Common Mistake and Its Correction
In the first example, a tempting shortcut is to divide \(2x(y-\lambda)=0\) by \(2x\) and conclude \(y=\lambda\). That calculation silently assumes \(x\ne0\). It therefore discards the candidates \((0,1,0)\) and \((0,-1,0)\), whose objective value is zero.
The correction is to write down both branches first: \(x=0\) or \(y=\lambda\). Solve the \(x=0\) branch using the constraint and the other multiplier equation. Only then solve \(y=\lambda\), dividing by \(x\) only within a case where \(x\ne0\) has been established. This procedure prevents an algebraic shortcut from being mistaken for an equivalent transformation of the whole system.
From Stationary Points to Extrema
Solving the Lagrange equations gives candidates under the regularity condition; it does not automatically decide which candidates are maxima or minima. If the feasible set is compact, a continuous objective attains both a maximum and a minimum, and regular constrained extrema must appear among the candidates. If the feasible set is not compact, extrema may fail to exist. In either setting, compare the objective values at all relevant candidates and separately consider any singular feasible points that do not meet the gradient condition.
The algebraic checklist is therefore part of the mathematical argument, not mere bookkeeping. A missing zero branch can change an extremum, and an unjustified division can make a candidate list incomplete. Explicit cases and substitution checks make the conclusion reliable.
Check Your Understanding
For each question, identify which algebraic condition must be checked before drawing a conclusion.
- In a system containing \(x(y-\lambda)=0\), what cases must be examined?
- When is it valid to divide a multiplier equation by \(x\)?
- What does the constraint \(x^2y^2=1\) tell you about the coordinates?
- What must be verified after clearing denominators and solving the resulting system?
- Why does solving the Lagrange equations not guarantee that a global maximum exists?