bump85.gif

Kinematics 2

Projectile Clown Tutorial Index
Kinematics 2 Problem Set Maple Index
How to...
Problem Set Index

New Maple Functions

  • %, %%, %%%  The ditto operators.  They enable you to access the results of previous calculations.  The ditto operators save many keystrokes.  They actually retrieve the result of the last, second to last, and third to last computation, respectively, and then position that result in the place where they reside.  Note that they do not reevaluate the computation one, two, or three execution groups above the current execution group, but the last, second to last, or third to last computation, wherever that computation occurred.  If you open and switch between multiple worksheets, or you jump around and execute commands in different places inside one worksheet, using the ditto operators as shortcuts might produce some surprising results.  Some examples of how to use the ditto operator:

    > 2*x;

    2 x

    > y*%;

    2 y x

    > z*%%;

    2 z x

    > subs( y = 5, %% );

    10 x

    > solve( 16 = %%%, x );

    8/y

    The ditto operators work up to a limit of three previous calculations, i.e. %%%% does not reevaluate the 4th previous calculation.  For more information check out ?% or ?ditto.

  • fsolve  This function is similar to solve except that it uses numeric techniques rather than symbolic ones, and it returns results as floats.  The advantage it gives you is that it is faster, and it eliminates the use of evalf in many problem solutions.   One drawback to fsolve is that it stops searching for solutions as soon as it finds a real solution.  So, for example, if you use it to solve a quadratic equation, it will only return one result, even if the equation has two real solutions.  Be aware of this when using fsolve.  

    > solve( 5*x + 6 = 12 );      If the variable to solve for is obvious, solve and fsolve do not need the second argument.

    6/5

    > fsolve( 5*x + 6 = 12 );

    1.2

    > solve( a*x + b = c, x );

    (c-b)/a

    fsolve does not possess symbolic computation abilities.

    > fsolve( a*x + b = c, x );

    Error, (in fsolve) {b, c}, are in the equation, and are not solved for

    But for numeric solutions of large or complex equations or systems of equations, fsolve computes much faster than solve.  Check out ?fsolve.

  • [ ]  List.  A list is an ordered set of items which may contain repeated terms (a set ( { } ) in Maple, as in mathematics, may contain only one instance of each element).  Although potentially confusing, you access the elements of a list using left ( [ ) and right ( ] ) brackets in a way very similar to how you indicate a subscript.   When used to select an item from a list, [ ] is called the selection operator.  Knowing the difference between when [ ] indicates a selection or a subscript is an issue of syntax and semantics.  Based on its built in syntax and semantic rules, Maple knows when to think of [ ] as the list operator and when to think of it as indicating a subscript (in many instances it is the exact same thing).

    > beverage := [ milk, coffee, tea, pop, milk ];

    beverage:=[milk,coffee,tea,pop,milk]

    > bev_set := { milk, coffee, tea, pop, milk };

    bev_set:={pop,tea,coffee,milk}

    Note that Maple did not change the order of beverage, but reordered bev_set to its own liking, and also removed the second reference to milk in bev_set.

    > beverage[1], beverage[3], beverage[5];

    milk,tea,milk

    For more information look up ?list, ?set and/or ?selection.

  • ..  Range expression operator.  Many Maple functions use a parameter that supplies a range.  For example, the add function totals sequences of values and the range operator tells it where to begin and end.

    > add( 2*i, i = 1..4 );

    20

    > 2*1 + 2*2 + 2*3 + 2*4;

    20

    More info: ?range.

Top

horzn_ln.gif (2407 bytes)

Projectile Clown

The director of the movie you are working on wants as many scenarios as possible to work with when deciding the final look for the movie.  He wants to shoot another cliff scene in which the concocted hero chases the crazed clown off the side of a cliff with the duck in tow.  This cliff is on the edge of a lake, and in the movie the clown uses the duck as a flotation device. 

For a successful first shoot, you need to figure out how far out into the lake the clown and duck land if the clown runs horizontally off the cliff at 20.6 m/s (he's a  very, very fast clown), and the top of cliff is 83 m above of the surface of the water.   You also need some nice graphs of the changes in the clown's vertical and horizontal positions and velocities.  The clown might like to know the magnitude of his velocity (his speed) when he hits the water.  All the air in the set has been removed so you don't need to worry about air resistance.  Gravitational acceleration is 10 m/s^2.

Solution

If you forget the properties of a Maple term, remember to use the ? function or to place the cursor on the term and select "Help on..." from the Help menu.  Alternatively, go to the Maple Index and click on the term to access the short and concise description provided in this tutorial.

Set the origin of the coordinate system at the point where the base of the cliff meets the edge of the lake (assume the cliff is straight up and down). 

> restart;

The problem is a classic case of projectile motion.  Projectiles are objects that move through space under the influence of Earth's gravitational force.

> a := -10;

a:=-10

> y = 83 + 0*t + (1/2)*a*t^2;

y=83-5 t^2

> x = 0 + 20.6*t + (1/2)*0*t^2;

x=20.6 t

> pos := { %, %% };

pos:={y=83-5 t^2,x=20.6 t}

Since you know the final y-position is 0 m, use this information to solve the y-equation for t.

> fsolve( 0 = rhs( %%% ), t );

-4.074,4.074

The following command yields both a check on the above calculation and the distance the clown ends up out in the lake.

> subs( t = 4.074309757, pos );

{y=0,x=83.9306}

The first element in the set, y = 0 m , is a check on the solution of the equation 0=83-5 t^2, and x = 83.9 m is the distance the clown ends up out in the lake.

The following is an alternative to the solution steps above.

> pos;

{y=83-5 t^2,x=20.6 t}

> y := 0;

y:=0

> solve( pos );

{t=-4.0743,x=-83.9308},{x=83.9308,t=4.0743}

If you do not understand this solution, remember that pos is a set object and the elements of the set are equation objects.   Note that after the assignment y := 0,  pos effectively becomes a set of two equations in two unknowns.

Now let's graph the x and y-positions vs. time.  Using the techniques described in Kinematics 1 and tweaked in the solution to problem 5 of  Kinematics 1 Problem Set, select only the right sides of the two equations contained in the set pos to produce the plot below.

When viewing the two plots below, remember that each of them has a different name for the vertical axis.  The green plot represents y vs. t and the red plot represents x vs. t, i.e. the plot displays two different graphs on the same set of axes.  This occurs often in physics texts, and it's called a multiple plot.

> pos;

{x=20.6 t,0=83-5 t^2}

 

multigraph of 20.6 t and 83-5 t^2

 

Parametric plots offer a more intuitive plotting technique for projectile motion.  Parametric plots produce a more life-like picture of a projectile's flight path. 

Note: The plot function below is a general purpose plotting functing and is not just for creating parametric plots.  In fact, we will use it exclusively for all plotting in the rest of this tutorial.

> plot( [20.6*t ,83-5*t^2, t=0..4.1], scaling=constrained, labels=["x","y"], title=`Parametric Projectile Clown`);

 

parametric plot of 20 t and 83-5 t^2

 

Of course, you still may right click on the plot to select options for altering the way it looks. 

For a parametric plot the first parameter of plot must be a list of three items.  For a 2D parametric plot the first two items in the list must be expressions/functions (not equations) of the same variable, and the third item must be the range of the variable.  Maple plots the first function in the list on the horizontal axis, and the second on the vertical axis.   The rest of the parameters in this plot are optional. 

The scaling=constrained option sets the scaling on the axes equal.  Try the plot after removing this option (and its accompanying comma).  The labels option takes character strings as parameters.  In Maple, anything delimited by double quotation marks ("character string") is a character string.  The plot function accepts the optional parameters in any order.  Check out ?plot and ?plot,options to learn the other available options.

Finally, let's see how the x and y-velocities change during the clown's flight.

> v[x] := 20.6 + 0*t;

v[x]:=20.6

> v[y] := 0 + a*t;

v[y]:=-10 t

To find the magnitude of the velocity vector at the time of the clown's impact you need to know the vector sum of the two component vectors.  In this case the component vectors v[x] and v[y] are at right angles to each other.  Thus, the magnitude of their vector sum is the length of the hypotenuse of the right triangle whose sides are the vectors v[x] and v[y]

velocity vector

> subs( t = 4.074309757, sqrt(v[x]^2 + v[y]^2) );                                          Check out ?sqrt.

45.6548

The plot below displays the vertical and horizontal velocities of the clown during his fall.  As with the first plot in this section, the plot below is a plot of multiple functions on the same set of axes.   In both cases the functions share the same horizontal axis, but the name of the vertical axis is different for each function.  Notice how the format of the plot command for a mutltiple plot differs from that of a parametric plot.

> v[x], v[y];

20.6,-10 t

> plot( {v[x], v[y]}, t=0..4.3, title=`Projectile Clown Velocities` );

 

multigraph of -10 t and the constant function 20.6

 

If you plot just one expression or function with plot, you do not need to place it in a list or set.

 

horzn_ln.gif (2407 bytes)

Kinematics 2 Problem Set         Top        Newton's 2nd Law of Motion

Tutorial Index         Maple Index         How to...         Problem Set Index


Please send me any polite comments, suggestions, or corrections.