## Linear Motion I: Average Velocity

The continuous change of the position of an object with respect to time is what we refer to as motion.  In this section we shall be considering how this change is measured.

Let us consider an object moving along the x-axis of the Cartesian plane such that the position of the object at time t can be described in terms of a function x(t).  Suppose that the object is at position x1 at time t1, so that x(t1) = x1, and then at position x2 at time t2, so that x(t2) = x2.  The amount of time that elapses from t1 to t2 is

t = t2 - t1,

and the change in the position of the object over the time interval [t1t2] is

x = x2 - x1 = x(t2) - x(t1).

The average velocity vavg of the object over the time interval [t1, t2] is then defined to be the ratio of the change in the position of the object to the change in time:

x    x2 - x1
vavg = ---- = -------
t    t2 - t1

Example 1:    An object is moving along an axis.  At time t = 0 sec the object's position is noted and is taken to be the coordinate 0 meters.  At t = 10 sec the object is at the 5 meter position along the axis.  At 20 sec the object is at the 7 meter position.  Finally, at t = 27 sec the object is at the 2 meter position.  Use Mathematica to compute the average velocity of the object over each of the following time intervals:
a)    [0 sec, 10 sec]
b)    [10 sec, 27 sec]
c)    [20 sec, 27 sec]

a)    We solve each of these merely by utilizing Mathematica as a calculator, with the added advantage that units can be include along with the numerical values of each quantity we consider.

For the first interval, the initial position is 0 meters and the final position is 5 meters.  Thus we compute the change in position over this interval according to

In[1]:= dx=5 meters - 0 meters

Out[1]= 5 meters

Note that we are treating the units as if they are unknowns that we are combining arithmetically.  The initial time is 0 sec and the final time is 10 sec.  Thus the change in time is given by

In[2]:= dt=10 seconds - 0 seconds

Out[2]= 10 seconds

To obtain the average velocity over this time interval, we compute the change in position over the change in time:

In[3]:= vavg=dx/dt

meters
Out[3]= ---------
2 seconds

At this point, we have an awkward statement for our solution.  Since all of our work has been with integers, Mathematica has kept the solution consistent and provided a solution in terms of a ratio of integers.  We can obtain a decimal value of this quantity with the command

In[4]:= N[vavg]

0.5 meters
Out[4]= ----------
seconds

Thus we see that the average velocity over this interval is .5 meters/sec.

b)    The average velocity over this interval is computed in much the same manner.  With the program

In[5]:= dx=2 meters - 5 meters;
dt=27 seconds - 10 seconds;
vavg=dx/dt;
N[vavg]

we obtain the value

-0.176471 meters
Out[5]= ----------------
seconds

c)    We continue this for the third interval.  However, note that we do not have to go through the work of finding the value of each quantity in the numerator and the denominator of the quotient before evaluating it.  We can merely compute the entire quantity at once as follows:

In[6]:= N[(2 meters - 7 meters)/(27 seconds - 20 seconds)]

-0.714286 meters
Out[6]= ----------------
seconds

Thus we have an average velocity of -0.714286 meters/sec.

On occasion we have to repeatedly deal with a function that is not built into Mathematica.  If this happens, it may be tedious to rewrite the code that defines the function each time it is evaluated.  We can avoid this by defining our own function once so that we can call it up whenever it is needed.

We define a function by means of a command of the form

f[x_]=function of x

where f is the name of our function (we can use an alternate name for the function) and x is the variable of the function (we can also use an alternate variable for our function).  Note that the subscript bar to the right of the variable on the left hand side of the equals sign, "_", is necessary to the definition.  We evaluate our function at a value value by means of a command of the form

f[value]

This allows us to retain the definition of the function so that we can evaluate it again at a different value without having to redefine the function.

Example 2:    An object is moving along an axis with its position, x, at time t being given by the function

x(t) = t2 - 3 t + 4,

where t is in seconds and x(t) is in feet.  Use Mathematica to find the average velocity of the object over each of the following time intervals.
a)    [0 sec, 5 sec]
b)    [13 sec, 48 sec]
c)    [5 sec, 48 sec]

Before beginning to actually compute the quotients that will provide the average velocity on each interval, let us define a function x[t] that we will be able to use repeatedly in finding the location of the object at various points in time.  We do so with the following command:

In[7]:= x[t_]=t^2-3*t+4

Out[7]= 4 - 3 t + t2

We can now use this function to simplify the work in finding the quotients that give the average velocity on each interval.

a)    The average velocity on the interval [0 sec, 5 sec] is found by means of the quotient (x(5)-x(0))/(5-0), where the result is assumed to be in the units feet/sec.  We can compute this with Mathematica by utilizing the command

In[8]:= (x[5]-x[0])/(5-0)

Out[8]= 2

Thus the average velocity on this interval is 2 feet/sec.

b)    The average velocity on the interval [13 sec, 48 sec] can be found with the command

In[9]:= (x[48]-x[13])/(48-13)

Out[9]= 58

Therefore, we obtain an average velocity of 58 feet/sec.

c)    We find the average velocity on [5 sec, 48 sec] with

In[10]:= (x[48]-x[5])/(48-5)

Out[10]= 50

Thus we have an average velocity of 50 feet/sec.

For an object moving in the plane, not necessarily along a line, the position of the object at time t can be described in terms of its coordinates (x(t), y(t)), each functions of t.  At time t1 the object will be at position (x(t1), y(t1)), and then at time t2 the object will be at position (x(t2), y(t2)).  The change in the object's position over the time interval [t1t2] is

S = (x(t2), y(t2)) - (x(t1), y(t1))

= (x(t2) - x(t1), y(t2) - y(t1)).

The average velocity vavg of the object over the time interval [t1, t2] is then defined to be the ratio of the change in position to the change in time:

S    (x(t2), y(t2)) - (x(t1), y(t1))
vavg = ---- = -----------------------
t           t2 - t1

Note that this average velocity is not defined in terms of a single number, but in terms of a pair of numbers, indicating a direction, which is still valid since the direction of motion is part of the definition of how position changes with respect to time.

Example 3:    Suppose that at time t, in seconds, an object has the position in the plane given by the coordinates

(t sin(t), 2 t2 cos(t) + 3 t),

where the coordinates, in both the x- and y-direction, are in meters with respect to some point designated to be the origin.
The graph of our function for t in the interval [0, 5].

Find the average velocity of the object over the time intervals
a)    [0 sec, 2 sec]
b)    [2 sec, 4 sec]
c)    [0 sec, 4 sec].

To do this we shall first use Mathematica to define our position function as a function in two coordinates in the following manner:

In[11]:= f[t_]={t*Sin[t],2*Cos[t]*t^2+3*t};

We can then use this to find our points of location at the various values of time.

a)    Over the interval [0 sec, 2 sec], we have an average velocity given by

In[12]:= (f[2.0]-f[0.0])/(2.0-0.0)

Out[12]= {0.909297, 1.33541}

Thus the velocity has a component of .9 meters/sec in the x-direction and a component of 1.3 meters/sec in the y-direction.

b)    Over the interval [2 sec, 4 sec] we have an average velocity given by

In[13]:= (f[4.0]-f[2.0])/(4.0-2.0)

Out[13]= {-2.4229, -5.79371}

which yields a component of -2.4 meters/sec in the x-direction and a component of -5.8 meters/sec in the y-direction.

c)    The interval [0 sec, 4 sec] yields an average velocity of

In[14]:= (f[4.0]-f[0.0])/(4.0-0.0)

Out[14]= {-0.756802, -2.22915}

Thus we have a component of -.8 meters/sec in the x-direction and a component of -2.2 meters/sec in the y-direction.

Exercises