Re: newbie here,, need help with parametrics

• To: mathgroup at smc.vnet.net
• Subject: [mg96525] Re: [mg96455] newbie here,, need help with parametrics
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Mon, 16 Feb 2009 06:52:32 -0500 (EST)
• References: <200902140807.DAA17042@smc.vnet.net>
• Reply-to: drmajorbob at longhorns.com

```Load AccelerationDueToGravity from the PhysicalConstants package, and
Convert from the Units package:

Needs["PhysicalConstants`"]
Needs["Units`"]

Calculate g in ft/sec^2 (with units removed):

g = Convert[AccelerationDueToGravity, Foot/Second^2]/(Foot/Second^2)

196133/6096

(AccelerationDueToGravity is in meters/sec^2.)

Define the {x, y} coordinates at time t:

r[a_, x_, y_, v_][t_] = {x + t v Cos@a, y + t v Sin@a - 1/2 g t^2}

{x + t v Cos[a], -((196133 t^2)/12192) + y + t v Sin[a]}

Plot the curve:

ParametricPlot[r[30. Degree, 0, 32, 32][t], {t, 0, 2},
PlotRange -> All]

Here's a general solution for y == 0:

Solve[0 == Last@r[a, x, y, v][t], {t}]

{{t -> (4 (1524 v Sin[a] -
Sqrt[762] Sqrt[196133 y + 3048 v^2 Sin[a]^2]))/196133}, {t -> (
4 (1524 v Sin[a] + Sqrt[762] Sqrt[196133 y + 3048 v^2 Sin[a]^2]))/
196133}}

The second solution is the one you need, as the example shows:

Solve[0 == Last@r[30. Degree, 0, 32, 32][t], {t}]
tDrop = t /. Last@%

{{t -> -0.998192}, {t -> 1.99278}}

1.99278

How far did the projectile travel horizontally?

r[30. Degree, 0, 32, 32][tDrop]

{55.2256, 0.}

Bobby

On Sat, 14 Feb 2009 02:07:05 -0600, R.J. <nemocamaro at epix.net> wrote:

> I am using Mathematica and i'd rather be using derive,,,,, but
> anyways,,  heres the problem i have to do, a baseball is thrown from the
> stands 32 feet from the ground at an angle of 30 degrees above the
> horizontal, initial velocity is 32 feet per second.
>
> what i want to do is find how to plot this in mathematica,, the graph i
> keep getting says it hits the ground after .8 seconds,   and i know
> thats not right,,, here is the formula i am using
>
> r = (x + v Cos a) t) i + (y + (v Sin a) t - 1/2 gt^2) j
>
> where x is the initial x position and y is the initial height, v is the
> initial velocity a is the angle (30*) t is time and g is the
> gravitational constant..
>
> i'm stuck,,, any help?
>

--
DrMajorBob at longhorns.com

```

• Prev by Date: Re: Problems about "For"
• Next by Date: Re: linear regression with errors in both variables
• Previous by thread: newbie here,, need help with parametrics
• Next by thread: Re: newbie here,, need help with parametrics