Consider the motion of a projectile that leaves a point (0, 0) with an initial velocity v0 and at an angle with the horizontal of a. If the projectile lands at a
location (xe, ye) and is subjected to a drag during flight that is proportional to the square of its velocity, then the four first-order equations governing its flight
are36
dv
dvy
–
1
g + cdvvy
2
dy
vy
dt
1
x
= – cdv
=
=
=
dx
dx
vx
dx
vx
dx
vx
where y is the vertical height of the projectile, x is the horizontal distance of travel, t is the
time, v and v are the horizontal and vertical components of the velocity v, respectively,
x y 2 2
cd is the drag coefficient, g is the gravity constant (9.8 m/s ), and v = v2x + v2y
These equations are valid only when v0 is large enough so that vx is greater than zero when it reaches xe. The test for this condition can be stated as, say, ƒvx ƒ 7
v0 * 10 – 6. If this condition is not satisfied, then the program’s execution must be terminated. Use error to cause the termination. This check is placed in the
beginning of the function that is called by ode45. The initial conditions are
v0x = v0 cos(a)
v0y = v0 sin(a) y = 0
t = 0
From the order in which the equations are written, let y1(x)
= vx, y2(x) = vy, y3(x) = y,
and y4(x) = t. For v0 = 180 m/s, cd
= 0.007, and a = 45° and for xfinal = 300m in ode45:
What is the value of the maximum elevation of the projectile and at what distance does this occur. Use spline and fminbnd to determine these values.
[Answer: y max = 137.26 m at x = 187.87 m.]
How long does it take for the projectile to travel xe when ye = 0. Use interp1 to determine these values. [Answer: xe = 280.77m and the time of travel is
10.353 s.]
A bungee jumper is preparing to make a high altitude jump from a hot air balloon using a length L of bungee line. In order to do so safely, the peak
acceleration, velocity, and total drop distance must be predicted so that the arresting force is not too great and the balloon is high enough so that the jumper
doesn’t hit the ground. Taking into account the aerodynamic drag forces, the governing equation is37
d2x
dx
2
k
+
cd signum1dx/dt2a
b
+
(x
– L)u(x – L) = g
dt2
dt
mJ
where g = 9.8 m/s2 is the acceleration of gravity, cd is proportional to the drag coeffi-cient and has the unit of m – 1, k is the spring constant of the bungee cord
in N/m, mJ is the mass of the jumper, and u(z) is the unit step function—that is, u(z) = 0 when z … 0 and u(z) = 1 when z 7 0. The programming is greatly simplified if
the logical operator described in Section 4.1 is used to describe u(t).
If L = 150 m, mJ = 70 kg, k = 10 N/m, co = 0.00324 m – 1, and the initial condi-tions are zero, then show that
The maximum distance traveled is 308.47 m, which occurs at 11.47 s.
The jumper will reach 150 m in 5.988 s traveling at a velocity of – 43.48 m/s.
The maximum acceleration will be – 12.82 m/s2( – 1.308 g) at 11.18 s.
The numerical results stated above were obtained by using spline on the appropriate outputs from ode45.