Chapter 4: Partial Differentiation
Section 4.8: Unconstrained Optimization
Find and classify the critical (i.e., stationary) points for fx,y=x y−x2−y2−2 x−2 y+4.
Critical points are the solution of the equations ∇f=0, that is, of the equations
There is but the one solution, namely, P:−2,−2. This point, subjected to the Second-Derivative test, proves to be a local (relative) maximum; at this point, f−2,−2=8.
To implement the Second-Derivative test, calculate fxxP= −2, fyyP= −2, and fxyP=1 so that
Since T>0 but fxxP<0, the critical point P is a local maximum.
To apply Sylvester's criterion, obtain the Hessian H=fxx(P)fxy(P)fxy(P)fyy(P) = −211−2 and the sequence of principal minors with 1 prepended: 1,−2,3. The signs alternate, so the critical point P is a local maximum.
Figure 4.8.2(a) shows that portion of the surface generated by f that is consistent with the claim that the critical point is a local maximum.
Figure 4.8.2(a) Surface generated by f
Maple Solution - Interactive
Student Multivariate Calculus
Context Panel: Assign Name
f=x y−x2−y2−2 x−2 y+4→assign
Solution via task template
Calculus - Multivariate≻Optimization≻
Critical Points and the Second Derivative Test
Objective Function f
List of Independent Variables
Second Derivative Test
Hessians and their Eigenvalues
Temp≔StudentMultivariateCalculusSecondDerivativeTest,v=,output=hessian: for k to nopsTemp do Tempk,convertLinearAlgebraEigenvaluesTempk,list; end do;
The one critical point, namely, −2,−2, is a local (relative) maximum. The Hessian matrix in the last line of the task template is the matrix of second partial derivatives evaluated at the critical point. Since a discussion of eigenvalues is beyond the scope of the typical multivariate calculus course, apply Sylvester's criterion to the Hessian. Since the signs in the sequence 1,Q1,Q2=1,−2,3 alternate, the critical point is a local maximum.
Find critical points via first principles
Calculus palette: Partial derivative operator
Press the enter key.
Context Panel: Solve≻Solve
∂∂ x f=0,∂∂ y f=0
Alternate calculation of the critical points
Type f and press the Enter key.
Context Panel: Student Multivariate Calculus≻
Context Panel: Conversions≻To List
Context Panel: Conversions≻Equate to 0
→equate to 0
Expression palette: Evaluation template
Calculus palette: Partial-derivative operators
Context Panel: Evaluate and Display Inline
∂2∂x2 f⋅∂2∂y2 f−∂2∂ y⁢∂ x f2x=a|f(x)x=−2,y=−2 = 3
∂2∂x2 fx=a|f(x)x=−2,y=−2 = −2
Expression palette: Evaluation template
fx=a|f(x)x=−2,y=−2 = 8
Maple Solution - Coded
Install the Student MultivariateCalculus package.
f≔x,y→x y−x2−y2−2 x−2 y+4:
Obtain critical points
Use the Gradient, Equate, and solve commands to solve the equations resulting from ∇f=0.
Apply the SecondDerivativeTest command to the critical point
Apply the second-derivative test from first principles
The differential operator D, applied to a function, returns a function. Hence, T=fxxfyy−fxy2 is a function evaluated at the one critical point.
At the critical point, T=3 and fxx<0, so the critical point is a local (relative) maximum; this maximum value is f−2,−2=8
Apply Sylvester's criterion
Use the SecondDerivativeTest command to return the Hessian matrix
H≔SecondDerivativeTestfx,y,x,y=−2,−2,output=hessian = −211−2
Generate the sequence 1,Q1,…,Qn, where the Qk are the principal minors.
Obtain a principal minor by applying the Determinant command to the appropriate submatrix of H.
Use the seq command to form the sequence of principal minors.
An alternative way to obtain the Hessian:
Matrix2,2,i,j→Di,jf−2,−2 = −211−2
<< Previous Example Section 4.8
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2021. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document
What kind of issue would you like to report? (Optional)