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
A piston–cylinder device contains 50 kg of water at 250 kPa and 25°C. The cross-sectional area of the piston is 0.1 m2. Heat is now transferred to the water, causing part of it to evaporate and expand. When the volume reaches 0.26 m3, the piston reaches a linear spring whose spring constant is 100 kN/m. More heat is transferred to the water until the piston rises 20 cm more. NOTE: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part.       Determine the work done during this process.   The work done during this process is  kJ.
A 4-m × 5-m × 7-m room is heated by the radiator of a steam-heating system. The steam radiator transfers heat at a rate of 10,000 kJ/h, and a 100-W fan is used to distribute the warm air in the room. The rate of heat loss from the room is estimated to be about 5000 kJ/h. If the initial temperature of the room air is 10°C, determine how long it will take for the air temperature to rise to 25°C. Assume constant specific heats at room temperature. The gas constant of air is R = 0.287 kPa·m3/kg·K (Table A-1). Also, cv = 0.718 kJ/kg·K for air at room temperature (Table A-2).   Steam enters the radiator system through an inlet outside the room and leaves the system through an outlet on the same side of the room. The fan is labeled as W sub p w. The heat is given off by the whole system consisting of room, radiator and fan at the rate of 5000 kilojoules per hour.   It will take 831  Numeric ResponseEdit Unavailable. 831 incorrect.s for the air temperature to rise to 25°C.
A piston–cylinder device contains 50 kg of water at 250 kPa and 25°C. The cross-sectional area of the piston is 0.1 m2. Heat is now transferred to the water, causing part of it to evaporate and expand. When the volume reaches 0.26 m3, the piston reaches a linear spring whose spring constant is 100 kN/m. More heat is transferred to the water until the piston rises 20 cm more. NOTE: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part.       Determine the final pressure and temperature.   The final pressure is  kPa. The final temperature is  ºC.   Find the work done during the process
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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Basic Differentiation Rules For Derivatives; Author: The Organic Chemistry Tutor;https://www.youtube.com/watch?v=IvLpN1G1Ncg;License: Standard YouTube License, CC-BY