Some times we are interested in derivatives of higher order e.g when we want to use Newton’s Method for optimization, which requires second-order derivatives (Nocedal and Wright, 2006).
H=[∂2f∂x2∂2f∂x∂y∂2f∂x∂y∂2f∂y2]
Local Minimum or Maximum Test:
This is negative definite making it a local maximum of the function.
f(x,y)=x3−12x+y3−75y+91 Find the local minima and maxima.
We'll follow these steps:
Consider a function f:R2→R of two variables x,y. We use the following notation for higher-order partial derivatives (and for gradients):
∂2f∂x2 is the second partial derivative of f with respect to x.
∂nf∂xn is the nth partial derivative of f with respect to x.
∂2f∂y∂x=∂∂y(∂f∂x)
is the partial derivative obtained by first partial differentiating with respect to x and then with respect to y.
∂2f∂x∂y is the partial derivative obtained by first partial differentiating by y and then x.
The Hessian is the collection of all second-order partial derivatives.
If f(x,y) is a twice continuously differentiable function, then
∂2f∂x∂y=∂2f∂y∂x
i.e., the order of differentiation does not matter, and the corresponding Hessian matrix.
is symmetric. The Hessian is denoted as ▽2x,yf(x,y). Generally for x∈Rn and f:Rn→R, the Hessian is an n×n matrix. The hessian measures the curvature of the function locally around (x,y).
General Hessian Matrix
H=[∂2f∂x21∂2f∂x1∂x2⋯∂2f∂x1∂xn∂2f∂x2∂x1∂2f∂x22⋯∂2f∂x2∂xn⋯⋯⋯⋯∂2f∂xn∂x1∂2f∂xn∂x2⋯∂2f∂x2n]Hessian of a vector field : if f:Rn→Rm is a vector field, the Hessian is an (m×n×n) is tensor.
Hessians are used in Machine Learning for the determination of local minima and local maxima for solving the optimization problems.
Conditions for minima ,maxima and saddle point
The Hessian of a function is denoted by ▽2x,yf(x,y), where f is twice differentiable function and if f(x0,y0) is one of its stationary point then
▽2x,yf(x0,y0)>0 i.e, positive definite (x0,y0) is a point of local minimum.
▽2x,yf(x0,y0)<0 i.e, negative definite (x0,y0) is a point of local maximum.
▽2x,yf(x0,y0) is neither positive nor negative i.e. Indefinite , (x0,y0) is a saddle point
The determinant (D) of the Hessian matrix can be used to determine whether a critical point of a function is a local minimum, local maximum, or a saddle point. Here's how it works:
Local Minimum or Maximum Test:
If the determinant(D) of the Hessian matrix at a critical point is positive , it indicates that the function is curving upward and downward in both directions of the critical point, suggesting the possibility of a local minimum or maximum.
If the determinant(D) is negative , it indicates that the function is curving differently in different directions, which suggests that the critical point is a saddle point.
Determining Minima or Maxima:
To further classify whether the critical point is a local minimum or maximum, you can examine the signs of the second-order partial derivatives. Specifically, look at the signs of ∂2f∂x2 and ∂2f∂y2 (or corresponding partial derivatives in higher dimensions).
If both ∂2f∂x2 and ∂2f∂y2 are positive at the critical point (i.e., the leading principal minors of the Hessian matrix are positive), then it's a local minimum.
If both ∂2f∂x2 and ∂2f∂y2 are negative at the critical point, then it's a local maximum.
If one of them is positive while the other is negative, it's a saddle point.
Please note that this test applies to functions of two variables (i.e.,f(x,y)), and the classification of critical points can be more complex in higher dimensions. Additionally, when D=0, the test is inconclusive, and further analysis may be needed.
Example:
Let the function f(x,y)=x2+y2 . It's second order partial derivatives exist and they're continuous throughout the Domain .Find the Hessian Matrix
∂2f∂x2=2
∂2f∂y2=2
∂2f∂x∂y=0
∂2f∂y∂x=0
H=[∂2f∂x2∂2f∂x∂y∂2f∂x∂y∂2f∂y2]
H=[2002]
Suppose a function is defined by f(x,y)=x4−32x2+y4−18y2 . Find the maximum and minimum value of the function if it exists. Justify your answer.
∂2f∂x2=12x2−64
∂2f∂y2=12y2−36
∂2f∂x∂y=0
∂2f∂y∂x=0
H=▽2x,yf(x,y)=[12x2−640012y2−36]
We solve for the Stationary points of the function f(x,y) by equating it's partial derivatives ∂f∂x and ∂f∂y to 0.
4x(x2−16)=0⟹x=±4,0
4y(y2−9)=0⟹y=±3,0
The possible pairing gives us critical points (±4,±3),(±4,0),(0,±3),(0,0)
Now as the Hessian consists of even functions which reduces a lot of effort. we only need to check for the pairs (4,3),(4,0),(0,3),(0,0).
▽2x,yf(4,3)=[1280072]
It's positive definite matrix and thus it's the local minimum of the function.▽2x,yf(4,0)=[12800−36]
It's indefinite thus ruled out.▽2x,yf(0,3)=[−640072]
It's indefinite thus ruled out.▽2x,yf(0,0)=[−6400−36]
So f(0,0)≥f(x,y)≥f(±4,±3)
Thus we have bounded the above function and it's point of local minimum is (±4,±3) and point of local maximum is (0,0)
Calculate the first-order partial derivatives.
Find the critical points by setting both partial derivatives equal to zero.
Use the second-order partial derivatives to classify these critical points.
Step 1: Calculate the first-order partial derivatives:
∂f∂x=3x2−12
Find the critical points by setting both partial derivatives equal to zero.
Use the second-order partial derivatives to classify these critical points.
Step 1: Calculate the first-order partial derivatives:
∂f∂x=3x2−12
∂f∂x=3y2−75
Step 2: Find the critical points by setting both partial derivatives equal to zero:
3x2−12=0(Equation 1)3y2−75=0(Equation 2)Solve for x and yx=±2y=±5So the critical points are (2,5),(−2,5),(2,−5),(−2,−5)
The Hessian matrix is given by:
H(2,5)=[120030]H(−2,−5)=[−1200−30]H(2,−5)=[1200−30]H(−2,5)=[−120030]So H(2,5) is the local minima and H(−2,−5) is the local maxima.
Step 3: Use the second-order partial derivatives to classify these critical points. We'll calculate the Hessian matrix and evaluate it at each critical point:
The Hessian matrix is given by:
H=[6x006y]
H(2,5)=[120030]H(−2,−5)=[−1200−30]H(2,−5)=[1200−30]H(−2,5)=[−120030]So H(2,5) is the local minima and H(−2,−5) is the local maxima.
Comments
Post a Comment