Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Numerical Methods for Engineers and Scientists 3 rd Edition – An Introduction wi

ID: 2247120 • Letter: N

Question

Numerical Methods for Engineers and Scientists 3rd Edition – An Introduction with Applications Using MATLAB - Gilat | Subramaniam Problem 3.29

A quarterback throws a pass to his wide receiver running a route. The quarterback releases the ball at a height of hQ . The wide receiver is supposed to catch theball 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:

                y = x tan() - 1/2[x2 g/v02 cos2()] + hQ

where x and y are the horizontal and vertical distance, respectively, g = 32.2 ft/s2 is the acceleration due to gravity, v0 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 g = 32.2 ft/s², v0 = 50 ft/s, x = 60 ft, hQ = 6.5 ft, and hR = 7 ft, find the angle at which the quarterback must launch the ball.

Solve Problem 3.29 utilizing Newton’s Method, Secant Method, Bisection method and Regula Falsi method

Print table for each method include relative error and real error and how many iterations for convergance.

Use MATLAB built-in function fzero to determine the true value and add this result to the data table or list.

Provide the graph that shows the solution only.

Explanation / Answer

football=@(x) xXtan(theta)-(((0.5)X(x^2)*g)/(v0^2))X(1/(cos(theta))^2)+hq;

v0=50;
g=32.2;
x=60;
hq=6.5;
hR=7;


TolMax=.0001

a=2; b=3; imax=20; TolMax=0.00001;
fa = football(a);
fb = football(b);

n=(log(b-a)-log(TolMax))/log(2)

if fa*fb>0
disp('Error: function has the same sign at points a and b (same side of the solution)')

for i = 1:imax
xNS=(a+b)/2;
toli=(b-a)/2;
FxNS=F(xNS);
fprintf('%3i %11.6f %11.6f %11.6f %11.6f %11.6f ', i, a, b, xNS, FxNS, TolMax)
if FxNS==0
fprintf('An exact solution x=%11.6f was found', xNS)
break
end
if toli<TolMax
break
end
if i==imax
fprintf('solution was not obtained in %i iterations', imax)
break
end
if fa*FxNS<0
b=xNS;
else
a=xNS;
end
end
end
end

function [theta] = football( x, v0, g, hq )

y=x*tan(theta)-(((0.5)*(x^2)*g)/(v0^2))*(1/(cos(theta))^2)+hq;

end