Why a Rectangle Requires an Interior and Boundary Search
A function can have its largest or smallest value inside a rectangle, along one of its edges, or at a corner. An interior critical-point calculation alone does not inspect the boundary, while a boundary calculation alone can miss an interior extremum. A reliable search must include both.
For a rectangle, the boundary has a particularly manageable structure: it consists of four line segments. Restricting the function to each segment turns the boundary search into four one-variable problems. The endpoints of those segments are the rectangle’s corners, so the same procedure also ensures that the corners are checked.
The Candidate Search
Assume \(f\) is continuous on \(R\), differentiable at every interior point of \(R\), and its restrictions to the four edges are continuous on the closed edges and differentiable along their open segments. These assumptions allow the existence theorem for continuous functions on compact sets to guarantee an absolute maximum and minimum. They also allow the one-variable derivative test for necessary conditions to be used in the interior and along each edge.
For interior candidates, solve both equations \(f_x(x,y)=0\) and \(f_y(x,y)=0\), retaining only solutions strictly inside the rectangle. On the edges, hold one coordinate fixed and treat the other as the variable. Specifically, consider \(f(x,c)\) and \(f(x,d)\) for \(a\leq x\leq b\), and \(f(a,y)\) and \(f(b,y)\) for \(c\leq y\leq d\). Find stationary points in the open interval of each edge. Finally include all four corners.
Each edge restriction is a one-variable function on a closed interval. Its absolute extrema can occur at an interior stationary point or at an endpoint. The endpoints are corners, which explains why corners must be included even if no edge restriction has an interior stationary point.
Why the Candidate Principle Works
The argument is a necessary-condition proof: it shows that a point where an absolute extremum occurs must be included in the search. Continuity on the closed, bounded rectangle guarantees that absolute extrema exist. Let \((x_0,y_0)\) be a point where either one occurs.
With \(y=y_0\) fixed, the function of \(x\) has a local extremum at \(x_0\), so its derivative \(f_x(x_0,y_0)\) is zero. Fixing \(x=x_0\) in turn gives \(f_y(x_0,y_0)=0\). Thus the point is an interior critical point.
Restrict \(f\) to that edge, using the varying coordinate as the one-variable input. The restriction has an extremum at an interior point of its interval, so its derivative there is zero. The point is a stationary point of that edge restriction.
That endpoint is one of the rectangle’s four corners, so it is explicitly included in the candidate list.
These cases cover every point in the rectangle: it is either interior, in the open part of an edge, or a corner. Therefore an absolute maximum and an absolute minimum must each occur among the candidates. Conversely, because every candidate lies in the rectangle, comparing their function values identifies the actual absolute maximum and minimum. A candidate need not itself be a local or absolute extremum.
Worked Example: An Interior Minimum and a Corner Maximum
Worked Example: An Interior Minimum and a Corner Maximum
Find the absolute extrema of \(f(x,y)=(x-1)^2+(y-1)^2\) on \(R=[-1,2]\times[0,3]\).
Interior candidates. The partial derivatives are \(f_x=2(x-1)\) and \(f_y=2(y-1)\). Setting both equal to zero gives \(x=1,\ y=1\), which is inside the rectangle. Its value is \(f(1,1)=0^2+0^2=0\).
Bottom edge, \(y=0\). The restriction is \(f(x,0)=(x-1)^2+1\). Its derivative is \(2(x-1)\), so the stationary point is \(x=1\), with value \(1\). The endpoints have values \(f(-1,0)=(-2)^2+(-1)^2=5\) and \(f(2,0)=1^2+(-1)^2=2\).
Top edge, \(y=3\). The restriction is \(f(x,3)=(x-1)^2+4\). Its derivative is \(2(x-1)\), so \(x=1\) gives value \(4\). Its endpoints have values \(f(-1,3)=4+4=8\) and \(f(2,3)=1+4=5\).
Left edge, \(x=-1\). The restriction is \(f(-1,y)=4+(y-1)^2\). Its derivative is \(2(y-1)\), so \(y=1\) gives value \(4\). The endpoints have values \(f(-1,0)=5\) and \(f(-1,3)=8\).
Right edge, \(x=2\). The restriction is \(f(2,y)=1+(y-1)^2\). Its derivative is \(2(y-1)\), so \(y=1\) gives value \(1\). The endpoints have values \(f(2,0)=2\) and \(f(2,3)=5\).
The least candidate value is \(0\), at \((1,1)\). The greatest is \(8\), at \((-1,3)\). Substitution checks the answers: \(f(1,1)=0\), and \(f(-1,3)=(-2)^2+2^2=8\). Thus the absolute minimum is \(0\) and the absolute maximum is \(8\).
Worked Example: Comparing Values When There Is No Edge Stationary Point
Worked Example: Comparing Values When There Is No Edge Stationary Point
Find the absolute extrema of \(f(x,y)=xy\) on \(R=[-1,2]\times[-2,1]\).
Interior candidates. Since \(f_x=y\) and \(f_y=x\), the critical-point equations give \(x=0,\ y=0\). This point is interior and \(f(0,0)=0\).
Bottom edge, \(y=-2\). The restriction is \(-2x\), whose derivative is \(-2\), so it has no stationary point. Its endpoint values are \(f(-1,-2)=2\) and \(f(2,-2)=-4\).
Top edge, \(y=1\). The restriction is \(x\), whose derivative is \(1\), so it has no stationary point. Its endpoint values are \(f(-1,1)=-1\) and \(f(2,1)=2\).
Left edge, \(x=-1\). The restriction is \(-y\), whose derivative is \(-1\), so it has no stationary point. Its endpoint values are \(f(-1,-2)=2\) and \(f(-1,1)=-1\).
Right edge, \(x=2\). The restriction is \(2y\), whose derivative is \(2\), so it has no stationary point. Its endpoint values are \(f(2,-2)=-4\) and \(f(2,1)=2\).
The interior candidate has value \(0\); the corner values are \(2,-4,-1,2\). The smallest candidate value, \(-4\), is attained at \((2,-2)\), since \(f(2,-2)=2(-2)=-4\). The largest, \(2\), is attained at \((-1,-2)\) and \((2,1)\), since \((-1)(-2)=2\) and \(2(1)=2\). Thus the absolute minimum is \(-4\) and the absolute maximum is \(2\).
Worked Example: Stationary Points on the Edges
Worked Example: Stationary Points on the Edges
Find the absolute extrema of \(f(x,y)=(x-1)^2-(y-1)^2\) on \(R=[0,2]\times[0,2]\).
Interior candidates. The partial derivatives are \(f_x=2(x-1)\) and \(f_y=-2(y-1)\). Both vanish at \((1,1)\), where \(f(1,1)=0\).
Bottom edge, \(y=0\). Here \(f(x,0)=(x-1)^2-1\), with derivative \(2(x-1)\). The edge stationary point \(x=1\) has value \(-1\). The endpoints give \(f(0,0)=0\) and \(f(2,0)=0\).
Top edge, \(y=2\). Here \(f(x,2)=(x-1)^2-1\), again with derivative \(2(x-1)\). The stationary point \(x=1\) has value \(-1\). The endpoints give \(f(0,2)=0\) and \(f(2,2)=0\).
Left edge, \(x=0\). Here \(f(0,y)=1-(y-1)^2\), with derivative \(-2(y-1)\). The stationary point \(y=1\) has value \(1\). The endpoints give \(f(0,0)=0\) and \(f(0,2)=0\).
Right edge, \(x=2\). Here \(f(2,y)=1-(y-1)^2\), again with derivative \(-2(y-1)\). The stationary point \(y=1\) has value \(1\). The endpoints give \(f(2,0)=0\) and \(f(2,2)=0\).
Comparing the candidates, the smallest value is \(-1\), attained at \((1,0)\) and \((1,2)\). Direct substitution gives \(f(1,0)=0^2-(-1)^2=-1\) and \(f(1,2)=0^2-1^2=-1\). The greatest value is \(1\), attained at \((0,1)\) and \((2,1)\), where substitution gives \(1^2-0^2=1\). The interior critical point and all corners have value \(0\). Therefore the absolute minimum is \(-1\) and the absolute maximum is \(1\).
A Common Mistake: Stopping at Interior Critical Points
For the function \(f(x,y)=xy\) on \([-1,2]\times[-2,1]\), solving \(f_x=f_y=0\) finds only \((0,0)\), with value \(0\). The incorrect conclusion that both the absolute maximum and minimum are \(0\) comes from treating the interior search as the whole problem. But the corner \((2,-2)\) has value \(-4\), and \((-1,-2)\) has value \(2\). The boundary checks show that the true minimum is \(-4\) and the true maximum is \(2\).
There is a related issue when an edge restriction is constant on an interval: its derivative vanishes at every interior point of that edge. The candidate set may then contain infinitely many points. This does not invalidate the method; all those points have the same function value on that edge. Do not assume that the candidate list must always be finite.
Using the Method Reliably
For each problem, keep the four edge restrictions separate and record their stationary points and endpoint values. This helps prevent a common omission: checking only two edges, or forgetting that endpoints of edge intervals are corners. If the same corner appears in two edge calculations, it is still just one point with one function value.
The candidate principle gives necessary places to look, not a classification of each candidate. Interior critical-point tests can help describe local behavior, but an absolute-extremum search is completed by comparing the actual function values across the whole candidate list. A point that is a saddle point or a local extremum may still be a candidate; the comparison decides whether its value is globally largest or smallest on the rectangle.
Check Your Understanding
For each question, explain which part of the rectangle candidate search is needed.
- Why must a differentiable interior absolute extremum have both first partial derivatives equal to zero?
- What one-variable function would you examine on the right edge \(x=b\) of \(R=[a,b]\times[c,d]\)?
- If an edge restriction has no stationary point in the open edge, which points on that edge must still be checked?
- Can a point with a nonzero partial derivative be an absolute extremum on the rectangle? Explain how its location matters.
- What does it mean for an edge restriction to be constant, and how does that affect the candidate search?