Chapter3 Prob29
Chapter3 Prob29
Solution
x g 1 2
The solution is the root of the function f ( θ ) = x tan ( θ ) – 1--- ------- - + hQ – 7 .
- ------------------
2 2 v o cos ( θ )
2
A plot of the function (shown on the right) for the domain [ 0.1, 1.2 ] is obtained with MATLAB by typing:
>> fplot('60*tan(th)-60^2*32.2/(2*50^2*cos(th)^2)+6.5-7',[0.1,1.2])
The figure shows that the function has two roots in this domain. 15
One root between th = 0.4 rad and th = 0.6 rad, and one root 10
1 x2g 1 -10
-20
-25
function f = FunHW3_28(th) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.
2
(a) In the Command Window, the user-defined function BisectionRoot is then used for finding the
roots. The first root:
>> Xs = BisectionRoot(@FunHW3_29,0.4,0.6)
Xs =
0.4524
>> Xs = BisectionRoot(@FunHW3_29,1.0,1.2)
Xs =
1.1267
(b) Using MATLAB’s built-in fzero function (in the Command Window) to find the first root:
>> fzero(@FunHW3_29,0.4)
ans =
0.4524
>> fzero(@FunHW3_28,1.0)
ans =
1.1267
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.