Chapter 4: Partial Differentiation
Section 4.8: Unconstrained Optimization
Example 4.8.6
Find and classify the critical (i.e., stationary) points for x2−2⁢x+8+y2−4⁢y+z2+2⁢z.
Solution
Mathematical Solution
Critical points are the solution of the equations ∇f=0, that is, of the equations
2⁢x−2=0,2⁢y−4=0,2⁢z+2=0
There is but the one solution, namely, P:1,2,−1, a point that proves to be a local (relative) minimum where f1,2,−1=2.
To apply Sylvester's criterion, obtain the Hessian H=fxx(P)fxy(P)fxz(P)fxy(P)fyy(P)fyz(P)fxz(P)fyz(P)fzz(P) = 200020002 and the sequence of principal minors with 1 prepended: 1,2,4,8. There are no sign changes, so the critical point P is a local minimum.
Maple Solution - Interactive
Initialize
Tools≻Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Context Panel: Assign Name
f=x2−2⁢x+8+y2−4⁢y+z2+2⁢z→assign
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,∂∂ z f=0
→solve
x=1,y=2,z=−1
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
f
x2+y2+z2−2⁢x−4⁢y+2⁢z+8
→gradient
→to list
2⁢x−2,2⁢y−4,2⁢z+2
→equate to 0
Obtain f1,2,−1
Expression palette: Evaluation template
Context Panel: Evaluate and Display Inline
fx=a|f(x)x=1,y=2,z=−1 = 2
To apply the Sylvester criterion, the Hessian must be obtained. Unfortunately, there is no syntax-free way to obtain this matrix.
Obtain the Hessian and determine that it is positive definite
Apply the Hessian command from the VectorCalculus package.
Context Panel: Queries≻Is Definite?≻Positive Definite?
H≔VectorCalculus:-Hessianf,x,y,z = →is positive definite?true
Since the Hessian is a positive definite matrix, the second-derivative term in the Taylor series expansion of f simply adds to 2, the value of f at the critical point. So, near the critical point, function values are greater than 2, making the critical point a local minimum. Sylvester's criterion will determine that H is positive definite, and hence that the critical point is a minimum.
The sequence 1,Q1,Q2,Q3 = 1,2,4,8 is easily obtained for H, which is a diagonal matrix. Since there are no sign changes in the sequence, the critical point is a local (relative) minimum by the terms of Sylvester's criterion.
Maple Solution - Coded
Install the Student MultivariateCalculus package.
withStudent:-MultivariateCalculus:
Define f.
f≔x,y,z→x2−2⁢x+8+y2−4⁢y+z2+2⁢z:
Obtain critical points
Use the Gradient, Equate, and solve commands to solve the equations resulting from ∇f=0.
solveEquateGradientfx,y,z,x,y,z,0,0,0
The "Second-Derivative test" stated in the typical calculus text applies only to a function of two variables. For a function of three or more variables, a test based directly on the Hessian matrix of second-partials must be used. Sylvester's criterion avoids the need to explain "eigenvalues," one of the other ways for determining the behavior of the Hessian.
Apply Sylvester's criterion
Obtain the Hessian matrix from first principles.
H≔Matrix3,3,i,j→Di,jf1,2,−1
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..3
1,2,4,8
There are no sign changes in the sequence 1,Q1,…,Qn, so the critical point 1,2,−1 is a local (relative) minimum.
<< 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