1 CHAPTER 14 14 1 The partial derivatives can be evaluated f 2 x 2 2 4 x f 4 y 4 2 8 y The angle in the direction of h is 3 tan 1 0 982794 radians 56 30993 2 The directional derivative can be computed as g 0 4 cos 0 982794 8sin 0 982794 8 875203 14 2 The elevation can be determined as f 0 8 1 2 2 0 8 1 2 1 5 1 2 1 25 0 8 2 2 1 2 2 5 5 04 The partial derivatives can be evaluated f 2 y 2 5 x 2 1 2 2 5 0 8 0 4 x f 2 x 1 5 4 y 2 0 8 1 5 4 1 2 1 7 y which can be used to determine the gradient as f 0 4i 1 7j This corresponds to the direction tan 1 1 7 0 4 1 3397 radians 76 76o This vector can be sketched on a topographical map of the function as shown below 2 1 6 1 2 0 8 0 4 0 0 0 4 0 8 1 2 1 6 2 The slope in this direction can be computed as 0 42 1 7 2 1 746 PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual may be displayed reproduced or distributed in any form or by any means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If you are a student using this Manual you are using it without permission 2 14 3 The partial derivatives can be evaluated f 3 x 2 25 y x f 2 25 x 4 y 1 75 y These can be set to zero to generate the following simultaneous equations 3x 2 25 y 0 2 25 x 4 y 1 75 which can be solved for x 0 567568 and y 0 756757 which is the optimal solution 14 4 The partial derivatives can be evaluated at the initial guesses x 1 and y 1 f 3 x 2 25 y 3 1 2 25 1 0 75 x f 2 25 x 4 y 1 75 2 25 1 4 1 1 75 0 y Therefore the search direction is 0 75i f 1 0 75h 1 0 5 0 5625h 0 84375h 2 This can be differentiated and set equal to zero and solved for h 0 33333 Therefore the result for the first iteration is x 1 0 75 0 3333 0 75 and y 1 0 0 3333 1 For the second iteration the partial derivatives can be evaluated as f 3 0 75 2 25 1 0 x f 2 25 0 75 4 1 1 75 0 5625 y Therefore the search direction is 0 5625j f 0 75 1 0 5625h 0 59375 0 316406h 0 63281h 2 This can be differentiated and set equal to zero and solved for h 0 25 Therefore the result for the second iteration is x 0 75 0 0 25 0 75 and y 1 0 5625 0 25 0 859375 PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual may be displayed reproduced or distributed in any form or by any means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If you are a student using this Manual you are using it without permission 3 1 2 1 0 1 2 0 8 max 0 6 0 4 0 2 0 0 0 2 0 4 0 6 14 5 a xy 2 f 2 y 3 yexy 4 xy 3xe 0 8 1 1 2 3 y 2 e xy H xy xy 4 y 3xye 3e 4 y 3xye xy 3e xy 4 x 3x 2 e xy b 2 x f 2 y 4 z 2 0 0 H 0 2 0 0 0 4 c 2x 2 y 2 2 x xy y 2 3 f 2x 6 y 2 2 x 2 xy 3 y 2 x 2 4 xy 2 y 2 2 x 2 12 xy 6 y 2 2 x 2 12 xy 6 y 2 2 x 2 12 xy 18 y 2 H 2 2 2 x 2 xy 3 y 14 6 The partial derivatives can be evaluated at the initial guesses x 1 and y 1 f 2 x 3 2 1 3 4 x f 2 y 2 2 1 2 2 y f 1 4h 1 2h 1 4h 3 2 1 2h 2 2 g h 4h 2 2 2h 1 2 Setting g h 0 gives h 0 5 Therefore x 1 4 0 5 3 y 1 2 0 5 2 Thus for this special case the approach converges on the correct answer after a single iteration This occurs because the function is spherical as shown below Thus the gradient for any guess points directly at the solution PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual may be displayed reproduced or distributed in any form or by any means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If you are a student using this Manual you are using it without permission 4 5 4 2 3 4 2 6 1 4 3 2 2 4 1 6 0 8 0 1 8 14 7 The partial derivatives can be evaluated at the initial guesses x 0 and y 0 f 4 2 x 8 x3 2 y 4 2 0 8 0 3 2 0 4 x f 2 2 x 6 y 2 2 0 6 0 2 y f 0 4h 0 2h 20h 20h2 512h4 g h 20 40h 2048h3 The root of this equation can be determined by bisection Using initial guesses of h 0 and 1 yields a root of h 0 24390 after 13 iterations with a 0 05 Therefore x 0 4 0 24390 0 976074 y 0 2 0 24390 0 488037 14 8 f 8 2 x 2 y x f 12 8 y 2 x y At x y 0 f 8 x f 12 y f 0 8h 0 12h g h g h 832h 2 208h At g h 0 h 0 125 Therefore x 0 8 0 125 1 y 0 12 0 125 1 5 14 9 The following code implements the random search algorithm in VBA It is set up to solve Prob 14 7 PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual may be displayed reproduced or distributed in any form or by any means without the prior written permission of the publisher or used beyond the limited distribution to teachers and …
View Full Document