Need help finishing off the last bit for a projectile trajectory problem

this is the problem:

A projectile is fired with an initial speed u and at an angle of elevation ®. The air
resistance is known to be quadratic and the terminal velocity has a magnitude vt. Show
that the equations of motion for the projectile can be cast into the form
y' = f (t; y); t >= 0

Using MATLAB solve the differential equations for an initial speed of 200 ms¡1,
an angle of elevation of 45± and a terminal velocity of 250 ms¡1. Plot the trajectory of
the projectile and, on the same graph, plot the trajectory that the projectile would have
in the absence of air resistance. Use a time range that allows both trajectories to at least

Related Introductory Physics Homework Help News on Phys.org
and here is what i've got so far..

Initial speed = m
Angle of elevation = a

y = é x ù é vx ù é 0 ù
| vx ô , f(t,y) = | -gvt-2vx Övx2 + vz2 | , y(0) = | m cos a |
| z | | vz | | 0 |
ë vz û ë -g(1 + vt-2vzÖvx2 + vz2 û ë m sin a û

Where x and z are the horizontal and vertical coordinates and vx and vz are the corresponding velocities.

The position of the projectile at time t is given by:

x = (m cos a ) t ( 1 – e–t/t )

y = -gvtt + t (m sin a + gvt) (1 – e–t/t )

Where gvt is the magnitute of the terminal velocity.

Matlab code

global vterm tau v0y
g = 9.8;
vterm = 250;
tau = vterm/g;
v0 = 200;
alpha = 45;
time = 0:2:50
range = time;
n = length(time);
for i = 1:n
angle = alpha(i)*pi/180;
v0x = v0*cos(angle);
v0y = v0*sin(angle);
time = fzero(’yproject’,[10;50]);
range(i) = v0x*tau*(1-exp(-time/tau));
end
plot(alpha, range);
xlabel(’Elevation (degrees)’);
ylabel(’Range (metres)’);
which also uses the MATLAB function:
function ypos = yproject(t)
global vterm tau v0y
ypos = -vterm*t + tau*(v0y+vterm)*(1-exp(-t/tau));