Chapter 4: Partial Differentiation
Section 4.8: Unconstrained Optimization
Example 4.8.3
Find and classify the critical (i.e., stationary) points for fx,y=x y+2 x−3 y+1.
Solution
Mathematical Solution
Critical points are the solution of the equations ∇f=0, that is, of the equations
y+2=0,x−3=0
There is but the one solution, namely, P:3,−2. This point, subjected to the Second-Derivative test, proves to be a local (relative) maximum; at this point, f3,−2=7.
To implement the Second-Derivative test, calculate fxxP= 0, fyyP= 0, and fxyP=1 so that
T=fxxP⋅fyyP−fxy2P= −1
Since T<0, the critical point P is a saddle.
To apply Sylvester's criterion, obtain the Hessian H=fxx(P)fxy(P)fxy(P)fyy(P) = 0110 and the sequence of principal minors with 1 prepended: 1,0,−1. One of the principal minors is zero, so no conclusion can be drawn from Sylvester's criterion.
Figure 4.8.3(a) shows that portion of the surface generated by f that is consistent with the claim that the critical point is a saddle.
Figure 4.8.3(a) Surface generated by f
Maple Solution - Interactive
Initialize
Tools≻Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Context Panel: Assign Name
f=x y+2 x−3 y+1→assign
Solution via task template
Tools≻Tasks≻Browse:
Calculus - Multivariate≻Optimization≻
Critical Points and the Second Derivative Test
Objective Function f
f
x⁢y+2⁢x−3⁢y+1
List of Independent Variables
v≔x,y
v:=x,y
Equations ∇f=0
convertStudentMultivariateCalculusGradient,,list;
y+2,x−3
Critical Points
temp≔removehas,solve,v,Explicit,I:convertseqevalv,tempk,k=1..nopstemp,list
3,−2
Second Derivative Test
StudentMultivariateCalculusSecondDerivativeTest,v=;
LocalMin=,LocalMax=,Saddle=3,−2
Hessians and their Eigenvalues
Temp≔StudentMultivariateCalculusSecondDerivativeTest,v=,output=hessian: for k to nopsTemp do Tempk,convertLinearAlgebraEigenvaluesTempk,list; end do;
The one critical point, namely, 3,−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 one of the principal minors in the sequence 1,Q1,Q2=1,0,−1, the test fails and no conclusion can be drawn from this approach.
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
→solve
x=3,y=−2
Alternate calculation of the critical points
Type f and press the Enter key.
Context Panel: Student Multivariate Calculus≻ Differentiate≻Gradient
Context Panel: Conversions≻To List
Context Panel: Conversions≻Equate to 0
→gradient
→to list
→equate to 0
Second-Derivative test
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=3,y=−2 = −1
∂2∂x2 fx=a|f(x)x=3,y=−2 = 0
Obtain f3,−2
Expression palette: Evaluation template
fx=a|f(x)x=3,y=−2 = 7
Maple Solution - Coded
Install the Student MultivariateCalculus package.
withStudent:-MultivariateCalculus:
Define f.
f≔x,y→x y+2 x−3 y+1:
Obtain critical points
Use the Gradient, Equate, and solve commands to solve the equations resulting from ∇f=0.
solveEquateGradientfx,y,x,y,0,0
Apply the SecondDerivativeTest command to the critical point
SecondDerivativeTestfx,y,x,y=3,−2
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.
T≔D1,1f⋅D2,2f−D1,2f23,−2; D1,1f3,−2
−1
At the critical point, T= −1<0, so the critical point is a saddle, a point at which f assumes the value 7.
Apply Sylvester's criterion
Use the SecondDerivativeTest command to return the Hessian matrix
H≔SecondDerivativeTestfx,y,x,y=3,−2,output=hessian =
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.
1, seqLinearAlgebra:-DeterminantH1..k,1..k,k=1..2
1,0,−1
If any of the principal minors is zero, Sylvester's criterion fails. No conclusion can be drawn in this case.
An alternative way to obtain the Hessian:
Matrix2,2,i,j→Di,jf3,−2 =
<< Previous Example Section 4.8 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. 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