
Motion in a Plane
Let us now modify the problem of the free falling body. Once again we consider the motion of an object near the surface of the earth, so that the acceleration due to gravity is constant, a(t) = -g, with the acceleration being directed downward, and we assume that air resistance is negligible. However, we now consider the path of the object as it is thrown from an initial position of (x0, y0) with an initial velocity of v0, v0 > 0, at an angle of
with respect to the horizontal, where
is in the interval [0°, 90°] or [0 rad,
/2 rad].
In this case, the position of the object at time t has both a horizontal component, x(t), and a vertical component, y(t), given by the following:
x(t) = x0 + v0 cos(
) t
y(t) = -1/2 g t2 + v0 sin(
) t + y0.
Note that the point (x(t), y(t)) is the location of the object at time t, an auxiliary variable, which we shall refer to as a parameter. Both x and y are expressed in terms of this parameter. We say that the equations for x(t) and y(t) are parametric equations describing the path of the object.
In Mathematica, the command
ParametricPlot[{xfunct,yfunct},{var,varmin,varmax},options]
plots the graph of a curve described parametrically according to the functions (xfunct, yfunct) having the parameter var, where var varies over the interval [varmin, varmax]. There are certain options that can be used to modify the output of the plot of such a curve. We can obtain a list of the options available for the ParametricPlot command by means of the command
Options[ParametricPlot]
We will not list this set of options here, but if it so interests the reader, the list of options are available by means of this command.
-
Example 1: Suppose that a rock is thrown upward at 40 feet/sec at an angle of 30° =
/6 radians, with respect to the horizontal, and from a height of 20 feet.
a) Use Mathematica to plot the position of the rock through space.
b) Use this graph to approximate the maximum height that the rock reaches.
c) Use this graph to locate the approximate distance that the rock will travel before reaching the ground.
a) For this problem, our initial velocity is v0 = 40 feet/sec, the launching angle of the rock is
= 30° or
/6 radians, the initial height is y0 = 20 feet, and we can take x0 = 0 feet. Since the units of the problem are in feet and seconds, we take g = 32 feet/sec2. The position of the rock at time t is then given by the parametric equations
x(t) = 0 + 40 cos(30°) t
y(t) = -16 t2 + 40 sin(30°) t + 20.
We input these equations as functions in Mathematica as follows:
In[1]:= x[t_]=40*Cos[Pi/6]*t;
y[t_]=-16*t^2+40*Sin[Pi/6]*t+20;
We must use the radian measure,
/6, for the angle
instead of the degree measure, 30°, since the Mathematica trigonometric functions Sin and Cos recognize angles only in terms of radian measure. By experimenting with several plots of the above parametric equations, we obtain a graph on the time interval [0, 2] for which the curve fits reasonably well. Thus we graph the path of the rock with the command
In[2]:= ParametricPlot[{x[t],y[t]},{t,0,2},
PlotRange->{{0,70},{-5,30}}]
Out[2]= -Graphics-
For this problem, designating the range of the graph with the PlotRange option helps us to avoid confusion about the location of ground level. Note that the time interval for which the rock is above ground level is different than the interval along the x-axis for which the rock is above ground level. In fact, from the graph we see that the rock reaches the ground before 2 sec are completed, whereas it reaches the ground at around x = 66 feet.
b) To do this we will assume that we are in a notebooks interface. By clicking the left mouse button on the graphics cell once, creating a frame around the graph, and then moving the pointer around in the cell while holding down the Control and Alt keys, we center the pointer at the highest point on the curve and click the left mouse button once, leaving an additional point in this location. Releasing the Control and Alt keys, we select the command Copy from the Edit menu. After placing the text insertion point below the graphics cell, we select the command Paste from the Edit menu. We then obtain the coordinates of the point that we selected, a result which may vary with different efforts. The actual maximum height that the rock reaches is 26.25 feet.
c) Repeating the above procedure we approximate the location of the point where the graph crosses the x-axis. The actual distance the rock travels before reaching the ground is 66.0 feet, to two decimal places.
In the previous example we saw how we could obtain the location of a projectile with respect to its coordinates in space. We can use Mathematica to obtain a sense of the position of a projectile with respect to time by plotting the graph of the projectile at specific points in time that vary by a constant interval
t. To do this we generate a collection of points and place them in a list of paired values points. The command
ListPlot[points]
will then take this list and plot it in the plane.
-
Example 2: For the path of the rock from the previous example, approximate the time that the rock reaches its maximum height and the time that the rock reaches the ground by plotting a graph of the position of the rock at time t = 0.0 sec, 0.1 sec, 0.2 sec, 0.3 sec, ..., on the interval [0, 2].
This example requires that we plot a set of individual points rather than a continuous graph. To do this we must generate the points that we need to plot. Assuming the functions x[t] and y[t] are already defined, we can do this with a Table command as follows:
In[3]:= pts=Table[{x[t],y[t]},{t,0,2,.1}]
Out[3]= {{0, 20}, {3.4641, 21.84}, {6.9282, 23.36},
{10.3923, 24.56}, {13.8564, 25.44},
{17.3205, 26.}, {20.7846, 26.24},
{24.2487, 26.16}, {27.7128, 25.76},
{31.1769, 25.04}, {34.641, 24.},
{38.1051, 22.64}, {41.5692, 20.96},
{45.0333, 18.96}, {48.4974, 16.64},
{51.9615, 14.}, {55.4256, 11.04},
{58.8897, 7.76}, {62.3538, 4.16},
{65.8179, 0.24}, {69.282, -4.}}
By saving these points in the list pts, we can collectively graph them
with a ListPlot command:
In[4]:= ListPlot[pts,PlotRange->{{0,70},{-5,30}}]
Out[4]= -Graphics-
Unfortunately, in order to approximate the times at which the rock reaches its maximum height and at which the rock reaches the ground, we have to count off the individual increments of time from the results of the graphics cell. From this graph, we see that the rock reaches its maximum height at approximately .6 sec, and that the rock reaches the ground at approximately 1.9 sec.
We can animate our graphics and obtain a sense of how changing the angle from which an object is launched will affect the path of its fall. This requires creating a sequence of graphics cells, all generated in the same program. Then, by double clicking on one the cells, we can start the animation.
-
Example 3: Suppose that a rock is thrown upward at 40 feet/sec at an angle of
, with respect to the horizontal, and from a height of 20 feet. Let us see how changing the value of the angle,
, affects the path of the rock.
We set this up in a manner similar to that of our first problem, only in this case our angle is unknown. The position of the rock at time t is given by the parametric equations
x(t) = 0 + 40 cos(
) t
y(t) = -16 t2 + 40 sin(
) t + 20.
We input these equations as functions in Mathematica as follows:
In[5]:= x[t_,theta_]=40*Cos[theta]*t;
y[t_,theta_]=-16*t^2+40*Sin[theta]*t+20;
Note that in this case we input our functions as functions of the two variables t and theta, for we will be varying theta as well as t. We shall plot each curve that is generated by these functions for each angle of
as
ranges over the values 0°, 5°, 10°, ..., 90°, which amounts to initially throwing the rock horizontally, and then increaing the angle of the throw by 5° increments until the rock is being thrown vertically. We do this with the following program:
In[6]:= Do[theta=deg*Pi/180;
ParametricPlot[{x[t,theta],y[t,theta]},{t,0,3},
PlotRange->{{0,80},{0,60}},PlotLabel->deg],
{deg,0,90,5}]
This program will generate a considerable amount of graphics (19 graphics cells) so we will not be reproducing the results here. Note that this program was written so that the degree measure of each angle is given at the top of the cell, using the option PlotLabel. This is so that the angle can be identified for each cell. The angle theta is in radians, which we make the conversion from degrees by means of the conversion factor of
/180. Also, the set of coordinate axes were fixed by means of the option PlotRange, for otherwise the axes might vary from cell to cell, creating an unpleasant visual effect.
To start the animation of the graphics, we need merely use the mouse to move the pointer over one of the graphics cells, and then click twice on this cell with the left mouse button. We can stop the animation by clicking once anywhere on the notebook screen. From this we see that the rock reaches ground level at a maximum distance from its initial position when our angle
is about 35°.
Exercises
Last modified: Tue Sep 25 2001