> restart;
We begin by showing that the trajectory of an object in free-fall, i.e. subjected only to
the force of gravity, takes on a parabolic trajectory. Since we can use the equations of
motion to describe the x and y motions independently, we can just ask Maple to give us
the equation that relates y to x by solving one equation for the time, then using that expression
to eliminate time from the other expression.
> subs(t = (x-x0)/v0x, y=y0 + v0y*t-1/2*g*t^2);
> plot(subs({x0=0, y0=10, v0x=5, v0y=0, g=9.8}, rhs(%)), x=0..10);
We see that the expression for y is quadratic in x, i.e. we have shown that the function
y(x) is a 2nd order polynomial in x, hence it describes a parabola. Note that in free-fall
problems x will always be a linearly dependent on time. The gravitational force ensures
that y will always be quadratically dependent on time, hence, if gravity is the ONLY force
acting, then y will always be quadratically dependent on time and on horizontal position,
so ALL free-fall trajectories lead to parabolic paths.
Solution to the BaseBall Problem
First, we need to write down the equations for the motion along x and along y. We have
x = x0 + v0*cos(theta)*t and y = y0 + v0*sin(theta)*t - 1/2*g*t^2. Solving the x equation
for t and plugging this into the expression for y yields
> restart;
> y := subs(t = (x - x0)/(v0*cos(theta)), y0 + v0*sin(theta)*t - 1/2*g*t^2);
> plot(subs({theta=63*Pi/180, x0=0, y0=1, v0=40, g=9.8}, y), x=0..120);
> solve({y=3}, {v0});
> evalf(subs({theta=63*Pi/180, x0=0, y0=1, g=9.8, x=100}, %[1]));
Let's solve the skeet shot problem.
Begin with the equations for motion. Since the bullet starts out 1 second after
the clay target, let's set the time for clay target as t+1 where t represents time
since the bullet was fired.
First the, bullet x position as a function of time
> x1 := x01 + v01*cos(theta)*t;
Now the clay target's x position
> x2 := x02 + v02*cos(phi)*(t+1);
The bullet's y position
> y1 := y01 + v01*sin(theta)*t - 1/2*g*t^2;
Finally, the clay target's y position
> y2 := y02 + v02*sin(phi)*(t+1) - 1/2*g*(t+1)^2;
Plug in the values that are known
> x01:= 0: x02:= 10: y01:= 2: y02:= 0: v01:= 400: v02:= 60: phi:= Pi/4: g:= 9.8:
Let Maple and the computer do all the hard labor
> solve({x1=x2, y1=y2}, {t,theta});
We have to interpret the results: only the positive value for theta makes physical sense (Why?),
so the bullet hits the target 0.18 seconds after it leaves the gun if the shooter aims very high, 0.60 radians
is about 34.6 degrees. Plot the solution to take a look.
> plot({[subs(theta=0.6035681,x1), subs(theta=0.6035861,y1), t=0..10], [x2, y2, t=0..10]});
Doesn't the plot of the bullet's trajectory look a little strange? Why is that?
Let's do the hunter-monkey problem. First, note that the motion of the monkey is given by the expressions:
> restart;
> xm := x0m;
> ym := y0m - 1/2*g*t^2;
These expressions give the position of the monkey as a function of time and result from the fact
that the monkey has no acceleration in the vertical direction and no initial velocity along the
horizontal or vertical direction. We also know that x0m = h and y0m = d if set the origin of our
coordinate system to be the end of the dart gun. For the dart, then, we must have the following
expressions for the position of the dart as a function of time
> xd := 0 + v0d*cos(theta)*t;
> yd := 0 + v0d*sin(theta)*t - 1/2*g*t^2;
Here, we call the initial velocity of the dart v0d and its direction is at angle theta with respect to the
horizontal. The initial position of the dart is at the end of the dart gun and thus at (0,0) for our
coordinate system.
The definition of a hit is that xm = xd and ym = yd for the same time t, i.e. the dart and the monkey
are the same position at the same time. This means that xd = h and yd = h - 1/2*g*t^2 for time t.
One way of answering our question is to note that, if for any positive values of h and d we can find
a positive time t which satisfies these equations, then we are done, i.e. at some point in time,
the dart and the monkey will meet for any distances h and d. But what do we do about theta?
Note that theta is the initial angle of the dart w.r.t. the horizontal. Since the dart gun is aiming at
the monkey's initial position, we must have tan(theta) = d/h so theta is defined once we declare
particular values of d and h. But can we get a solution for some time t for any positive values of
h and d?
> assume(h>0, d>0);
> solve({xd=h, yd=h - 1/2*g*t^2});
Sometimes we can't get Maple to give us a nice solution easily. We have to help it along since
we know what form of a solution constitutes an answer. First, note that both ym and yd end
in -1/2*g*t^2. Since we want ym = yd, these terms will cancel and we have a solution if,
for some t, yd = v0d*sin(theta)*t = y0m = d. We also want xd = v0*cos(theta)*t = xm = h
at the same time t. The confusing part for Maple is what to do with theta, however, we
can eliminate theta by formulating the sum xd^2 + yd^2, since
xd^2 + yd^2 = (v0d*t)^2*(sin(theta)^2 + cos(theta)^2) = (v0d*t)^2 = xm^2 + ym^2 = h^2 + d^2.
Thus, the equation we want is
> t := sqrt((h^2 + d^2)/v0t^2);
Clearly, for any positive values of h and d we will have a solution for t.