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

13.1 Exercises Exercise 13.1 The flight of a baseball is governed by three force

ID: 2247015 • Letter: 1

Question

13.1 Exercises Exercise 13.1 The flight of a baseball is governed by three forces: gravity, drag due to air resistance, and Magnus force due to spin. If we ignore wind and Magnus force, the path of the baseball stays in a plane, so we can model it as a projectile in two dimensions. A simple model of the drag of a baseball is: where Fa is a vector that represents the force on the baseball due to drag, Ca is the drag coefficient (0.3 is a reasonable choice), is the density of air (1.3 kg/m 3 at sea level), A is the cross sectional area of the baseball (0.0042 m2), is the magnitude of the velocity vector, and V is a unit vector in the direction of the velocity vector. The mass of the baseball is 0.145 kg. In your solutions, consider initial baseball velocities over the range 50 to 100 mph (miles per hour), and launch angles between 30 and 50 degrees. As a starting point, use our human canonball example, Example 12.4 and Exercise 12.1 For more information about drag, see http://en.wikipedia.org/wiki/Drag_(physics). 1. Write a function that takes the initial velocity of the baseball and the launch angle as input variables, uses ode45 to compute the trajectory, and returns the range (horizontal distance in flight) as an output variable. 2. Write a function that takes the initial velocity of the baseball as an input variable computes the launch angle that maximizes the range, and returns the optimal angle and range as output variables. How does the optimal angle vary with initial velocity? Hint: Start with your solution to the first part. Create a for loop to loop over angles from 30 to 50 degrees in increments of 5 degrees, and use your function from the first part to compute the distance traveled. 3. When the Red Sox won the World Series in 2007, they played the Colorado Rockies at their home field in Denver, Colorado. Find an estimate of the density of air in the Mile High City. What effect does this have on drag? Make a prediction about what effect this will have on the optimal launch angle, and then use your simulation

Explanation / Answer

1)


function res = baseball_trajectory(t, params)
Pos = params(1:2);
Velocity = params(3:4);
dPdt = Velocity;
dVdt = baseball_acceleration(t, Pos, Velocity);
res = [dPdt; dVdt];
end
function res = baseball_acceleration(t, p, v)
Cd=0.3;
rho=1.3;
A=0.0042;
m=0.145;
g = -9.81;
v=sqrt((2*m*g)/(rho*A*Cd)).*tanh(t.*sqrt((g*rho*Cd*A)/(2*m)));
Fd=(0.5*rho*Cd*A).*(v.^2);
a_drag = Fd / m;
a = g + a_drag;
res=[0;a];
end

2)


function range = calculateRange(v, theta)
options = odeset('Events', @events);
theta = theta * pi / 180;
vx = v*cos(theta);
vy = v*sin(theta);
[T, M] = ode45(@baseball_trajectory, [0, 10], [0, 0, vx, vy], options);
plot(M(:,1), M(:,2))
range = M(end,1);
end
function [value,isterminal,direction] = events(t,params)
value = params(2);
isterminal = 1;
direction = -1;
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote