Why Corners Need Their Own Checks
A polygonal region has a boundary made of straight edges that meet at vertices. To find an absolute maximum or minimum of a function on the whole region, it is not enough to look for points where both partial derivatives vanish. An extremum can occur at a vertex even when the gradient is nonzero, because the function is being optimized over the polygon, not over the entire plane.
The boundary edges must also be checked. On the relative interior of an edge, the function can have an extremum as it varies along that edge. The useful strategy is to turn each edge into a one-variable optimization problem, include its endpoints, and compare the resulting values with those at interior critical points.
We will assume that \(f\) is continuous on the polygonal region and differentiable on its interior and along the edges. These conditions ensure that the standard interior and one-variable derivative tests can be used. Because the region is closed and bounded, it is compact; the extreme value theorem then guarantees that \(f\) attains both an absolute maximum and an absolute minimum.
The Candidate Points
Every absolute extremum must occur in one of three places: in the interior, in the relative interior of an edge, or at a vertex. Each location has its own candidate test.
- Interior: At an interior local maximum or minimum of a differentiable function, both first partial derivatives are zero. Solve \(f_x(x,y)=0\) and \(f_y(x,y)=0\), and retain the solutions inside the polygon.
- Edge: Parameterize the edge and differentiate the resulting one-variable function. Check its critical points in the open edge.
- Vertex: Evaluate the function at every vertex. A vertex is an endpoint of two edges, so it must be included even if no edge derivative vanishes there.
For an edge from \(P=(x_0,y_0)\) to \(Q=(x_1,y_1)\), use the parameterization
The restricted function is \(g(t)=f(\mathbf{r}(t))\). Its endpoints, \(t=0\) and \(t=1\), are the vertices \(P\) and \(Q\). Any edge extremum in the open segment \(0<t<1\) must satisfy \(g'(t)=0\).
Why This Candidate Search Is Complete
The candidate principle follows by locating where an attained absolute extremum lies. The argument also explains why the vertex checks cannot be omitted.
The polygonal region is closed and bounded, so it is compact. Continuity of \(f\) implies, by the extreme value theorem, that \(f\) attains an absolute maximum and an absolute minimum on the region.
If an extremum occurs at an interior point, it is also a local extremum on an open neighborhood in the plane. Fermat’s theorem for differentiable functions gives \(f_x=0\) and \(f_y=0\) there.
If the extremum lies in the relative interior of an edge, restrict \(f\) to that edge. The parameter value is an interior local extremum of the one-variable restriction, so its derivative is zero.
If the extremum lies at neither an interior point nor the open part of an edge, it is at a vertex. Thus every possible location is covered by the candidate list.
For the edge case, the chain rule gives a precise expression for the derivative. If \(\mathbf{r}(t)=(x(t),y(t))\), then
This derivative measures change only in the direction of the edge. It need not be zero just because a point is an extremum on the entire polygon: at a vertex there is no open interval of feasible points in every direction. That is why the interior gradient test cannot replace the vertex checks.
Worked Example: A Linear Function on a Pentagon
Worked Example: A Linear Function on a Pentagon
Let \(D\) be the polygonal region with successive vertices \((0,0)\), \((3,0)\), \((4,2)\), \((2,4)\), and \((0,3)\). Find the absolute extrema of \(f(x,y)=x+2y\) on \(D\).
First check the interior. Since \(f_x=1\) and \(f_y=2\), the equations \(f_x=0\) and \(f_y=0\) have no solutions. There are no interior critical points.
On a straight edge, a linear function restricts to a linear function of the edge parameter. The change in \(f\) from one endpoint to the other is the gradient \((1,2)\) dotted with the edge direction. For the five successive edge directions, these changes are
None is zero, so no edge restriction is constant or has an interior critical point. A linear function on each edge takes its largest and smallest values at that edge’s endpoints. It remains to evaluate the five vertices:
Therefore the absolute minimum is \(0\) at \((0,0)\), and the absolute maximum is \(10\) at \((2,4)\). Direct substitution verifies both values: \(f(0,0)=0\) and \(f(2,4)=10\). The example also shows that extrema can occur at corners even though there are no interior critical points.
Worked Example: Comparing Interior and Boundary Candidates
Worked Example: Comparing Interior and Boundary Candidates
Let \(D\) be the trapezoidal region with vertices \((0,0)\), \((3,0)\), \((2,2)\), and \((0,2)\), in that order. Find the absolute extrema of \(f(x,y)=(x-1)^2+(y-1)^2\).
For interior critical points,
Setting both equal to zero gives \((x,y)=(1,1)\), which lies in the interior. Its value is
Now check each edge. On the bottom edge, set \(x=t,\ y=0\), with \(0\leq t\leq 3\). Then
The critical parameter is \(t=1\), with value \(g_1(1)=1\). The endpoints give \(g_1(0)=2\) and \(g_1(3)=5\).
On the sloping edge from \((3,0)\) to \((2,2)\), set \(x=3-t,\ y=2t\), with \(0\leq t\leq 1\). This gives
The critical parameter is \(t=\frac45\), which lies in the open edge. Its value is
The endpoints give \(g_2(0)=5\) and \(g_2(1)=2\).
On the left edge, set \(x=0,\ y=t\), with \(0\leq t\leq 2\). Then \(g_3(t)=1+(t-1)^2\), so \(g_3'(t)=2(t-1)\). The critical parameter is \(t=1\), giving \(g_3(1)=1\); the endpoint values are \(g_3(0)=2\) and \(g_3(2)=2\).
On the top edge, set \(x=t,\ y=2\), with \(0\leq t\leq 2\). Then \(g_4(t)=(t-1)^2+1\), with derivative \(g_4'(t)=2(t-1)\). The critical parameter is \(t=1\), giving \(g_4(1)=1\); the endpoints give \(g_4(0)=2\) and \(g_4(2)=2\).
Comparing the interior value \(0\) with all edge critical values and vertex values, the absolute minimum is \(0\) at \((1,1)\), and the absolute maximum is \(5\) at \((3,0)\). Substitution checks the final values: \(f(1,1)=0\) and \(f(3,0)=(3-1)^2+(0-1)^2=4+1=5\).
Worked Example: A Stationary Point on an Edge
Worked Example: A Stationary Point on an Edge
Use the same trapezoidal region, with vertices \((0,0)\), \((4,0)\), \((3,2)\), and \((0,2)\). Find the absolute extrema of \(f(x,y)=y-(x-2)^2\).
The partial derivative with respect to \(y\) is \(f_y=1\), so the two equations \(f_x=0\), \(f_y=0\) cannot hold together. There are no interior critical points.
On the bottom edge, use \(x=4t,\ y=0\), \(0\leq t\leq 1\). Then \(g_1(t)=-(4t-2)^2\), and \(g_1'(t)=-8(4t-2)\). The critical parameter \(t=\frac12\) gives value \(0\); the endpoints each give \(-4\).
On the sloping edge from \((4,0)\) to \((3,2)\), use \(x=4-t,\ y=2t\). Then
For \(0\leq t\leq 1\), \(g_2'(t)\geq 4>0\), so this edge has no interior critical point. Its endpoint values are \(g_2(0)=-4\) and \(g_2(1)=1\).
On the top edge, use \(x=3-3t,\ y=2\). Then
The critical parameter is \(t=\frac13\), corresponding to \((x,y)=(2,2)\). Its value is \(g_3(\frac13)=2\). The endpoints give \(g_3(0)=1\) and \(g_3(1)=-2\).
On the left edge, use \(x=0,\ y=2-2t\). Then \(g_4(t)=2-2t-4=-2-2t\), which decreases throughout \(0\leq t\leq 1\). Its endpoint values are \(-2\) and \(-4\).
The largest candidate value is \(2\) at \((2,2)\), and the smallest is \(-4\) at both \((0,0)\) and \((4,0)\). Substitution confirms these values: \(f(2,2)=2-(2-2)^2=2\), while \(f(0,0)=0-(-2)^2=-4\) and \(f(4,0)=0-2^2=-4\).
A Common Mistake: Looking Only for Zero Gradient
In the pentagon example, the gradient is \(\nabla f=(1,2)\) everywhere, so it never vanishes. A mistaken conclusion would be: “There are no critical points, so there are no absolute extrema.” The error is that the gradient test identifies possible extrema only in the interior. It says nothing that would rule out a boundary or vertex extremum.
Indeed, the values at the vertices show an absolute maximum of \(10\) at \((2,4)\) and an absolute minimum of \(0\) at \((0,0)\). Both are valid extrema despite the nonzero gradient. The correction is to search the interior, optimize on every edge, and evaluate every vertex before comparing values.
Organizing the Search
For a polygon with several edges, a short checklist helps prevent omissions:
- Confirm that the function is continuous on the closed polygonal region.
- Solve \(f_x=0\) and \(f_y=0\), keeping only interior solutions.
- Parameterize each edge over \(0\leq t\leq 1\) and compute the derivative of its restricted function.
- Find edge critical parameters in \(0<t<1\), and include both endpoints of every edge.
- Evaluate the function at all candidates and compare the values.
Adjacent edges share a vertex, so a vertex may appear more than once in a list of endpoint values. This is harmless; it is still just one point with one function value. Take care, however, not to omit a vertex because neither neighboring edge has an interior critical point.
The comparison is essential. A point can be a maximum or minimum along one edge without being an absolute extremum on the whole region. Only after all candidate values are compared can you identify the absolute extrema.
Check Your Understanding
Use the candidate principle to answer the following questions.
- Why does a nonzero gradient at a vertex not rule out an absolute maximum there?
- For an edge parameterized by \(\mathbf{r}(t)\), what equation must hold at an extremum in the open edge?
- What candidates must be compared when optimizing a differentiable function on a polygonal region?
- If an edge restriction is constant, which values are enough to represent its value on that edge?
- Why can an edge critical point fail to be an absolute extremum on the full polygon?