1
3.29 A quarterback throws a pass to his wide receiver
running a route. The quarterback releases the ball at a
height of h Q . The wide receiver is supposed to catch the
ball straight down the field 60 ft away at a height of h R .
The equation that describes the motion of the football is
the familiar equation of projectile motion from physics:
1 x2g 1
y = x tan ( θ ) – --- -------
- ------------------- + h Q
2 v o2 cos2 ( θ )
where x and y are the horizontal and vertical distance, respectively, g = 32.2 ft/s2 is the acceleration due to
gravity, v o is the initial velocity of the football as it leaves the quarterback’s hand, and θ is the angle the
football makes with the horizontal just as it leaves the quarterback’s throwing hand. For v o = 50 ft/s,
x = 60 ft, h Q = 6.5 ft, and h R = 7 ft, find the angle θ at which the quarterback must launch the ball.
(a) Use the user-defined function BisectionRoot that was developed in Problem 3.16.
(b) Use MATLAB built-in function fzero.
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
between th = 1.0 rad and th = 1.2 rad. 5
(a) To use the user-defined function BisectionRoot, given in 0
Problem 3.16, the following user-defined functions for -5
1 x2g 1 -10
f ( θ ) = x tan ( θ ) – --- -------
- ------------------- + h – y is written:
2 v o2 cos2 ( θ ) -15
-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
y = 7; x = 60; g = 32.2; h = 6.5; v = 50;
f = x*tan(th)-x^2*g/(2*v^2*cos(th)^2)+h-y;
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
The second root:
>> 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
The second root:
>> 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.