Tutorials › Calculus III › Workshop: Quadratic Extrema on a Triangle

Absolute Extrema on Regions · Tutorial 445 of 999

Workshop: Quadratic Extrema on a Triangle

Learn a systematic way to find and compare every interior, edge, and vertex candidate when optimizing a quadratic function on a triangle.

Intermediate 10 min read

What You'll Learn

  • Set up a closed triangular region and identify its three edges and vertices.
  • Find interior stationary points by solving the two first-partial-derivative equations.
  • Restrict a quadratic function to each edge and check its critical points and endpoints.
  • Explain why these checks capture every possible absolute extremum.
  • Compare exact candidate values to identify the absolute minimum and maximum.

Why a Triangle Requires a Complete Search

A quadratic function can have its largest or smallest value inside a triangle, along the interior of one of its edges, or at a vertex. Checking only the interior stationary points misses boundary extrema; checking only the vertices can miss an extremum in the middle of an edge. A complete solution checks all three possibilities.

We will use the closed right triangle

$$ T=\{(x,y):x\geq 0,\ y\geq 0,\ x+y\leq 4\}. $$

Its vertices are \((0,0)\), \((4,0)\), and \((0,4)\). Its edges are the segments on \(y=0\), \(x=0\), and \(x+y=4\). The same strategy works for any nondegenerate closed triangle: describe its three edges, restrict the function to each one, and include all three vertices.

Definition: An absolute maximum of \(f\) on \(T\) is a value \(f(P)\) such that \(f(Q)\leq f(P)\) for every \(Q\in T\). An absolute minimum is a value \(f(P)\) such that \(f(Q)\geq f(P)\) for every \(Q\in T\).

Why the Candidate Checks Are Enough

A quadratic function is continuous, and a closed triangle is compact. Therefore, the extreme value theorem guarantees that the function attains both an absolute maximum and an absolute minimum on the triangle. To find them, we identify where an extremum could occur.

Theorem: For a differentiable function on a closed triangle, any absolute extremum occurs either at an interior point where both first partial derivatives are zero, at an interior point of an edge where the derivative of the restricted function is zero, or at a vertex. If a restriction to an edge is constant, its endpoints already represent its value on that edge.

Here is the justification. If an extremum occurs in the interior of the triangle, small changes in either coordinate are possible in both directions. The one-variable necessary condition for an interior extremum, applied in each coordinate direction, gives \(f_x=0\) and \(f_y=0\). If an extremum occurs in the interior of an edge, parametrize that edge by a variable \(t\). The restriction becomes a one-variable function \(g(t)\), and an interior extremum of that restriction must satisfy \(g'(t)=0\). The remaining boundary points are the vertices. These cases cover every point of the triangle.

When \(f\) is quadratic, each edge restriction is a polynomial of degree at most two. Its derivative is linear or constant, so its critical points can be found directly. A constant restriction has the same value at its endpoints, so it requires no additional candidate.

A Reliable Search Procedure

1
Check the interior.
Solve \(f_x=0\) and \(f_y=0\), then keep only solutions strictly inside the triangle.
2
Check each edge.
Parametrize the segment, substitute into \(f\), and find any critical parameter values in the segment's interval.
3
Include every vertex.
The edge restrictions include their endpoints, but recording the vertices explicitly helps prevent omissions.
4
Compare all candidate values.
The smallest candidate value is the absolute minimum, and the largest is the absolute maximum.

Worked Example: A Saddle Point and Three Edge Checks

Worked Example: Find the Absolute Extrema of a Quadratic on a Triangle

Find the absolute minimum and maximum of \(f(x,y)=x^2-2y^2-2x+10y\) on \(T\).

Interior stationary point. The partial derivatives are \(f_x=2x-2\) and \(f_y=-4y+10\). Setting both equal to zero gives \(x=1\) and \(y=5/2\). This point is inside \(T\), since both coordinates are positive and \(1+5/2=7/2<4\). Its value is

$$ f\left(1,\frac52\right) =1-2\left(\frac{25}{4}\right)-2+10\left(\frac52\right) =1-\frac{25}{2}-2+25 =\frac{23}{2}. $$

Edge \(y=0\). Set \(y=0\), with \(0\leq x\leq 4\). The restriction and its derivative are

$$ g_1(x)=f(x,0)=x^2-2x, \qquad g_1'(x)=2x-2. $$

The critical point is \(x=1\), which lies in the interval. Its value is \(g_1(1)=1-2=-1\). At the endpoints, \(g_1(0)=0\) and \(g_1(4)=16-8=8\).

Edge \(x=0\). Set \(x=0\), with \(0\leq y\leq 4\). Then

$$ g_2(y)=f(0,y)=-2y^2+10y, \qquad g_2'(y)=-4y+10. $$

The critical point is \(y=5/2\), which lies in the interval. Its value is

$$ g_2\left(\frac52\right) =-2\left(\frac{25}{4}\right)+10\left(\frac52\right) =-\frac{25}{2}+25 =\frac{25}{2}. $$

The endpoint values are \(g_2(0)=0\) and \(g_2(4)=-32+40=8\).

Edge \(x+y=4\). Use \(x=4-t,\ y=t\), where \(0\leq t\leq 4\). Substitution gives

$$ g_3(t) =(4-t)^2-2t^2-2(4-t)+10t =8+4t-t^2, \qquad g_3'(t)=4-2t. $$

The critical parameter is \(t=2\), in the allowed interval. It corresponds to \((x,y)=(2,2)\), with value \(g_3(2)=8+8-4=12\). The endpoint values are \(g_3(0)=8\) and \(g_3(4)=8+16-16=8\), agreeing with the values already calculated at \((4,0)\) and \((0,4)\).

Compare the candidates. The interior stationary point has value \(23/2\). The edge critical values are \(-1\), \(25/2\), and \(12\). The vertex values are \(f(0,0)=0\), \(f(4,0)=8\), and \(f(0,4)=8\). Thus the smallest candidate is \(-1\), and the largest is \(25/2\).

Conclusion: The absolute minimum is \(-1\), attained at \((1,0)\). The absolute maximum is \(25/2\), attained at \((0,5/2)\).

As a check, the reported points lie on the triangle: \((1,0)\) satisfies \(1+0\leq4\), and \((0,5/2)\) satisfies \(0+5/2\leq4\). Substitution into \(f\) gives \(f(1,0)=1-2=-1\) and \(f(0,5/2)=25/2\), as reported.

Worked Example: An Interior Minimum and Vertex Maxima

Worked Example: Compare an Interior Point with Every Edge

Find the absolute extrema of \(h(x,y)=(x-1)^2+(y-1)^2\) on \(T\).

The partial derivatives are \(h_x=2(x-1)\) and \(h_y=2(y-1)\), so the only interior stationary point is \((1,1)\). It lies inside the triangle, and \(h(1,1)=0\).

On \(y=0\), the restriction is \(h(x,0)=(x-1)^2+1\). Its derivative is \(2(x-1)\), so its critical point is \(x=1\), with value \(1\). The endpoint values at \(x=0,4\) are \(2\) and \(10\).

On \(x=0\), the restriction is \(h(0,y)=1+(y-1)^2\). Its derivative is \(2(y-1)\), so its critical point is \(y=1\), with value \(1\). The endpoint values at \(y=0,4\) are \(2\) and \(10\).

On the diagonal edge, set \(x=4-t,\ y=t\), for \(0\leq t\leq4\). Then

$$ h(4-t,t)=(3-t)^2+(t-1)^2 =2t^2-8t+10, \qquad \frac{d}{dt}h(4-t,t)=4t-8. $$

The edge critical point is \(t=2\), where the value is \(8-16+10=2\). Both endpoints have value \(10\). The interior value \(0\) is the smallest candidate, while \(10\) is the largest. Therefore, the absolute minimum is \(0\) at \((1,1)\), and the absolute maximum is \(10\) at both \((4,0)\) and \((0,4)\). Direct substitution confirms \(h(1,1)=0\), \(h(4,0)=9+1=10\), and \(h(0,4)=1+9=10\).

Worked Example: An Interior Maximum and Boundary Minimum

Worked Example: Keep Edge Critical Points Within Their Segments

Let \(S=\{(x,y):x\geq0,\ y\geq0,\ x+y\leq2\}\), and find the absolute extrema of \(q(x,y)=-x^2-y^2+x+y\) on \(S\).

The partial derivatives are \(q_x=-2x+1\) and \(q_y=-2y+1\). Their simultaneous zero is \((1/2,1/2)\), which is interior because its coordinates are positive and their sum is \(1<2\). The value is

$$ q\left(\frac12,\frac12\right) =-\frac14-\frac14+\frac12+\frac12 =\frac12. $$

On \(y=0\), \(0\leq x\leq2\), the restriction is \(-x^2+x\). Its derivative \(-2x+1\) vanishes at \(x=1/2\), where the value is \(1/4\); the endpoint values are \(0\) and \(-2\). On \(x=0\), the restriction is \(-y^2+y\), with critical point \(y=1/2\), value \(1/4\), and endpoint values \(0\) and \(-2\).

For the diagonal edge, set \(x=2-t,\ y=t\), with \(0\leq t\leq2\). Then

$$ q(2-t,t)=-2+4t-2t^2, \qquad \frac{d}{dt}q(2-t,t)=4-4t. $$

The critical parameter is \(t=1\), giving value \(-2+4-2=0\). The endpoints both have value \(-2\). Comparing all these values with the interior value \(1/2\), the absolute maximum is \(1/2\) at \((1/2,1/2)\), and the absolute minimum is \(-2\), attained at \((2,0)\) and \((0,2)\). Substitution verifies \(q(2,0)=-4+2=-2\) and \(q(0,2)=-4+2=-2\).

A Common Mistake: Stopping at the Interior

In the first example, the stationary point \((1,5/2)\) has value \(23/2\). A tempting but incorrect conclusion is that this must be the absolute maximum because it is the only interior stationary point. The edge point \((0,5/2)\), however, has the larger value \(25/2\). The stationary point is not even an absolute extremum: its Hessian matrix is diagonal with entries \(2\) and \(-4\), so the function bends upward in one coordinate direction and downward in the other.

Takeaway: Interior stationary points are candidates, not automatic answers. For an absolute-extrema problem on a triangle, compare them with every edge critical point and every vertex.

Why the Full Comparison Matters

Quadratic functions can curve upward along one edge and downward along another. They can also have a stationary point in the interior that is neither a maximum nor a minimum. A complete candidate list prevents those features from being mistaken for the answer. It also makes the final conclusion auditable: each possible location for an absolute extremum has been checked, and the winning value has been compared against all the others.

For a quadratic on a triangle, this procedure is especially manageable. The interior equations are linear, each edge restriction has degree at most two, and the vertices are finite in number. The essential discipline is not to skip a boundary piece or discard an edge critical point without checking whether its parameter lies in the segment.

Check Your Understanding

Use the complete candidate search, rather than considering only the interior.

  1. Why does continuity on a closed triangle guarantee that both absolute extrema exist?
  2. What equations must an interior stationary point satisfy?
  3. For an edge parametrized by \(t\), what condition identifies a possible extremum in the interior of that edge?
  4. In the first worked example, why does the interior stationary point not give the absolute maximum?
  5. If a quadratic restricts to a constant on one edge, why is it enough to include the edge's endpoints as candidates?