# channelflow.org

### Site Tools

gibson:teaching:fall-2012:math445:lab12

# Math 445: Projectile motion

It is easy to determine the trajectory of a projectile subject to gravity if you neglect air resistance. using elementary physics and calculus, you can show that a projectile will travel farthest across a flat surface if you shoot it at an angle above the horizontal. In this problem you will determine the optimal angle and the maximum range of a projectile subject to air resistance. Use the following equations of motion, developed during class

The constant is the acceleration due to gravity. The constant in the air resistance term depends on physical characteristics of the projectile and the air. We will solve the problem for an iron cannonball 20cm in diameter. The following code will calculate correctly given appropriate physical constants

rho_air  = 1.28; % kg/m^3, density of air
rho_iron = 7870; % kg/m^3, density of iron 7.87 gm/cm^3 == 0.00787 kg/(0.01m)^3 = 7870 kg/m^3
C_D = 1;         % drag coefficient for sphere
g = 9.81;        % m/s^2, acceleration due to gravity
r = 0.10;        % m, radius of cannonball
A = pi*r^2;      % cross-sectional area of cannonball
m = rho_iron*4/3*pi*r^3; % mass of cannonball

mu = rho_air*C_D*A/(2*m); % coefficient of nonlinear v|v| term, in mks units

Write a Matlab script to plot the trajectory of a cannonball subject to the above equations of motion and shot with an initial speed of 100 m/s at an angle above the horizontal. In the same plot, show the trajectory in the (x,y) plane of the cannonball with and without air resistance. Use your script to answer the following questions:

(a) How far does the cannonball go in x with and without air resistance, if you shoot it at ?

(b) What initial angle gives the farthest range with air resistance?

(c) If , how much do you have to increase the initial velocity so the x distance is as large as it is without air resistance?

Answering these questions with any precision will require some cleverness and a number of Matlab programming concepts you've learned through the semester.