Computing and Applying Extrema

The Maximum and Minimum Values on a Bounded Closed Region

Theorem1

Suppose the function f(x,y)f(x, y) is continuous on the bounded closed region DD. Then ff necessarily attains a maximum value and a minimum value on DD. The method is:

  1. Find all the stationary points of ff in the interior of DD and the points where the partial derivatives do not exist, and compute the values of the function there.
  2. Find the maximum and the minimum of ff on the boundary of DD.
  3. Compare all of the above values: the largest is the maximum and the smallest is the minimum.

Typical Application Problems

Example 1: The Maximum Volume of a Water Tank

A factory is to make a lidded rectangular tank of volume 2m32\text{m}^3 out of sheet metal. What dimensions should be chosen so that the least material is used?

applications of extremathe maximum and minimum valuea rectangular boxusing the least material

Approach:

Minimising the surface area when the volume is fixed is the classic conditional extremum problem.

Steps:

  1. Let the length, width and height of the tank be x,y,zx, y, z; the volume is xyz=2xyz = 2 and the surface area is S=2(xy+yz+xz)S = 2(xy + yz + xz)
  2. From z=2xyz = \frac{2}{xy} we get S(x,y)=2(xy+2x+2y)S(x,y) = 2(xy + \frac{2}{x} + \frac{2}{y}) (x>0,y>0x>0, y>0)
  3. Sx=2(y−2x2)S_x = 2(y - \frac{2}{x^2}) and Sy=2(x−2y2)S_y = 2(x - \frac{2}{y^2})
  4. Setting Sx=Sy=0S_x = S_y = 0: y=2x2y = \frac{2}{x^2} and x=2y2x = \frac{2}{y^2}
  5. Substituting gives x=2(2/x2)2=x42x = \frac{2}{(2/x^2)^2} = \frac{x^4}{2}, that is, x3=2x^3 = 2 and x=23x = \sqrt[3]{2}
  6. Similarly y=23y = \sqrt[3]{2} and z=2xy=2(23)2=23z = \frac{2}{xy} = \frac{2}{(\sqrt[3]{2})^2} = \sqrt[3]{2}
  7. By the practical meaning, the minimum of the surface area exists and is unique, so the least material is used when the length = the width = the height = 23m\sqrt[3]{2}\text{m}.

Answer: the least material is used when the tank is a cube with side length 23m\sqrt[3]{2}\text{m}.

Example 2: The Largest Inscribed Rectangular Box

Find the volume of the largest rectangular box inscribed in the ellipsoid x2a2+y2b2+z2c2=1\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1 (with the faces of the box parallel to the coordinate planes).

applications of extremaan ellipsoidan inscribed rectangular boxthe maximum value

Approach:

Use the symmetry to work only in the first octant; the volume is proportional to the product of the three semi-axes, and then the extremum condition gives the answer.

Steps:

  1. Let the vertex of the box in the first octant be (x,y,z)(x,y,z); the volume is V=8xyzV = 8xyz
  2. From the equation of the ellipsoid, z=c1−x2a2−y2b2z = c\sqrt{1-\frac{x^2}{a^2}-\frac{y^2}{b^2}}
  3. V(x,y)=8cxy1−x2a2−y2b2V(x,y) = 8cxy\sqrt{1-\frac{x^2}{a^2}-\frac{y^2}{b^2}}
  4. For convenience, maximise V2=64c2x2y2(1−x2a2−y2b2)V^2 = 64c^2x^2y^2(1-\frac{x^2}{a^2}-\frac{y^2}{b^2})
  5. Put u=x2,v=y2u = x^2, v = y^2, and maximise f(u,v)=uv(1−ua2−vb2)f(u,v) = uv(1-\frac{u}{a^2}-\frac{v}{b^2})
  6. fu=v(1−2ua2−vb2)f_u = v(1-\frac{2u}{a^2}-\frac{v}{b^2}) and fv=u(1−ua2−2vb2)f_v = u(1-\frac{u}{a^2}-\frac{2v}{b^2})
  7. Setting fu=fv=0f_u=f_v=0 gives u=a23u = \frac{a^2}{3} and v=b23v = \frac{b^2}{3}
  8. x=a3,y=b3,z=c3x = \frac{a}{\sqrt{3}}, y = \frac{b}{\sqrt{3}}, z = \frac{c}{\sqrt{3}}
  9. The maximum volume V=8⋅a3⋅b3⋅c3=8abc33V = 8 \cdot \frac{a}{\sqrt{3}} \cdot \frac{b}{\sqrt{3}} \cdot \frac{c}{\sqrt{3}} = \frac{8abc}{3\sqrt{3}}

Answer: the maximum volume is 8abc33\frac{8abc}{3\sqrt{3}}.

Example 3: The Least Squares Method

Given a set of data (xi,yi)(x_i, y_i) (i=1,…,ni=1,\ldots,n), find the line y=ax+by = ax + b for which the sum of the squared errors S=∑i=1n(yi−axi−b)2S = \sum_{i=1}^n (y_i - ax_i - b)^2 is smallest.

applications of extremathe least squares methodlinear regressionthe maximum value

Approach:

Take the partial derivatives of the sum of the squared errors with respect to the slope and the intercept and set them to zero; this gives the normal equations of linear regression.

Steps:

  1. S(a,b)=∑i=1n(yi−axi−b)2S(a,b) = \sum_{i=1}^n (y_i - ax_i - b)^2
  2. ∂S∂a=−2∑i=1nxi(yi−axi−b)\frac{\partial S}{\partial a} = -2\sum_{i=1}^n x_i(y_i - ax_i - b) and ∂S∂b=−2∑i=1n(yi−axi−b)\frac{\partial S}{\partial b} = -2\sum_{i=1}^n (y_i - ax_i - b)
  3. Setting the partial derivatives to zero: {a∑xi2+b∑xi=∑xiyia∑xi+nb=∑yi\begin{cases} a\sum x_i^2 + b\sum x_i = \sum x_i y_i \\ a\sum x_i + nb = \sum y_i \end{cases}
  4. Solving: a=n∑xiyi−(∑xi)(∑yi)n∑xi2−(∑xi)2a = \frac{n\sum x_i y_i - (\sum x_i)(\sum y_i)}{n\sum x_i^2 - (\sum x_i)^2} b=(∑yi)(∑xi2)−(∑xi)(∑xiyi)n∑xi2−(∑xi)2b = \frac{(\sum y_i)(\sum x_i^2) - (\sum x_i)(\sum x_i y_i)}{n\sum x_i^2 - (\sum x_i)^2}
  5. The Hessian matrix H=(2∑xi22∑xi2∑xi2n)H = \begin{pmatrix} 2\sum x_i^2 & 2\sum x_i \\ 2\sum x_i & 2n \end{pmatrix} is positive definite when the xix_i are not all equal, so this is a minimum point.

Answer: the slope and the intercept of the least squares line are given by the formulas above; these are the normal equations of linear regression.

Example 4: Extrema on a Closed Region

Find the maximum and the minimum values of f(x,y)=x2−2xy+2yf(x, y) = x^2 - 2xy + 2y on the rectangular region D={(x,y)∣0≤x≤3,0≤y≤2}D = \{(x,y) \mid 0 \leq x \leq 3, 0 \leq y \leq 2\}.

the maximum and minimum valuea closed regionthe boundarya rectangle

Approach:

The extremum may be at an interior stationary point or on the boundary, so examine the interior and the boundary in two rounds and then compare.

Steps:

  1. The interior stationary points: fx=2x−2yf_x = 2x-2y and fy=−2x+2f_y = -2x+2; setting them to zero gives x=1,y=1x=1, y=1, and f(1,1)=1f(1,1)=1
  2. The boundary y=0y=0 (0≤x≤30\leq x\leq3): f=x2f=x^2, with minimum f(0,0)=0f(0,0)=0 and maximum f(3,0)=9f(3,0)=9
  3. The boundary y=2y=2 (0≤x≤30\leq x\leq3): f=x2−4x+4=(x−2)2f=x^2-4x+4=(x-2)^2, with minimum f(2,2)=0f(2,2)=0 and maximum f(0,2)=4f(0,2)=4
  4. The boundary x=0x=0 (0≤y≤20\leq y\leq2): f=2yf=2y, with minimum f(0,0)=0f(0,0)=0 and maximum f(0,2)=4f(0,2)=4
  5. The boundary x=3x=3 (0≤y≤20\leq y\leq2): f=9−6y+2y=9−4yf=9-6y+2y=9-4y, with minimum f(3,2)=1f(3,2)=1 and maximum f(3,0)=9f(3,0)=9
  6. Comparing all the values: the maximum is 99 (at (3,0)(3,0)) and the minimum is 00 (at (0,0)(0,0) and (2,2)(2,2))

Answer: the maximum value is f(3,0)=9f(3,0)=9, and the minimum value is f(0,0)=f(2,2)=0f(0,0)=f(2,2)=0.


Exercises

Exercise 1

A cylindrical container without a lid is to be made to hold a volume VV. What should the base radius and the height be so that the least material is used?

applications of extremaa cylinderthe maximum and minimum valueusing the least material

Approach:

A cylinder without a lid has the smallest surface area when the volume is fixed; this is again a conditional extremum problem.

Steps:

  1. Let the base radius be rr and the height be hh; the volume is πr2h=V\pi r^2 h = V and the surface area is S=πr2+2πrhS = \pi r^2 + 2\pi rh
  2. h=Vπr2h = \frac{V}{\pi r^2}, so S(r)=πr2+2VrS(r) = \pi r^2 + \frac{2V}{r}
  3. S′(r)=2πr−2Vr2S'(r) = 2\pi r - \frac{2V}{r^2}; setting S′=0S'=0 gives r3=Vπr^3 = \frac{V}{\pi} and r=Vπ3r = \sqrt[3]{\frac{V}{\pi}}
  4. h=Vπr2=Vπ(V/π)2/3=Vπ3=rh = \frac{V}{\pi r^2} = \frac{V}{\pi (V/\pi)^{2/3}} = \sqrt[3]{\frac{V}{\pi}} = r
  5. S′′(r)=2π+4Vr3>0S''(r) = 2\pi + \frac{4V}{r^3} > 0, so this is a minimum

Answer: the least material is used when the base radius r=Vπ3r = \sqrt[3]{\frac{V}{\pi}} and the height h=Vπ3h = \sqrt[3]{\frac{V}{\pi}} (that is, when the height equals the base radius).

Exercise 2

Find the maximum and the minimum values of f(x,y)=xyf(x, y) = xy on the disk x2+y2≤1x^2 + y^2 \leq 1.

the maximum and minimum valuea closed regiona diskthe boundary

Approach:

To find the extrema on a disk you again have to compare the interior stationary points with the values on the boundary.

Steps:

  1. The interior stationary points: fx=yf_x=y and fy=xf_y=x; the stationary point is (0,0)(0,0) and f(0,0)=0f(0,0)=0
  2. The boundary x2+y2=1x^2+y^2=1: put x=cos⁡θ,y=sin⁡θx=\cos\theta, y=\sin\theta, so f=cos⁡θsin⁡θ=12sin⁡2θf=\cos\theta\sin\theta = \frac{1}{2}\sin 2\theta
  3. On the boundary the maximum is 12\frac{1}{2} (θ=π4,5π4\theta=\frac{\pi}{4}, \frac{5\pi}{4}) and the minimum is −12-\frac{1}{2} (θ=3π4,7π4\theta=\frac{3\pi}{4}, \frac{7\pi}{4})
  4. Comparing: the maximum is 12\frac{1}{2} and the minimum is −12-\frac{1}{2}

Answer: the maximum value is 12\frac{1}{2} (at (22,22)(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}) and (−22,−22)(-\frac{\sqrt{2}}{2},-\frac{\sqrt{2}}{2})), and the minimum value is −12-\frac{1}{2} (at (−22,22)(-\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}) and (22,−22)(\frac{\sqrt{2}}{2},-\frac{\sqrt{2}}{2})).


Summary

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
DDRegiondomainA bounded closed region
VVVolumevolumeThe volume of a solid
SSSurface area / sum of squared errorssurface / sumThe surface area or the sum of the squared errors
nnNumber of data pointsnumber of data pointsThe amount of data in the least squares method

Found an issue with this content?

Tell us what could be improved.