Chapter 4: Partial Differentiation
Section 4.8: Unconstrained Optimization
Find and classify the critical (i.e., stationary) points for fx,y=x y+2 x−3 y+1.
Critical points are the solution of the equations ∇f=0, that is, of the equations
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
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
Student Multivariate Calculus
Context Panel: Assign Name
f=x y+2 x−3 y+1→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, 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
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=3,y=−2 = −1
∂2∂x2 fx=a|f(x)x=3,y=−2 = 0
Expression palette: Evaluation template
fx=a|f(x)x=3,y=−2 = 7
Maple Solution - Coded
Install the Student MultivariateCalculus package.
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.
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= −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 = 0110
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.
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 = 0110
<< 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)