Why Substitute Along an Edge?
A straight boundary edge in the plane is often described by a linear equality such as \(ax+by=c\). On that edge, \(x\) and \(y\) are not independent: choosing one coordinate determines the other. Substituting the equality into an objective function turns the boundary search into a one-variable problem.
This is useful when finding absolute extrema on a region whose boundary includes straight segments. The restriction to each segment must be checked on its own feasible interval. Its candidates are interior stationary points of the restricted function, together with the segment’s endpoints.
Set Up the Boundary Substitution
Assume \((a,b)\ne(0,0)\), so \(ax+by=c\) describes a line. If \(b\ne0\), solve for \(y\):
If the objective is \(f(x,y)\), define its restriction to this line by
The segment does not usually include every point on the line. Its geometric or other boundary conditions determine a feasible interval \(L\le x\le U\). The boundary calculation concerns \(g\) only on that interval.
If \(b=0\), then \(a\ne0\) and the constraint fixes \(x=c/a\). In this case use \(y\) as the parameter and define \(g(y)=f(c/a,y)\). This avoids dividing by zero. The same principle applies when a different parameter gives a simpler interval.
For a closed segment, the parameter interval is closed and bounded. If \(f\) is continuous on the segment, the restricted function is continuous on that interval and attains both an absolute maximum and an absolute minimum. If, in addition, the restriction is differentiable in the interval’s interior, any interior point where an extremum occurs must have derivative zero. Thus the full edge candidate list consists of the stationary points in the interval’s interior and both endpoints.
Why the One-Variable Test Works
The key step is the chain rule. When \(y=(c-ax)/b\), changing \(x\) along the edge also changes \(y\). Therefore the derivative along the edge is not simply the partial derivative \(f_x\). It includes the effect of the changing \(y\)-coordinate.
Use \(\mathbf{r}(x)=(x,(c-ax)/b)\) for \(b\ne0\).
The boundary function is \(g(x)=f(\mathbf{r}(x))\).
The chain rule gives \(g'(x)=f_x(\mathbf{r}(x))-(a/b)f_y(\mathbf{r}(x))\).
Find interior solutions of \(g'(x)=0\), evaluate \(g\) there and at both endpoints, and compare the values.
Here is the justification for the candidate rule. Let \(g\) be continuous on \([L,U]\) and differentiable on \((L,U)\). Continuity on the closed bounded interval guarantees that \(g\) attains its absolute extrema. If an extremum occurs at an interior point \(x_0\), then it is also a local extremum of the differentiable one-variable function \(g\), so Fermat’s theorem gives \(g'(x_0)=0\). If it does not occur in the interior, it must occur at \(L\) or \(U\). Therefore comparing the function values at the interior stationary points and endpoints finds the absolute extrema on the segment.
The derivative formula in Step 3 follows directly from composition. Since \(y(x)=(c-ax)/b\), we have \(dy/dx=-a/b\). Applying the chain rule to \(g(x)=f(x,y(x))\) yields \(g'(x)=f_x+f_y(dy/dx)=f_x-(a/b)f_y\), with both partial derivatives evaluated at \((x,y(x))\).
Worked Example: A Slanted Edge With an Interior Minimum
Worked Example: A Slanted Edge With an Interior Minimum
Find the absolute extrema of \(f(x,y)=x^2+2y^2\) on the segment \(x+2y=6\), \(0\le x\le6\), \(y\ge0\).
Since the coefficient of \(y\) is nonzero, solve the equality for \(y\):
As \(x\) runs from \(0\) to \(6\), \(y\) runs from \(3\) to \(0\), so the whole segment is represented by \(0\le x\le6\). Substitute into the objective:
Differentiate and solve for interior stationary points:
This point is in the interval. Its coordinates are \(y=(6-2)/2=2\), and its value is \(f(2,2)=2^2+2(2^2)=4+8=12\). At the endpoints, \(x=0\) gives \(y=3\) and \(f(0,3)=0+18=18\); \(x=6\) gives \(y=0\) and \(f(6,0)=36+0=36\). Comparing \(12\), \(18\), and \(36\), the minimum on the segment is \(12\) at \((2,2)\), and the maximum is \(36\) at \((6,0)\).
As a check, substituting \((2,2)\) into the constraint gives \(2+2(2)=6\). Substituting either endpoint gives \(0+2(3)=6\) or \(6+2(0)=6\), respectively. All listed points lie on the edge.
Worked Example: Equal Endpoint Values
Worked Example: Equal Endpoint Values
Find the absolute extrema of \(f(x,y)=(x-\frac32)^2+(y-2)^2\) on the segment \(2x+y=5\), \(1\le x\le2\).
Solving the equality for \(y\) gives \(y=5-2x\). At the interval endpoints, \(y=3\) and \(y=1\), so the specified \(x\)-interval represents the segment. The restricted function is
Differentiate each term:
The only stationary point satisfies \(10x-15=0\), so \(x=3/2\), which lies in \((1,2)\). Its other coordinate is \(y=5-2(3/2)=2\), and the function value is \(g(3/2)=0\).
At \(x=1\), \(y=3\), so \(g(1)=(-1/2)^2+1^2=1/4+1=5/4\). At \(x=2\), \(y=1\), so \(g(2)=(1/2)^2+(-1)^2=1/4+1=5/4\). Thus the minimum is \(0\) at \((3/2,2)\), and the maximum is \(5/4\) at both endpoints, \((1,3)\) and \((2,1)\).
The endpoint tie is valid: distinct points on an edge can have the same objective value. Substitution checks the stationary point against the constraint: \(2(3/2)+2=5\). The endpoints also satisfy \(2(1)+3=5\) and \(2(2)+1=5\).
When the Constraint Fixes One Coordinate
If \(b=0\), do not use the formula that divides by \(b\). Instead, solve \(ax=c\) for the fixed coordinate and let \(y\) vary over the edge interval. This is the same one-variable method, with the parameter chosen to suit the geometry.
Worked Example: A Horizontal Edge With Several Candidates
Find the absolute extrema of \(f(x,y)=x^3-3x+y\) on the segment \(2y=4\), \(-2\le x\le2\).
The equality gives \(y=2\), while \(x\) is the parameter on the interval \([-2,2]\). The restricted function and its derivative are
The interior stationary points are \(x=-1\) and \(x=1\). Evaluate the restriction at both and at the endpoints:
Therefore the minimum is \(0\), attained at \((-2,2)\) and \((1,2)\), and the maximum is \(4\), attained at \((-1,2)\) and \((2,2)\). Each point has \(y=2\), so it satisfies \(2y=4\); every \(x\)-coordinate is in the given interval.
A Common Chain-Rule Mistake
For the first example, substituting \(y=(6-x)/2\) into \(f=x^2+2y^2\) gives \(g(x)=x^2+(6-x)^2/2\). A common error is to differentiate the original objective as if \(x\) and \(y\) were independent, then set \(f_x+f_y=0\). This gives \(2x+4y=0\), which is not the derivative along the edge. In fact, substituting \(y=(6-x)/2\) into that incorrect equation gives \(2x+12-2x=12=0\), an impossible equation.
The correction is to include the rate at which \(y\) changes with \(x\):
Substituting \(y=(6-x)/2\) gives \(g'(x)=2x-(6-x)=3x-6\), so the correct stationary point is \(x=2\). Along a constraint, the coordinates move together; the derivative must measure the change in the objective along that motion.
Using Edge Candidates in an Extrema Search
An edge calculation answers only the question of extrema on that edge. In an absolute-extrema search over a whole region, compare the candidates from every boundary piece, as well as any required interior candidates. An endpoint shared by two edges is still just a point of the region; listing it twice does not change the comparison.
When the restricted derivative has no zero in the open parameter interval, the endpoints still must be evaluated. When it is identically zero, the restricted function is constant on the segment, so every point on that segment has the same value and evaluating an endpoint gives that value. A stationary point outside the feasible interval is not a candidate on the segment.
Keep the candidate values exact when possible. Fractions and radicals can be compared without introducing rounding errors; decimal approximations are useful only when exact comparison is inconvenient. In every case, the coordinates associated with a parameter value should be recovered from the constraint before reporting the point.
Check Your Understanding
Use the edge-substitution method to answer these questions.
- For the line \(3x+2y=8\), solve for \(y\) in terms of \(x\), and state the derivative of \(y\) with respect to \(x\).
- If the segment on \(3x+2y=8\) has \(1\le x\le2\), what is the corresponding range of \(y\)?
- Why must both endpoints be checked even if the restricted derivative has no zero in the interval’s interior?
- On the horizontal segment \(y=1\), \(-1\le x\le2\), find the stationary points of \(f(x,y)=x^3-3x+y\). Which of them lie in the interval?
- What is wrong with setting \(f_x+f_y=0\) to find stationary points along a slanted edge?