Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Videos

Textbook Question
Book Icon
Chapter 14, Problem 5P

Find the gradient vector and Hessian matrix for each of the following functions:

(a) f ( x , y ) = 2 x y 2 + 3 e x y

(b) f ( x , y , z ) = x 2 + y 2 + 2 z 2

(c) f ( x , y ) = In ( x 2 + 2 x y + 3 y 2 )

(a)

Expert Solution
Check Mark
To determine

To calculate: The gradient vector and Hessian matrix for the function f(x,y)=2xy2+3exy.

Answer to Problem 5P

Solution:

The gradient vector for the function f(x,y)=2xy2+3exy is {2y2+3yexy4xy+3xexy}.

The Hessian matrix for the function f(x,y)=2xy2+3exy is,

[3y2exy4y+3yxexy+3exy4y+3yxexy+3exy4x+3x2exy]

Explanation of Solution

Given:

The function f(x,y)=2xy2+3exy.

Formula used:

The gradient vector for the function f(x,y) is,

f(x,y)={fxfy}

The Hessian matrix for the function f(x,y) is given by,

H=[2fx22fxy2fyx2fy2]

Calculation:

Consider the function,

f(x,y)=2xy2+3exy

Partial differentiate the above function with respect to x,

fx=x(2xy2+3exy)=x(2xy2)+x(3exy)=2y2+3yexy

Again, partial differentiate the above equation with x,

2fx2=x(2y2+3exy)=x(2y2)+x(3yexy)=0+3y2exy=3y2exy

Partial differentiate the fx=2y2+3yexy with respect to y,

2fyx=y(2y2+3yexy)=y(2y2)+y(3yexy)=4y+3yxexy+3exy

Now, partial differentiate the function f(x,y)=2xy2+3exy with respect to y,

fy=y(2xy2+3exy)=y(2xy2)+y(3exy)=2x×2y+3xexy=4xy+3xexy

Again, partial differentiate the above equation with y,

2fy2=y(4xy+3xexy)=y(4xy)+y(3xexy)=4x+3x2exy

Partial differentiate the fy=4xy+3xexy with respect to x,

2fxy=x(4xy+3xexy)=x(4xy)+x(3xexy)=4y+3yxexy+3exy

Therefore, the gradient vector for the function is,

f(x,y)={2y2+3yexy4xy+3xexy}

And, the Hessian matrix for the function is,

H=[3y2exy4y+3yxexy+3exy4y+3yxexy+3exy4x+3x2exy]

(b)

Expert Solution
Check Mark
To determine

To calculate: The gradient vector and Hessian matrix for the function f(x,y,z)=x2+y2+2z2.

Answer to Problem 5P

Solution:

The gradient vector for the function f(x,y,z)=x2+y2+2z2 is {2x2y4z}.

The Hessian matrix for the function f(x,y,z)=x2+y2+2z2 is [200020004].

Explanation of Solution

Given:

The function f(x,y,z)=x2+y2+2z2.

Formula used:

The gradient vector for the function f(x,y,z) is,

f(x,y,z)={fxfyfz}

The Hessian matrix for the function f(x,y,z) is given by,

H=[2fx22fxy2fxz2fyx2fy22fyz2fzx2fzy2fz2]

Calculation:

Consider the function,

f(x,y,z)=x2+y2+2z2

Partial differentiate the above function with respect to x,

fx=x(x2+y2+2z2)=x(x2)+x(y2)+x(2z2)=2x+0+0=2x

Again, partial differentiate the above equation with x,

2fx2=x(2x)=2

Partial differentiate the fx=2x with respect to y,

2fyx=y(2x)=0

Partial differentiate the fx=2x with respect to z,

2fzx=z(2x)=0

Now, partial differentiate the function f(x,y,z)=x2+y2+2z2 with respect to y,

fy=y(x2+y2+2z2)=y(x2)+y(y2)+y(2z2)=0+2y+0=2y

Again, partial differentiate the above equation with y,

2fy2=y(2y)=2

Partial differentiate the fy=2y with respect to x,

2fxy=x(2y)=0

Partial differentiate the fy=2y with respect to z,

2fzy=z(2y)=0

Now, partial differentiate the function f(x,y,z)=x2+y2+2z2 with respect to z,

fz=z(x2+y2+2z2)=z(x2)+z(y2)+z(2z2)=0+0+2×2z=4z

Again, partial differentiate the above equation with z,

2fz2=z(4z)=4

Partial differentiate the fy=4z with respect to x,

2fxz=x(4z)=0

Partial differentiate the fy=4z with respect to y,

2fyz=y(4z)=0

Therefore, the gradient vector for the function is,

f(x,y)={2x2y4z}

And, the Hessian matrix for the function is,

H=[200020004]

(c)

Expert Solution
Check Mark
To determine

To calculate: The gradient vector and Hessian matrix for the function f(x,y)=ln(x2+2xy+3y2).

Answer to Problem 5P

Solution:

The gradient vector for the function f(x,y)=ln(x2+2xy+3y2) is {2y2+3yexy4xy+3xexy}.

The Hessian matrix for the function f(x,y)=ln(x2+2xy+3y2) is,

[2x24xy+2y22x212xy6y22x212xy6y22x212xy18y2](x2+2xy+3y2)2

Explanation of Solution

Given:

The function f(x,y)=ln(x2+2xy+3y2).

Formula used:

The gradient vector for the function f(x,y) is,

f(x,y)={fxfy}

The Hessian matrix for the function f(x,y) is given by,

H=[2fx22fxy2fyx2fy2]

Calculation:

Consider the function,

f(x,y)=ln(x2+2xy+3y2)

Partial differentiate the above function with respect to x,

fx=x{ln(x2+2xy+3y2)}=1x2+2xy+3y2x(x2+2xy+3y2)=1x2+2xy+3y2(2x+2y)=2x+2yx2+2xy+3y2

Again, partial differentiate the above equation with x,

2fx2=x(2x+2yx2+2xy+3y2)=(x2+2xy+3y2)x(2x+2y)(2x+2y)x(x2+2xy+3y2)(x2+2xy+3y2)2=(x2+2xy+3y2)×2(2x+2y)(2x+2y)(x2+2xy+3y2)2

Simplify furthermore,

2fx2=(2x2+4xy+6y2)(4x2+8xy+4y2)(x2+2xy+3y2)2=2x2+4xy+6y24x28xy4y2(x2+2xy+3y2)2=2x24xy+2y2(x2+2xy+3y2)2

Partial differentiate the fx=2x+2yx2+2xy+3y2 with respect to y,

2fyx=y(2x+2yx2+2xy+3y2)=(x2+2xy+3y2)y(2x+2y)(2x+2y)y(x2+2xy+3y2)(x2+2xy+3y2)2=(x2+2xy+3y2)×2(2x+2y)(2x+6y)(x2+2xy+3y2)2

Simplify furthermore,

2fyx=(2x2+4xy+6y2)(4x2+16xy+12y2)(x2+2xy+3y2)2=2x2+4xy+6y24x216xy12y2(x2+2xy+3y2)2=2x212xy6y2(x2+2xy+3y2)2

Now, partial differentiate the function f(x,y)=ln(x2+2xy+3y2) with respect to y,

fy=y{ln(x2+2xy+3y2)}=1x2+2xy+3y2y(x2+2xy+3y2)=1x2+2xy+3y2×(2x+6y)=2x+6yx2+2xy+3y2

Again, partial differentiate the above equation with y,

2fy2=y(2x+6yx2+2xy+3y2)=(x2+2xy+3y2)y(2x+6y)(2x+6y)y(x2+2xy+3y2)(x2+2xy+3y2)2=(x2+2xy+3y2)×6(2x+6y)(2x+6y)(x2+2xy+3y2)2=(6x2+12xy+18y2)(4x2+24xy+36y2)(x2+2xy+3y2)2

Simplify furthermore,

2fy2=6x2+12xy+18y24x224xy36y2(x2+2xy+3y2)2=2x212xy18y2(x2+2xy+3y2)2

Partial differentiate the fy=2x+6yx2+2xy+3y2 with respect to x,

2fxy=x(2x+6yx2+2xy+3y2)=(x2+2xy+3y2)x(2x+6y)(2x+6y)x(x2+2xy+3y2)(x2+2xy+3y2)2=(x2+2xy+3y2)×2(2x+6y)(2x+2y)(x2+2xy+3y2)2=(2x2+4xy+6y2)(4x2+16xy+12y2)(x2+2xy+3y2)2

Simplify furthermore,

2fxy=2x2+4xy+6y24x216xy12y2(x2+2xy+3y2)2=2x212xy6y2(x2+2xy+3y2)2

Therefore, the gradient vector for the function is,

f(x,y)={2x+2yx2+2xy+3y22x+6yx2+2xy+3y2}

And, the Hessian matrix for the function is,

H=[2x24xy+2y2(x2+2xy+3y2)22x212xy6y2(x2+2xy+3y2)22x212xy6y2(x2+2xy+3y2)22x212xy18y2(x2+2xy+3y2)2]=[2x24xy+2y22x212xy6y22x212xy6y22x212xy18y2](x2+2xy+3y2)2

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Compute the gradient vector and the Hessian Matrix for the function f(u , v) = u5 – 3u2v + v2.
Find the gradient vector and the Hessian matrix for each of the functions following:
Find the standard matrix for the linear transformation T.T(x, y) = (x + 2y, x − 2y)
Knowledge Booster
Background pattern image
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:9781305658004
Author:Ron Larson
Publisher:Cengage Learning
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
Basic Differentiation Rules For Derivatives; Author: The Organic Chemistry Tutor;https://www.youtube.com/watch?v=IvLpN1G1Ncg;License: Standard YouTube License, CC-BY