The function to be evaluated is a The function to be evaluated is The function to be evaluated is The function to be evaluated is The fzero function can be used to determine the root as If the height at which the throw leaves the right fielders arm is def

64 Thus, a root is located at about 0.0028. The fzero function can be used to refine this estimate, vroot = fzerofvol,0.0028 vroot = 0.00280840865703 The mass of methane contained in the tank can be computed as 3 m 317 . 1068 0.0028084 3 mass = = = v V

6.15 The function to be evaluated is

L h rh h r r h r r V h f ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ − − − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − − = − 2 1 2 2 cos To use MATLAB to obtain a solution, the function can be written as an M-file function y = fhh,r,L,V y = V - r2acosr-hr-r-hsqrt2rh-h2L; The fzero function can be used to determine the root as format long r = 2;L = 5;V = 8; h = fzerofh,0.5,[],r,L,V h = 0.74001521805594 65

6.16 a The function to be evaluated is

10 500 cosh 10 10 A A A A T T T T f + ⎟⎟ ⎠ ⎞ ⎜⎜ ⎝ ⎛ − = The solution can be obtained with the fzero function as format long TA = fzeroinline10-x10cosh500x+x10,1000 TA = 1.266324360399887e+003 b A plot of the cable can be generated as x = linspace-50,100; w = 10;y0 = 5; y = TAwcoshwxTA + y0 - TAw; plotx,y,grid

6.17 The function to be evaluated is

5 . 3 2 sin 9 − = − t e t f t π A plot can be generated with MATLAB, t = linspace0,2; y = 9exp-t . sin2pit - 3.5; plott,y,grid 66 Thus, there appear to be two roots at approximately 0.1 and 0.4. The fzero function can be used to obtain refined estimates, t = fzero9exp-xsin2pix-3.5,[0 0.2] t = 0.06835432096851 t = fzero9exp-xsin2pix-3.5,[0.2 0.8] t = 0.40134369265980

6.18 The function to be evaluated is

2 2 1 1 1 ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − + − = L C R Z f ω ω ω Substituting the parameter values yields 2 6 2 10 6 . 50625 1 01 . ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − × + − = − ω ω ω f The fzero function can be used to determine the root as fzero0.01-sqrt150625+.6e-6x-2.x.2,[1 1000] ans = 220.0202

6.19 The fzero function can be used to determine the root as

67 format long fzero240x525+0.540000x2-959.8x-959.80.43,1 ans = 0.16662477900186

6.20 If the height at which the throw leaves the right fielders arm is defined as y = 0, the y at 90

m will be –0.8. Therefore, the function to be evaluated is 180 cos 1 . 44 180 tan 90 8 . 2 πθ θ π θ − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + = f Note that the angle is expressed in degrees. First, MATLAB can be used to plot this function versus various angles. Roots seem to occur at about 40 o and 50 o . These estimates can be refined with the fzero function, theta = fzero0.8+90tanpix180-44.1.cospix180.2,0 theta = 37.8380 theta = fzero0.8+90tanpix180-44.1.cospix180.2,[40 60] theta = 51.6527 Thus, the right fielder can throw at two different angles to attain the same result. 6.21 The equation to be solved is 68 V h Rh h f − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − = 3 2 3 π π Because this equation is easy to differentiate, the Newton-Raphson is the best choice to achieve results efficiently. It can be formulated as 2 3 2 1 2 3 i i i i i i x Rx V x Rx x x π π π π − − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − − = + or substituting the parameter values, 2 3 2 1 10 2 1000 3 10 i i i i i i x x x x x x π π π π − − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − − = + The iterations can be summarized as iteration x i fx i fx i | ε a | 0 10 1094.395 314.1593 1 6.516432 44.26917 276.0353 53.458 2 6.356057 0.2858 272.4442 2.523 3 6.355008 1.26E-05 272.4202 0.017 Thus, after only three iterations, the root is determined to be 6.355008 with an approximate relative error of 0.017. 6.22 r = [-2 6 1 -4 8]; a = polyr a = 1 -9 -20 204 208 -384 polyvala,1 ans = b = poly[-2 6] b = 1 -4 -12 [q,r] = deconva,b q = 1 -5 -28 32 r = 0 0 0 0 0 0 69 x = rootsq x = 8.0000 -4.0000 1.0000 a = convq,b a = 1 -9 -20 204 208 -384 x = rootsa x = 8.0000 6.0000 -4.0000 -2.0000 1.0000 a = polyx a = 1.0000 -9.0000 -20.0000 204.0000 208.0000 -384.0000 6.23 a = [1 9 26 24]; r = rootsa r = -4.0000 -3.0000 -2.0000 a = [1 15 77 153 90]; r = rootsa r = -6.0000 -5.0000 -3.0000 -1.0000 Therefore, the transfer function is 1 3 5 6 2 3 4 + + + + + + + = s s s s s s s s G 70 CHAPTER 7 7.1 Aug = [A eyesizeA] Here’s an example session of how it can be employed.