Maximum/Minimum Problems
[b][size=150]Local and absolute extremum[/size][/b][br][br]In [math]\mathbb{R}^2[/math], we define an [b]open disk[/b] centered at [math](a,b)[/math] with radius [math]r>0[/math], denoted by [math]B((a,b),r)[/math], to be the set of all points such that their distance from [math](a,b)[/math] is smaller than [math]r[/math]. Then we have the following definition:[br][br][u]Definition[/u]: Suppose [math]z=f(x,y)[/math] be a function of two variables. [math]f[/math] has a [b]local maximum (minimum)[/b] at [math](a,b)[/math] if [br][br][math]f(x,y)\leq f(a,b) \ \ (f(x,y)\geq f(a,b))[/math] for all [math](x,y)[/math] in the domain of [math]f[/math] in an open disk [math]B((a,b),r)[/math] for some [math] r>0 [/math].[br][br]A [b]local extremum[/b] of [math]f[/math] means it is either a local maximum or a local minimum. [br][br]The intuitive meaning of local maximum (minimum) of [math]f[/math] at [math](a,b)[/math] is that [math](a,b)[/math] attains the greatest (smallest) value of [math]f[/math] among all other points in the domain "close enough" to [math](a,b)[/math].[br][br][br]In the applet below, you can drag the point [math](a,b)[/math] to where you think a local maximum (minimum) occurs. Then verify it by the radius choosing [math]r[/math] small enough such that the value of [math]f[/math] at all the points in the yellow open disk with radius [math]r[/math] are not greater (smaller) than that at [math](a,b)[/math].[br][br][br]
[u]Definition[/u]: [math]f[/math] has an [b]absolute maximum (minimum)[/b] at [math](a,b)[/math] if [br][br][math]f(x,y)\leq f(a,b)[/math] ([math]f(x,y)\geq f(a,b)[/math]) for all [math](x,y)[/math] in the domain of [math]f[/math][br][br][br]An [b]absolute extremum[/b] of [math]f[/math] means that it is either an absolute maximum or an absolute minimum.[br][br][br]An absolute maximum (minimum) of [math]f[/math] at [math](a,b)[/math] is necessarily a local maximum (minimum) of [math]f[/math] at [math](a,b)[/math]. However, the converse is not true in general i.e. a local maximum (minimum) might not be an absolute maximum (minimum).[br][br][br]Many real life problems can be formulated as [b]optimization problems[/b] i.e. problems of finding absolute maximum/minimum of a certain function. However, not every function has an absolute maximum or minimum. For functions of one variable, we have [b]extremum value theorem[/b] - a continuous function defined on a closed interval [math][a,b][/math] attains its absolute maximum and minimum. For functions of two variables, we have the following analogous theorem:[br][br][u]Theorem[/u]: Suppose [math]z=f(x,y)[/math] is a function of two variable such that it is continuous on a [b]closed[/b] and [b]bounded[/b] domain [math]D[/math] ([u]Note[/u]: [math]D[/math] is bounded if it is contained in a an open disk with some radius. [math]D[/math] is closed if it contains all its "boundary"). Then [math]f[/math] attains its absolute maximum and minimum in [math]D[/math].[br][br][u]Proof[/u]: Omitted.[br][br][br]
[b][size=150]Critical points[/size][/b][br][br]In order to locate all local extrema of a function, we need the following theorem:[br][br][u]Theorem[/u]: Let [math]z=f(x,y)[/math] be a function of two variables. If [math]f[/math] has a local maximum or minimum at [math](a,b)[/math] and both [math]f_x[/math] and [math]f_y[/math] exist at [math](a,b)[/math], then [math]f_x(a,b)=f_y(a,b)=0[/math].[br][br][u]Proof[/u]: Define [math]g(x)=f(x,b)[/math] i.e. fix [math]y=b[/math] and regard [math]f(x,b)[/math] as a single-variable function of [math]x[/math]. Then [math]g[/math] has a local extremum at [math]x=a[/math] i.e. [math]g'(a)=0[/math], which means that [math]f_x(a,b)=g'(a)=0[/math].[br][br]Similarly, define [math]h(y)=f(a,y)[/math] i.e fix [math]x=a[/math] and regard [math]f(a,y)[/math] as a single-variable function of [math]y[/math]. The [math]h[/math] has a local extremum at [math]y=b[/math] i.e. [math]h'(b)=0[/math], which means that [math]f_y(a,b)=h'(b)=0[/math].[br][br][br][br]The above theorem is the reason why we have the following definition:[br][br][u]Definition[/u]: Suppose [math](a,b)[/math] is in the domain such that [math]B((a,b),r)[/math] is contained in the domain of [math]f[/math] for some [math]r>0[/math]. Then [math](a,b)[/math] is a [b]critical point[/b] of [math]f[/math] if one of the following conditions holds:[br][list][*][math]f_x(a,b)=f_y(a,b)=0[/math][/*][*]At least one of [math]f_x[/math] and [math]f_y[/math] does not exist at [math](a,b)[/math][/*][/list][br][br]([u]Note[/u]: The reason why it is required that an open disk [math]B((a,b),r)[/math] is contained in the domain of [math]f[/math] is because we want to make sure that [math](a,b)[/math] is in the "interior" of the domain i.e. not on the boundary of the domain.)[br][br][br]Then the theorem says that if [math](a,b)[/math] is a local extremum of [math]f[/math], then it is a critical point of [math]f[/math]. Therefore, when we are searching for local maximum or minimum in the interior of the domain, we only need to look among the critical points. [br][br]The converse of the theorem is generally false - A critical point of [math]f[/math] might not be a local extremum of [math]f[/math].[br][br][br][u]Example[/u]: Let [math]f(x,y)=x^2+y^2[/math]. Then [math]f_x=2x[/math] and [math]f_y=2y[/math]. Therefore, [math](0,0)[/math] is a critical point of [math]f[/math] because [math]f_x(0,0)=f_y(0,0)=0[/math]. You can see from the applet below that [math](0,0)[/math] is actually a local minimum of [math]f[/math].[br][br][br][u]Example[/u]: Let [math]f(x,y)=1-x^2-y^2[/math]. Then [math]f_x=-2x[/math] and [math]f_y=-2y[/math]. Therefore, [math](0,0)[/math] is a critical point of [math]f[/math] because [math]f_x(0,0)=f_y(0,0)=0[/math]. You can change the function to [math]1-x^2-y^2[/math] in the applet below to see that [math](0,0)[/math] is actually a local maximum of [math]f[/math]. [br][br][br][u]Example[/u]: Let [math]f(x,y)=\sqrt{x^2+y^2}[/math]. Then [math]f_x=\frac x{\sqrt{x^2+y^2}}[/math] and [math]f_y=\frac y{\sqrt{x^2+y^2}}[/math]. Therefore, [math](0,0)[/math] is a critical point of [math]f[/math] because [math]f_x(0,0)[/math] and [math]f_y(0,0)[/math] do not exist. You can change the function to [math]\sqrt{x^2+y^2}[/math] in the applet below to see that [math](0,0)[/math] is actually a local minimum of [math]f[/math]. [br][br][br][u]Example[/u]: Let [math]f(x,y)=y^2-x^2[/math]. Then [math]f_x=-2x[/math] and [math]f_y=2y[/math]. Therefore, [math](0,0)[/math] is a critical point of [math]f[/math] because [math]f_x(0,0)=f_y(0,0)=0[/math]. You can change the function to [math]y^2-x^2[/math] in the applet below to see that [math](0,0)[/math] is neither a local maximum nor a local minimum of [math]f[/math]. [br][br]([u]Note[/u]: This kind of critical point is called a [b]saddle point[/b]. More precisely, a critical point [math](a,b)[/math] is a saddle point if in every open disk [math]B((a,b),r)[/math], there are points [math](x,y)[/math] for which [math]f(x,y)>f(a,b)[/math] and points for which [math]f(x,y)<f(a,b)[/math].)[br][br][br]
The following is the main theorem for classifying critical points:[br][br][u]Theorem (Second Derivative Test)[/u]: Suppose [math]z=f(x,y)[/math] is a function of two variables such that all the second partial derivatives i.e. [math]f_{xx},f_{yy},f_{xy},f_{yx}[/math] are continuous on an open disk centered at [math](a,b)[/math] and [math](a,b)[/math] is a critical point of [math]f[/math] i.e. [math]f_x(a,b)=f_y(a,b)=0[/math]. Define [br][br][math]D=\begin{vmatrix} f_{xx}(a,b) & f_{xy}(a,b) \\ f_{yx}(a,b) & f_{yy}(a,b)\end{vmatrix}=f_{xx}(a,b)f_{yy}(a,b)-(f_{xy}(a,b))^2[/math][br][br]Then we have the following[br][list][*]If [math]D>0[/math] and [math]f_{xx}(a,b)>0[/math], then [math]f[/math] has a local minimum at [math](a,b)[/math][\*][/*][*]If [math]D>0[/math] and [math]f_{xx}(a,b)<0[/math], then [math]f[/math] has a local maximum at [math](a,b)[/math][\*][/*][*]If [math]D<0[/math], [math]f[/math] has a saddle point at [math](a,b)[/math][/*][*]If [math]D=0[/math], then the test is inconclusive.[/*][/list][br][br][br][u]Example[/u]: Suppose [math]f(x,y)=4xy-x^4-y^4[/math]. Classify all critical points of [math]f[/math].[br][br][u]Answer[/u]:[br][br]First of all, compute all partial derivatives and set them to zero:[br][br][math]f_x=4y-4x^3=0[/math][br][math]f_y=4x-4y^3=0[/math][br][br][math]\implies \ 4y=4x^3, \ 4x=4y^3[/math][br][br]Combining the above equations and eliminate [math]y[/math], we get[br][br][math]x=x^9[/math][br][math]\implies x^9-x=0 \implies x(x^4-1)(x^4+1)=0[/math][br][math]\implies x(x^2-1)(x^2+1)(x^4+1)=0\implies x(x-1)(x+1)(x^2+1)(x^4+1)=0[/math][br][br]Hence, [math]x=0,1,-1[/math].[br][br]For each value of [math]x[/math], we compute the corresponding value of [math]y[/math]. Hence the critical points of [math]f[/math] are [math](1,1),(0,0)[/math] and [math](-1,-1)[/math].[br][br]To classify the critical points, we need to compute the second partial derivatives:[br][br][math]f_{xx}=-12x^2, \ f_{yy}=-12y^2, \ f_{xy}=4[/math].[br][br]For [math](0,0)[/math]:[br][br][math]D=\begin{vmatrix} 0 & 4 \\ 4 & 0 \end{vmatrix}=-16<0[/math][br][br]Therefore, [math](0,0)[/math] is a saddle point of [math]f[/math].[br][br][br]For [math](1,1)[/math]:[br][br][math]D=\begin{vmatrix} -12 & 4 \\ 4 & -12 \end{vmatrix}=128>0[/math] and [math]f_{xx}(1,1)=-12<0[/math][br][br]Therefore, [math](1,1)[/math] is a local maximum of [math]f[/math].[br][br][br]For [math](-1,-1)[/math]:[br][br][math]D=\begin{vmatrix} -12 & 4 \\ 4 & -12 \end{vmatrix}=128>0[/math] and [math]f_{xx}(-1,-1)=-12<0[/math][br][br]Therefore, [math](-1,-1)[/math] is a local maximum of [math]f[/math].[br][br][br]You can use the applet above to visualize all the critical points of [math]f[/math].[br][br][br]
[u]Exercise[/u]: Let [math]f(x,y)=xy(x-2)(y+3)[/math]. Classify all critical points of [math]f[/math].[br][br]
[b][size=150]Finding absolute maximum/minimum[/size][/b][br][br]Suppose [math]f[/math] is continuous on a closed and bounded domain [math]R[/math] in [math]\mathbb{R}^2[/math]. By extremum value theorem, [math]f[/math] attains its absolute maximum and minimum in [math]R[/math]. If absolute maximum/minimum value is attained in the interior of [math]R[/math] i.e. not on the boundary, then it must be a local maximum/minimum, which implies that it is a critical point of [math]f[/math]. Therefore, if we search for absolute maximum/minimum, we only need to check the values of [math]f[/math] at the critical points and on the boundary of [math]R[/math].[br][br]The general procedure for finding absolute maximum/minimum is as follows:[br][br][list=1][*]Find all critical points in [math]R[/math] and determine their values of [math]f[/math]. [/*][*]Parametrize the boundary of [math]R[/math] and find the maximum and minimum values of [math]f[/math] on the boundary. [/*][*]The greatest value found in the first two steps is the absolute maximum value of [math]f[/math] on [math]R[/math], and the smallest value found in the first two steps is the absolute minimum value of [math]f[/math] on [math]R[/math]. [/*][/list][br][br][br][u]Example[/u]: Let [math]f(x,y)=x^2+y^2-2x+2y+5[/math] on [math]R=\left\{(x,y) \ | \ x^2+y^2\leq 4\right\}[/math], which is a closed and bounded set. Find its absolute maximum and minimum values. [br][br][u]Answer[/u]:[br][br][u]Step 1[/u]: Find all critical points of [math]f[/math].[br][br][math]f_x=2x-2=0 \implies x=1[/math][br][math]f_y=2y+2=0 \implies y=-1[/math][br][br]Moreover, [math](1,-1)[/math] is in [math]R[/math]. Hence [math](1,-1)[/math] is the only critical point of [math]f[/math]. [br][br][math]f(1,-1)=3[/math][br][br][u]Step 2[/u]: Find maximum and minimum on the boundary.[br][br]Since the boundary of [math]R[/math] is a circle centered at [math](0,0)[/math] with radius 2, we can parametrize it by [math]x(t)=2\cos t, y(t)=2\sin t[/math] for [math]0\leq t \leq 2\pi[/math]. Then we have [br][br][math]g(t)=f(x(t),y(t))=4\cos^2 t+4\sin^2 t-4\cos t+4\sin t+5=9-4\cos t+4\sin t[/math][br][br][math]\frac{dg}{dt}=4\sin t+4\cos t=0 \implies \tan t = -1 \implies t=\frac{3\pi}4, \frac{7\pi}4[/math]. [br][br]Compute the values of [math]g[/math] at endpoints and the above two critical values:[br][br][math]g(0)=g(2\pi)=9-4=5[/math][br][math]g\left(\frac{3\pi}4\right)=9-4\left(-\frac{\sqrt{2}}2\right)+4\left(\frac{\sqrt{2}}2\right)=9+4\sqrt{2}[/math][br][math]g\left(\frac{7\pi}4\right)=9-4\left(\frac{\sqrt{2}}2\right)+4\left(-\frac{\sqrt{2}}2\right)=9-4\sqrt{2}[/math][br][br]Therefore, the maximum value on the boundary is [math]g\left(\frac{7\pi}4\right)=f(-\sqrt{2},\sqrt{2})=9+4\sqrt{2}[/math] and the minimum value on the boundary is [math]g\left(\frac{3\pi}4\right)=f(\sqrt{2},-\sqrt{2})=9-4\sqrt{2}[/math].[br][br][u]Step 3[/u]: Compare the values found in the previous steps.[br][br][math]f(1,-1)=3[/math] (Absolute minimum value)[br][math]f(-\sqrt{2},\sqrt{2})=9+4\sqrt{2}[/math] (Absolute maximum value)[br][math]f(\sqrt{2},-\sqrt{2})=9-4\sqrt{2}[/math][br][br][br]
[u]Exercise[/u]: Suppose [math]f(x,y)=3xy-6x-3y+7[/math] is defined on the domain [math]T[/math], a closed region whose boundary is the triangle with vertices [math](0,0), (3,0)[/math], and [math](0,5)[/math]. Let [math]L_1[/math] be the line segment joining [math](0,0)[/math] and [math](0,5)[/math], [math]L_2[/math] be the line segment joining [math](0,0)[/math] and [math](3,0)[/math], and [math]L_3[/math] be the line segment joining [math](3,0)[/math] and [math](0,5)[/math]. [br][br](a) Parametrize [math]L_1[/math], [math]L_2[/math], and [math]L_3[/math].[br](b) Find the absolute maximum and minimum values of [math]f[/math] on [math]T[/math].[br][br][br](The applet below is the graph of [math]z=f(x,y)[/math] with the domain [math]T[/math].)[br][br]
[u]A real life application[/u][br][br]Suppose we want to made a rectangular box with open top using cardboard and its volume must be equal to [math]32 \ \text{ft}^3[/math]. Find the dimension of this box such that the least amount of cardboard is used.[br][br]We need to formulate the above problem as an optimization problem - finding the absolute minimum of a function on a domain. First we let the dimension of the box, breadth x width x height, be [math]x \times y \times z[/math] (all in ft).[br][br]Let [math]S(x,y,z)[/math] be the total area of cardboard used for making the box. Then we have[br][br][math]S(x,y,z)=xy+2xz+2yz[/math], [math]xyz=32[/math].[br][br]Combine them to eliminate [math]z[/math], we have[br][br][math]S(x,y)=xy+\frac{64}y+\frac{64}x[/math] with [math]x>0, \ y>0[/math].[br][br]And we need to minimize [math]S(x,y)[/math] among the domain [math]\left\{(x,y) \ | \ x>0, y>0\right\}[/math]. [br][br]Since the domain is not closed and bounded, we do not know if the absolute minimum is attained in the domain. First we find all critical point(s) of [math]f[/math]:[br][br][math]S_x=y-\frac{64}{x^2}=0\implies y=\frac{64}{x^2}[/math][br][math]S_y=x-\frac{64}{y^2}=0[/math][br][br]Combine the above, we get[br][br][math]x-64\cdot \left(\frac{x^2}{64}\right)^2=0[/math][br][math]\implies x\left(1-\frac{x^3}{64}\right)=0[/math][br][math]\implies x^3=64 \implies x=4 \implies y=4[/math][br][br]Therefore, [math](4,4)[/math] is the only critical point of [math]f[/math] and [math]S(4,4)=48[/math]. In other words, the absolute minimum value, if exists, must be equal or less than 48.[br][br]Let's analyze the function [math]S(x,y)=xy+\frac{64}y+\frac{64}x[/math]. Suppose [math]S(x,y)\leq 48[/math], [math]x[/math] and [math]y[/math] cannot be too small because of the terms [math]\frac{64}x[/math] and [math]\frac{64}y[/math]. Also, [math]xy[/math] cannot be too large. More precisely, [math]S(x,y)\leq 48[/math] implies the following inequalities:[br][br][math]xy\leq 48[/math][br][math]\frac{64}y\leq 48 \implies y\geq \frac 43[/math][br][math]\frac{64}x\leq 48 \implies x\geq \frac 43[/math][br][br]The set [math]R[/math] of all points satisfying these three inequalities is a closed and bounded set, as shown in the applet below.[br][br]Since [math]S(x,y)>48[/math] on the the boundary of [math]R[/math], absolute minimum cannot be attained on the boundary. Hence the critical point [math](4,4)[/math] must be the point at which the absolute minimum of [math]S[/math] is attained. [br][br]The required dimensions of the box (breadth x width x height) is [math]4\times 4 \times 2[/math]. [br]([math]z=2[/math] when [math]x=4, \ y=4[/math])[br][br][br]