Saturday, March 31, 2012

Follow the Bouncing Ball

Blog Entry #67


Introduction

The goal is to find the velocity of a ball, and the angle it travels, given the initial velocity and angle.

The next two tables are for reference. Thanks to my cousin Gina for helping me with the Coefficient of Restitution! You are the best!

Variables:

Given:
v_i = initial velocity
θ = angle of impact before the bounce

Want to find:
v_f = final velocity
Φ = angle of travel after the ball bounces

Assumptions:
1. Gravity has negligible impact. We are talking about the moment just before the ball bounces to just after the ball bounces.
2. The coefficient of resistution (COR) is measured experimentally (see table). I thank my awesome cousin Gina Ramirez helped me with getting data. (see table above)
3. The x-direction is "forwards/backwards" and the y-direction is "up towards the sky/down towards the earth"
4. The coefficeint of friction only affects the y-direction (is this correct?)
5. Kinetic energy is not conserved.
6. The ground does not move and maintains a zero velocity.

Variables:
COR = coefficient of restitution, depending on the type of ball and surface the ball is being bounced on
μ = coefficient of friction, dependent on the surface the ball is being bounced on
v_ix, v_iy = initial velocity of the ball in the x-direction and y-direction, respectively
v_fx, v_fy = final velocity of the ball in the x-direction and y-direction, respectively

COR = √ ( (height of ball after the bounce) / (height of the ball before the bounce) )

Since momentum must be conserved in both the x and y directions:

m * v_i * cos θ = m * v_f * cos Φ
m * v_i * sin θ = m * v_f * sin Φ

m * v_i * cos θ - m * v_f * cos Φ = 0
m * v_i * sin θ - m * v_f * sin Φ = 0

m * v_i * cos θ - m * v_f * cos Φ = m * v_i * sin θ - m * v_f * sin Φ

m * ( v_i * cos θ - v_f * cos Φ ) = m * ( v_i * sin θ - v_f * sin Φ )

Note the definition of Impulse, I = m * Δv = Δp

Section A: Coefficient for Restitution

COR = v_fy / v_iy

v_fy = v_iy * COR

Hence: v_fy - v_iy = v_iy * COR - v_iy = v_iy * (COR - 1)

Section B: Angle After Bounce

tan Φ = v_fy / v_fx
tan Φ = (v_iy * COR) / v_fx
cot Φ = v_fx / (v_iy * COR)
COR * cot Φ = v_fx / v_iy

Section C: Angle Before Bounce

tan (-θ) = -v_iy / v_ix
- tan θ = - v_iy / v_ix
tan θ = v_iy / v_ix

Main:

Finding Final Angle After Bounce

Impulse, taking friction ( μ ) into consideration:

m * μ * (v_fy - v_iy) = m * (v_fx - v_ix)
μ * (v_fy - v_fi) = v_fx - v_ix

From Section A:

μ * v_iy * (COR - 1) = v_fx - v_ix
μ * (COR - 1) = v_fx/v_iy - v_ix/v_iy

From Section B:

μ * (COR - 1) = COR * cot Φ - v_ix/v_iy

From Section C:

μ * (COR - 1) = COR * cot Φ - tan θ
μ * (COR - 1) + tan θ = COR * cot Φ
(μ * (COR - 1) + tan θ) / COR = cot Φ
COR / (μ * (COR - 1) + tan θ) = tan Φ

which implies that:

Φ = arctan ( COR / (μ * (COR - 1) + tan θ) )

Finding Final Velocity

From Section B:

v_fx = (v_iy * COR) / tan Φ

We also know that:

cos Φ = v_fx / v_f

Then:

v_f = v_fx / cos Φ
v_f = (v_iy * COR) / (tan Φ * cos Φ)
v_f = (v_iy * COR) / sin Φ
v_f = (v_i * sin θ * COR) / sin Φ

Results

Final Angle:

Φ = arctan ( COR / (μ * (COR - 1) + tan θ) )

Final Velcoity:

v_f = (v_i * sin θ * COR) / sin Φ



Sources:

"Friction" http://physics.info/friction Retrieved 3/25/2012

"Coefficient of Restitution" Wikipedia. http://en.wikipedia.org/wiki/Coefficient_of_restitution Retrieved 3/22/2012

H. Brody "That's how the ball bounces" from "The Physics of Sports" edited by Armenti Angelo. American Institute of Physics: New York. 1992


This blog is property of Edward Shore. © 2012

Monday, March 26, 2012

HP 50g: Elastic Collisions

Welcome to Blog Entry #66

This is a program for some solving elastic collision problems for the Hewlett Packard 50g calculator.

Variables (refer to the diagrams above):

MA = mass of object A
VA = initial velocity of object A
θA = initial angle of A

MB = mass of object B
VB = initial velocity of object B
θB = initial angle of B

FA = final velocity of object A
αA = final angle of object A

FB = final velocity of object B
αB = final angle of object B

To type θ, press ΑLPHA right-shift T

To type α, press ALPHA right-shift A

Program:

PROGRAM NAME: ELASTIC
(spaces added for readability)

<< DEG
{ ' MA * VA * COS(θA) + MB * VB * COS(θB) = MA * FA * COS(αA) + MB * FB * COS(αB) '
' MA * VA * SIN(θA) + MB * VB * SIN(θB) = MA * FA * SIN(αA) + MB * FB * SIN(αB) '
' .5 * MA * VA^2 + .5 * MB * VB^2 = .5 * MA * FA^2 + .5 * MB * FB^2 ' }
'EQ' STO
MINIT
"Elastic Collisions"
{ ' MA ' ' VA ' ' θA ' ' MB ' ' VB ' ' θB ' ' FA ' ' αA ' ' FB ' ' αB ' }
MITM MSOLVR >>

Angle Guide

Examples: (FIX 4)

Example 1:

Known:

MA = 1.2450
VA = 40.0000
θA = 30.0000

MB = 0.9780
VB = 45.0000
θB = 225.000

FA = 25.0000
αA = 170.0000

Solved:

FB = 57.1505
αB = 40.2485

Example 2:

Known:

MA = 4.0000
VA = 3.4565
θA = 0.0000

MB = 4.0000
VB = 4.5000
θB = 270.0000

FA = 2.8750
αA = 170.0000
αB = 80.0000

Solved:

FB = 10.2957


This blog is property of Edward Shore. © 2012



Wednesday, March 21, 2012

Collisions: Elastic and Inelastic

Welcome to blog entry #65! This is the first blog entry using the new Apple iPad (3rd generation, white with 64 GB, so excited)

Introduction

In physics when two objects collide, in general, one of two things can happen:

* They can stick together, producing an inelastic collision, or

* They can bounce off of each other, producing an elastic collision.

In realty, each collision lies somewhere in between inelastic and perfectly elastic, but we will deal with the general cases here.

As the diagram above shows objects A and B are headed on a collision course; each one with their own mass, velocity, and direction. If A and B combine, let C represent the object formed from both A and B.

Define the following variables as:

MA = mass of object A
MB = mass of object B
MC = combined mass of objects A and B = mass of object C

Prior to Collision
VA = initial velocity of object A
VB = initial velocity of object B
θA = initial angle of direction of object A
θB = initial angle of direction of object B

After Collision - Inelastic Collision
FC = final velocity of the aggregate object after objects A and B collide
ΦC = final angle of the aggregate object after objects A and B collide

After Collision - Elastic Collision
FA = final velocity of object A
FB = final velocity of object B
ΦA = final angle of object A
ΦB = final angle of object B

In this blog entry, we will assume we know all the initial conditions VA, VB, θA, and θB. Additionally, assume that friction is negligible, and not a factor in calculation.

A Word About Direction Angle
Angle is used to dictate the direction of the object. 0° is considered going due right (east) (postitive in the x-direction only). If the direction angle is 90°, the object is going due up (north), positive in the y direction only. Refer to the diagram below.



Inelastic Collisions

In inelastic collisions, when objects collide, they tend to "stick" together. Examples include a car wreck or a when football (rugby) defensive end tackles a wide receiver.

Only momentum is conserved in inelastic collisions. Kinetic energy that was given by the two objects is lost. Some energy is either vibrations or heat given by the combined object.

The equation for momentum is: P = m * v, where m is mass and v is velocity.

When solving for the general case, we have to deal with the total momentum in both the x-direction and the y-direction.

The initial momentum for each direction respectively is:

Px = MA * VA * cos θA + MB * VB * cos θB (1)
Py = MA* VA *sin θA + MB * VB * sin θB (2)

Since momentum is conserved, the total initial momentum must be equal to the total final momentum, in the x- and y-direction. Hence:

Px = MC * FC * cos ΦC (3)
Py = MC * FC * sin ΦC (4)

where MC = MA + MB (5)

As a result, we have two equations of two unknowns: VC and ΦC. A calculator (such as HP 50G, TI 89, TI nSpire) or a sufficient mathematics computer program can solve the set of equations easily.

Since the equations are relatively simple, we can find explicit solutions by the following strategy.

First, solve for ΦC. Either equation (3) or (4) can be used. For this blog entry, I will use equation (3).

Px = MC * FC * cos ΦC
Px / (MC * FC) = cos ΦC

Then ΦC = arccos (Px / (MC * FC)) (6)

Sub into (4) to get:

Py = MC * FC * sin (arccos (Px / (MC * FC)))

Note that sin(arccos x) = √ (1 - x^2). Also cos(arcsin x) = √ (1 - x^2)

Then:

Py = MC * FC * √ ( 1 - (Px / (MC * FC))^2 )
Py = MC * FC * √ ( ( MC^2 FC^2 - Px^2 ) / (MC^2 * FC^2) )
Py = (MC * FC * √ ( MC^2 FC^2 - Px^2 ) ) / (MC * FC)
Py = √ ( MC^2 * FC^2 - Px^2 )

Square both sides and rearrange terms:

MC^2 * FC^2 = Py^2 + Px^2

Solving for FC gives:

FC = √ ( (Py^2 + Px^2) / MC^2 ) (7)

(We can just take the principal root, since the ΦC will take care of the direction of object C)

In Summary:
MC = MA + MB
FC = √ ( (Py^2 + Px^2) / MC^2 )
ΦC = arccos (Px / (MC * FC))

This is a solution for an inelastic collision for any two objects of any mass, velocity, and direction angle.

Elastic Collisions

In perfectly elastic collisions, when objects collide, they tend to "bounce off" each other. Examples include a sub-atomic gas particle collision or two billiard balls hitting each other.

Like inelastic collisions, momentum is conserved in inelastic collisions. Unlike inelastic collisions, kinetic energy is also conserved.

The equation for momentum is: P = m * v, where m is mass and v is velocity.

When solving for the general case, we have to deal with the total momentum in both the x-direction and the y-direction.

The initial momentum for each direction respectively is:

Px = MA * VA * cos θA + MB * VB * cos θB (1)
Py = MA* VA *sin θA + MB * VB * sin θB (2)

The equation for kinetic energy is: KE = 1/2 * m * v^2. Kinetic energy does not take separate compenent directions into account.

The initial kinetic energy is:

KE = 1/2 * MA * VA^2 + 1/2 * MB * VB^2 (8)

Since momentum and kinetic energy are conserved, the total initial momentum must be equal to the total final momentum, in the x- and y-direction; and the total initial kinetic energy must be equal to the total final kinetic energy. Hence:

Px = MA * FA * cos ΦA + MB * FB * cos ΦB (9)
Py = MA * FA * sin ΦA + MB * FB * sin ΦB (10)
KE = 1/2 * MA * FA^2 + 1/2 * MB * FB^2 (11)

Note if we do not know anything about the final conditions, then we are dealing with a system of three equations with four unknowns: FA, ΦA, FB, and ΦB.

In order for this system to be solvable, we must know one of the final conditions. Then the system becomes three equations and three unknowns. A calculator (such as HP 50G, TI 89, TI nSpire) or mathematics computer program can assist in solving the set of equations.

What if one of the velocities is known?

Let's assume that FA is known. We can simplify the system of equations (9), (10), and (11). A similar strategy can be used if FB is known.

Start with (11). With FA known, solve for FB.

KE = 1/2 * MA * FA^2 + 1/2 * MB * FB^2
1/2 * MB * FB^2 = KE - 1/2 * MA * FA^2
FB^2 = 2 * KE / MB - MA * FA^2 / MB

Then:

FB = √ ( ( 2 * KE - MA * FA^2 ) / MB ) (12)

Now we are left with the system of two equations with two unknowns: ΦA and ΦB. Use your favorite calculating tool to solve for them.

Px = MA * FA * cos ΦA + MB * FB * cos ΦB (9)
Py = MA * FA * sin ΦA + MB * FB * sin ΦB (10)


For more information of elastic and inelastic collisions, click here (Hyperphysics Page). . Thanks Mime Grigsby, a very good friend of mine and fellow mathematician.


Until next time,

Eddie

Diagrams: drawn using Whiteboard

This blog entry is dedicated to Uncle Ralph (born March 21). Me and my family miss you and love you. Thank you for touching our lives.

This blog entry is property of Edward Shore. © 2012

Saturday, March 17, 2012

Billiards - Determining Final Velocity (Program for TI 84+ and HP 50g too!)

Welcome to blog entry #64!

HAPPY ST PATRICK'S DAY (WEEKEND)!

Billiards and Math

Ever wondered what happens with you take the cue stick, strike the cue ball, hit your target ball and the target ball sails right into a pocket? If you played billiards, commonly known as pool, you have experienced this many times.

We can use mathematics and physics to describe what happens when the cue ball hits the target ball. Since the balls do not "stick" together like steamed rice, the collision is considered to be nearly elastic.

In an elastic collision, two properties are conserved: momentum and kinetic energy. Momentum is the product of mass and it's velocity. Kinetic energy is the energy of movement. The equations for momentum and kinetic energy are, respectively:

P = m * v

KE = 1/2 * m * v^2

Note that direction is not considered in calculating kinetic energy.

Problem:

You hit a cue ball at a certain velocity VI, and hit a target ball at angle θ. We want to find out the direction of the cue ball after collision and the velocity of both balls.

Assume the following:

1. The masses of the cue ball and the target ball are the same. This will allow a great simplicafication in calculation, as we will see.

2. The Intial direction of the ball is 0° (due right). As a visual, you are on the left hitting the ball to due right.

Note the diagrams below:



3. The angles created after the hit add up to 90°.

From the diagram above, θ + Φ = 90°.

4. The cue ball does not hit any balls other than the target ball. If more than two balls were involved, calculation can get hairy, quick.

5. The cue ball is hit at it's sweet spot, which eliminates any friction developing between the ball and the felt of the pool table. According to The Real World Physics Problems web site, the sweet spot is 1.4 times the ball's radius.

An American billiard ball has a diameter of about 2.25 in, or 5.715 cm. The ball has a typical weight of 5.5 to 6 oz, or 156 to 170 grams. This link has more information on billiard balls.

Solution, Assuming All Masses Are Equal

Let:

VI = initial velocity of the cue ball, going due right. In the x-direction, VI cos 0° = VI. In the y-direction, VI sin 0° = 0, as expected.

VCF = final velocity of the cue ball

VBF = final velocity of the target ball. Note since the target ball was at rest, it's initial velocity is zero.

Φ = Angle where the cue ball goes after collision. Simply put, Φ = 90° - θ.

MC = mass of the cue ball

MB = mass of the target ball

Note: We assumed the masses were equal, MB = MC.

Momentum and kinetic energy has to be preserved. So for momentum in the x-direction:

MC * VI = MB * VBF cos θ + MC * VCF cos Φ

and momentum in the y-direction:

0 = MB * VBF sin θ - MC * VCF sin Φ

Note: Φ is a angle in the clockwise direction and sin (-Φ) = -sin Φ

and for kinetic energy:

1/2 * MC * VI^2 = 1/2 * MB * VBF^2 + 1/2 * MC * VCF^2

Note: Since mass is the same for all balls (MC = MB), mass "cancels" out in all three equations.

To Recap:
VI = VBF cos θ + VCF cos Φ
0 = VBF sin θ - VCF sin Φ
1/2 * VI^2 = 1/2 * VBF^2 + 1/2 * VCF^2

Making use of the trigonometric identities:

sin (90° - x) = cos x
cos (90° - x) = sin x


The equations simplify to:
VI = VBF cos θ + VCF sin θ
0 = VBF sin θ - VCF cos θ
1/2 * VI^2 = 1/2 * VBF^2 + 1/2 * VCF^2

Observe that if we solve for VBF in the second equation, we get:
VBF = VCF * (cos θ / sin θ)

Then:
VI = VBF cos θ + VCF sin θ
VI = VCF * (cos θ / sin θ) *cos θ + VCF sin θ
VI = VCF * (cos^2 θ / sin θ ) + VCF sin θ
VI = (VCF * cos^2 θ + VCF sin^2 θ) / sin θ

Note: sin^2 x + cos^2 x = 1 for an angle x.

And:
VI = VCF / sin θ

Solving for VCF yields:
VCF = VI sin θ

Let's get VBF in terms of VI:
VBF = VCF * (cos θ / sin θ)
VBF = VI sin θ* (cos θ / sin θ)
VBF = VI cos θ

Before we can celebrate, we need to satisfy the conservation of kinetic energy, not just momentum.
1/2 * VI^2 = 1/2 * VBF^2 + 1/2 * VCF^2

First, let's just multiply everything by 2:
VI^2 = VBF^2 + VCF^2
VI^2 = (VI cos θ )^2 + (VI sin θ)^2
VI^2 = VI^2 * (cos^2 θ + sin^2 θ )
VI = VI

So this checks out because we assumed the masses of both the cue ball and target ball were equal. .

Final solution - All Masses being Equal:

VBF = VI cos θ
VCF = VI sin θ
Φ = 90° - θ

What if the Mass of the Cue Ball and Target Ball are not equal?

Let:

MC = mass of the cue ball

MB = mass of the target ball

If I use the strategy of solving for VCF and VBF above, I get:

VCF = VI * sin θ.
VBF = (MC / MB) * VI * cos θ

We are working with elastic collisions, so conservation of kinetic energy must be considered:

1/2 * MC * VI^2 = 1/2 * MB * VBF^2 + 1/2 * MC * VCF^2

But:
1/2 * MB * VBF^2 + 1/2 * MC * VCF^2
= 1/2 * (MB * (VI * cos θ * MC / MB)^2 + MC * VI^2 * sin^2 θ))
= 1/2 * MC * VI^2 * (cos^2 θ / MB + sin^2 θ)
≠ 1/2 * MC * VI^2

Yep. No go. Confession, I thought the above way was good to go when MC ≠ MB too.

Here is a real solution if MC ≠ MB:

VBF = (MC * VCF) / (MB * tan θ)

And we have to solve the quadratic equation for VCF:

0 = VCF^2 * (MB * MC^2 * sin θ + MC^2 * cos^2 θ)
+ VCF * (MB * MC)
+ (MB * sin θ * (MC * VI + MC * VI^2))

The following calculator programs solve for Φ, VCF, and VBF with the assumption that the mass of both the cue ball and target ball are the same.

Variables for the programs:
C = VI
A = θ


TI 84 Plus:

NAME: BILLIARD

Degree
Disp "Deg MODE"
Input "INIT. VEL.",C
Input "ANGLE HIT",A
C*SIN(A) → S
C*COS(A) → T
Disp "ANGLE CUE=", 90 - A
Pause
Disp "FINAL VEL. CUE=",S
Disp "FINAL VEL. BALL=",T

HP 50g:

NAME: BILLIARD

<< DEG
"Degrees Mode" MSGBOX
"Initial Velocity, Cue" PROMPT
"Hit Angle" PROMPT
→ C A
<< "Finals:"
90 A - →NUM "Angle, Cue" →TAG
C A SIN * →NUM "Vel., Cue" →TAG
C A COS * →NUM "Vel., Ball" →TAG
>> >>

Test data:
VI = 5, θ = 15°; Results: VCF ≈ 1.2941, VBF ≈ 4.8296

VI = 2, θ = 30°; Results: VCF = 1, VBF = √3 ≈ 1.7321


Thank you, hope you enjoyed this blog entry. Next time I probably be blogging on a third generation iPad. For the first 64 entries, I have been using the Blogger+ App by ThinkTek Co. Ltd. on my iPad 2. Thanks everyone!

Eddie


This blog is property of Edward Shore. © 2012

Thursday, March 15, 2012

Projectiles - A Realistic Point of View (Linear Drag)

Projectile Motion

This blog is about projectile motion. Most resources give an introductory treatment of projectile motion. And yes, I will present the non-air resistance model in this section. But I am also going to present a more realistic model, taking into account air resistance, size of the projectile, and temperature.

All amounts are presented in SI (kilograms, meters, seconds) units.

Quick Conversions
1 ft = 3.280839895 m
1 lb = 0.4535924 kg

Simple Projectile Motion

A perfect projectile can be described by the following equations:

x(t) = v0 t cos θ
y(t) = v0 t sin θ - 0.5 g t^2

Where
v0 = initial velocity
θ = Intial angle, in degrees
g = gravitational acceleration constant = 9.80665 m/s^2 = 32.17404856 ft/s^2
And we assume the starting height is zero (on the ground)

Note that air resistence, features of the object, and other outside objects are ignored.

Example: Hitting a Golf Ball

Use the simplistic model to plot a trajectory with an initial velocity of 150 mph (67.056 m/s) at a 35° angle.

The trajectory lasts for approximately 7.844 seconds, with a range of approximately 430.86 meters and a height of approximately 75.4 meters.

A More Realisitc View of Projectile Motion

The equations above describe simple projectile motion. However, if we want a realistic picture, we have to consider factors such as temperature, air pressure, and the size of the projectile.

So of the variables we will consider are the drag coefficient, the density of air, and the object's terminal velocity.

Note: Linear drag is assumed. This is best for objects moving at slow speeds. No lift is used.

Drag Coefficient

The drag coefficient is a dimensionless quantity that quantifies the resistance of an objects's movement, taking into consideration factors such as the object's size, shape, and smoothness.

Approximate Drag Coefficients:
Perfect Smooth Baseball: 0.1
Baseball: 0.3
Golf Ball: 0.4
Tennis Ball: 0.6

Density of Air

The density of air can be determined using the Ideal Gas Law:

P V = N R T

where
P = absolute pressure = 101325 kPa
R = Specific Gas Constant = 287.058 J/kg K
T = temperature in Kelvins
N = number of moles (mass)
V = volume of the gas
ρ = air density = N/V in kg/m^3

Solving for ρ gives:

ρ = P / (R T) ≈ 352.9774471/T

Note: To convert degrees Celsius to Kevlins, add 273.15.

Terminal Velocity

When an object falls, it reaches a terminal velocity when the drag becomes equal to the object's weight. At terminal velocity, the object no longer accelerates.

Terminal Velocity is measured by:

V = √ ( ( 2 × mass of object × g ) / ( drag coefficient × ρ × surface area of object ) )


TROJECT
Calculator: CASIO fx-CG10 (Prizm)

Note: Let [triangle] be the symbol for the "stop and display triangle"


{.3, .6, .4} → List "C"
{.145, .057, .045} → List "M"
{.041043, .003318, .001385} → List "S"
Deg
ClrText
"Init Velocity="?→ V
"Init Angle="? → θ
9.80665 → G
Menu "Object","Baseball",1,"Tennis Ball",2,"Golf Ball",3
Lbl 1: 1 → I : Goto Y
Lbl 2 : 2 → I : Goto Y
Lbl 3 : 3 → I : Goto Y
Lbl Y
Menu "Temperature","104°F/40°C",A,"95°F/35°C",B,
"86°F/30°C",C,"77°F/25°C",D,
"68°F/20°C",E,"59°F/15°C",F,
"50°F/10°C",G,"41°F/5°C",H,
"32°F/0°C",I
Lbl A : 1.1839 → P : Goto Z
Lbl B : 1.2041 → P : Goto Z
Lbl C : 1.2250 → P : Goto Z
Lbl D : 1.2466 → P : Goto Z
Lbl E : 1.2690 → P : Goto Z
Lbl F : 1.2920 → P : Goto Z
Lbl G : 1.3163 → P : Goto Z
Lbl H : 1.3413 → P : Goto Z
Lbl I : 1.3943 → P : Goto Z
Lbl Z
List "M"[I] → M
√ (( 2 × M × G) ÷ (List "C"[I] × P × List "S"[I])) → W
M × G ÷ W → K
Solve(-MGX ÷ K + M ÷ K × ( 1 - e^(-KX ÷ M)),100) → E
MV cos θ ÷ K × ( 1 - e^(-KE ÷ M)) → R
"Range="
R [triangle]
-M ÷ K × ln ((MG) ÷ K × (V sin θ + MG ÷ K)^-1) → F
-MGF ÷ K + M ÷ K × (V sin θ + MG ÷ K) × (1 - e^(-KF ÷ M)) → H
"Height="
H [triangle]
ClrGraph
ViewWindow -.5, R + .5, 1, -1, H+1, 1, 0, E, .05
θ → A
ParamType
G SelOff
G SelOn 1
"MV cos A ÷ K × (1 - e^(-KT ÷ M))" → Xt1
"-MGT ÷ K + M ÷ K × (V sin A + MG ÷ K) × (1 - e^(-KT ÷ M))" → Yt1
DrawGraph

-----------

Variables:

M = mass of object, in grams
V = initial velocity, in metes/seconds
A = θ = initial angle, in degrees
C = drag coefficient
S = radius of the object
P = gas density
K = terminal velocity

Revisiting the Example: The Golf Ball

Use the proposed model to plot a trajectory with an initial velocity of 150 mph (67.056 m/s) at a 35° angle. Assume it is 77°F outside (25°C).

The trajectory has a range of approximately 163.46 meters and a height of approximately 45.02 meters. It lasts about 6.177 seconds.


References:

Article: Erlichson, Herman. "Maximum Projectile range with drag and lift, with particular application to golf." The College of Staten Island, 1982

From:

Armenti, Angelo Jr. (editor) The Physics of Sports American Institute of Physics 1983 pg. 71-78

Reference Links:

Terminal Velocity (NASA.gov)

Drag Coefficient (NASA.gov)

Drag on a Baseball (NASA.gov)

Air Pressure


Wednesday, March 14, 2012

My Favorite Number: π


Why π is My Favorite Number

The number π describes a beautiful relationship between a circle's circumference, area, and radius.

The π is irrational, which means the decimal expansion goes without end.

π ≈ 3.14159265358979323846... (this is from memory). Mathematicians from ancient Greece on forward have worked on obtaining more digits of π. I think the current count is a trillion decimal places.

The gamma of 1/2 is the square root of π.

π is involved in the normal distribution function: f(x) = e^(-2x)/√ (2 π)

Unlike pie, enjoying π doesn't make anyone fat. Furthermore, unlike pie, π has no calories.

The (basic) sine and cosine functions have a period of 2 π radians. (360°)

The number π is involved in infinite series. For example:
π /4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 - 1/15 + 1/17 - 1/19 + 1/21...

or π = 4 Σ ((-1)^n / (2n + 1), n = 0 to infinity)

This series converges slowly - at 10,000 terms I only get 3 decimal points (3.14169264367).

I was born on March 14 - and π = 3.14 to two decimal places.

Tuesday, March 6, 2012

Spirals


All About Spirals

This blog will about spirals. Why? I thought it would be fun. And I like spirals.


Regular Spirals

Source: http://www.mathematische-basteleien.de/spiral.htm

Equations:
Rectangular
x^2 + y^2 = a^2 (arctan y/x)^2

Polar
r = a θ

Parametric
x = a t cos t
y = a t sin t


Finding the y-intercept and x-intercept, as shown above, of a spiral, assuming 0 ≤ θ ≤ 2 π

We can use the rectangular equation to find these points.

x^2 + y^2 = a^2 (arctan y/x)^2

Y-Intercept - Point (0, y)

y^2 = a^2 (arctan y/0)^2

Note:
1. y/0 is undefined
2. tan (π /2) is undefined. So is tan (n π / 2) where n is an integer.

Use π / 2 as a solution.

Then:

y^2 = a^2 * (π / 2)^2

Take the square root of both sides, since y>0, use the positive root.

y = a * π / 2

The y-intercept is (0, a * π / 2)

X-Intercept - Point (x, 0)

x^2 = a^2 (arctan 0)^2

Note tan(n π.)=0 where n is an integer. Let's use π. (n = 1)

x^2 = a^2 π^2

Since the x-intercept lies left of 0, select the negative square roof. Therefore:

x = -a π.

The x-intercept is (-a π, 0).

Area of a Spiral (0 ≤ θ ≤ 2 π)

Use the polar equation: r = a θ

Using the general polar integral:

A = ∫ (1/2 * r^2 d θ , lower limit, upper limit)

A = ∫ (1/2 * a^2 * θ^2 d θ , 0, 2 π)
= a^2 / 2 * (8 π^3 / 3 - 0)
= 4 a^2 π^3 / 3

Slope of a Spiral

Polar Form:

∂r/∂θ = a

Parametric Form:

∂x/∂t = ∂/∂t (a * t * cos t)
= ∂/∂t (a * t) * cos t + a * t * ∂/∂t (cos t)
= a * cos t - a * t * sin t
= a * (cos t - t * sin t)

∂y/∂t = ∂/∂t (a * t * sin t)
= ∂/∂t (a * t) * sin t + a * t * ∂/∂t (sin t)
= a * sin t + a * t * cos t
= a * (sin t + t * cos t)

Stretch Spirals

What if we can "stretch" spirals? We can if alter the parameters of the parametric form:

x(t) = a * t * cos t
y(t) = b * t * sin t

Where a ≠ b.

Two graphical examples are shown below.


Finding the Intercepts of a Stretched Spiral

I will assume that both a ≠ 0 and b ≠ 0.

Y-Intercept: Point (0, y)

0 = a * t * cos t
y = b * t * sin t

Working with the first equation:

0 = a * t * cos t
0 = t * cos t,

which implies that either t = 0 or cos t = 0

We know that cos (n π / 2) = 0 where n is an integer. Choose t = π / 2.

Then y = b * π / 2 * sin(π / 2) = b * π / 2

Then the y-intercept is (0, π / 2).

X-Intercept: Point (x, 0)

x = a * t * cos t
0 = b * t * sin t

Working with the second equation:
0 = b * t * sin t
0 = t * sin t

which implies that t = 0 or sin t = 0. We know that sin(n π) = 0 where n is an integer, let's choose n = 1 and then t = π.

Hence x = a * π * cos π = -a * π.

The x-intercept is (-a * π, 0)

Area of a Stretched Spiral

We can find the area using the following:

∫ y dx = ∫ y(t) d[x(t)]

Note that:
1. y(t) = b * t * sin t
2. d[x(t)] = a * (cos t - t * sin t) dt
3. y(t) d[x(t)] = a * b * (t * sin t * cos t - t^2 * sin^2 t)

Let Φ = (t * sin t * cos t - t^2 * sin^2 t)

The integration is split into two intervals: [0, π] and [π, 2 π]. Due to the direction of the spiral, the limits are switched.

Then the area is:
A = a * b * ( ∫ (Φ dt, π , 0 ) + ∫ ( Φ dt, 2 π , π ) )
(via Hewlett Packard HP 50g and TI nSpire CX CAS)
= a * b * (π^3 / 6 + 7 * π^3 / 6)
= a * b * (4 π / 3)

Slope of a Stretched Spiral

The derivation is similar to the slope of a regular spiral.

∂x / ∂t = a * ( cos t - t * sin t )
∂y / ∂t = b * ( sin t + t * cos t )


Until next time, Eddie.



This blog is property of Edward Shore. (c) 2012

Thursday, March 1, 2012

A Diary of Plots

These are some graphs I posted on both my Twitter and Facebook accounts recently. Enjoy!

Range for Bézier curves: 0 ≤ t ≤ 1

Eddie

Sunday, February 26, 2012

Bézier Curves - Programs for TI nSpire, HP 50g

Introduction

A short definition: a Bézier Curve is a set of parametric equations involving n points:

x(t)=Σ( nCr(n,k) * (1-t)^(n-k) * t^k * x_k) from k=0 to n

y(t)=Σ( nCr(n,k) * (1-t)^(n-k) * t^k * y_k) from k=0 to n

For 0 ≤ t ≤ 1

The curve fits points (x_0, y_0) (when t=0) and (x_n, y_n) (when t=1). The curve approximates the other points.

The degree of the polynomial is n-1.

Bézier curves are used heavily in computer graphics, animation, and font making.

Mike "Pomax" Kamermans provides an awesome primer on Bézier curves.


Béizer Curve Generator - TI nSpire CX
(I am sure this would work with the TI-89 too)

Define LibPub bezier(list)=
Func
© coordinates; Define x (or y)#(t)=bezier(...)
Local n,k
dim(list) - 1 → n
Return Σ( nCr(n,k) * (1-t)^(n-k) * t^k * list[k+1]) from k=0 to n
EndFunc


Save the file, the file name can only be one word. The file must belong to the MyLib folder under the My Documents folder. Please do not forget to refresh the libraries after saving. To refresh, press the doc button, select option 6.

One way to graph a Bézier Curve:

1. Go to, or create a graph screen, or in Scratchpad Graph screen
2. Set to Parametric Mode:

x#(t)=filename\bezier({x coordinates})

y#(t)=filename\bezier({y coordinates})

Set 0 ≤ t ≤ 1

Where # is 1 to 99 and filename is the file that contains the Bezier function.

Bézier Curve for the HP 50g (should work on the 48G and 49G families)

There are two programs in this section. Both are programmed using User RPL.

BEZIER: a curve generator
BEZGRPH: graphs a single Bézier Curve given a list of y coordinates and a list of corresponding x coordinates. BEZIER is required.

Bézier Curve Generator

Level 1: list of coordinates

Program Name: BEZIER
'L' STO
0 'F' STO
'T' PURGE
0 N FOR K
N K COMB
1 'T' - N K - ^ *
'T' K ^ *
L K 1 + GET *
'F' STO+
NEXT F SIMPLIFY FDISTRIB
{N L} PURGE >>


Graphing a Single Bézier Curve:

Level 2: list of y coordinates
Level 1: list of x coordinates

Program Name: BEZGRPH
BEZIER SWAP BEZIER
+ STEQ
PARAMETRIC
{T 0 1} INDEP
AUTO ERASE
DRAW LABEL DRAX PICTURE >>


Notes:
1. The program BEZIER is required.
2. Standard mode (STD) set is used to make labels less obtrusive
3. {T 0 1} INDEP sets T to be the independent variable with the range (0, 1)
Parametric Equations on the HP 50g: XY#(T)=X(T)+i*Y(T)

Example:
Draw a Bézier curve about the points (0,3), (1,2), (0,0), (-1,-1), and (4,-4)
List of y coordinates: {3, 2, 0, -1, -4}
List of x coordinates: {0, 1, 0, -1, 4}

Equations:
x(t) = 4t^4 + 8t^3 - 12t^2 + 4t
y(t) = -5t^4 + 8t^3 - 6t^2 - 4t + 3

TI nSpire CAS CX:

HP 50g:

Hope you enjoyed this blog. Take care as always, Eddie





This tutorial is property of Edward Shore. © 2012

Wednesday, February 22, 2012

An Approach to Plotting Functions in the Complex Plane using Parametric Mode

Graphing functions on the complex plane is not easily handled on a graphing calculator. Few options exist: (1) build a program to build an x-list and a y-list and build a Scatterplot, and (2) use the parametric graphing mode using a numerous amount of paths.

All screen shots are taken with an iPad 2 and a TI nSpire CX CAS calculator.

The complex plane is shown below:

There are pros and cons to each method. The pro of method (1) is that you would get a complete picture of any desired mesh. However, you are also faced with high execution time, even on the best graphing calculators, a lot of RAM usage, and you can usually only use a small area to graph on: for example the interval [-2,2] with 25 point intervals.

Method (2) involves parametric graphing that splits the function into two parts: the real component x(t), and its imaginary component y(t). For any complex function f(z):

x(t) = real(f(z))
y(t) = imag(f(z))

You will either have to separate the real and imaginary components, or if you graphing calculator can handle complex operations, use the real and imag functions.

Caution: If you calcualtor can handle complex numbers, some may not have a built in routine for the trigonometric or advanced operations. This applies to the TI-84 family, and most (if not all) Casio graphing calculators. I list some advanced operations for convenience.

Source: HP-41C Math Pac, Hewlett Packard, 1980?


Let z = x + yi, r = abs(z), θ = arg(z) = angle(z), i = √ -1

ln z = ln r + θ i
a ^ z = e ^ (z ln a)
sin z = sin x cosh y + i cos x sinh y
cos z = cos x cosh y - i sin x sinh y
z ^ n = r ^ n * e ^ ( i n θ )
z ^ ( 1/n ) = r ^ ( 1/n ) * e ^ ( i ( θ / n + ( 2 π k ) / n ) ) , k = 0, 1,...,n - 1
e ^ z = e ^ x * cos y + i * e ^ x * sin y


There is one big obstacle with using the parametric mode. There is only one independent variable, t. So using a set of parametric equations describe only one path.

For example, in graphing sin z set the pair of parametric equations as:
x(t) = real(sin(t + t i))
y(t) = imag(sin(t + t i))

graphs sin z along the path y = x. (x=t, y=t)

In order to get a more complete picture (or really, just more detail), you will have to repeat the pair, but using different paths.


Examples:
For path y = x, use t + t i (sub x = t, y = t)
For path y = -x, use t - t i (sub x = t, y = -t)
For path y = 2x, use 2t + t i (sub x = t, y = 2t)
For path y = e^x, use e^t + t i (sub x = t, y = e^t)
For path y = ln x, use t + e^t * i (sub x = e^t, y = t)
For path y = x^n, use t + t^n * i (sub x = t, y = t^n)
For path y^n = x, use t^n + t * i (sub x = t^n, y = t)


This method is good if you don't want to program, just want to get a quicker picture (method (2) still takes a lot of effort), or you are working with a monochromatic screen (most graphing calculators) where too much detail can just "paint the screen black".

Below are examples of graphs of complex functions from the use of method (2). Keep in mind that these are not complete graphs but enough to get some idea of what is going on.

Hope you enjoyed this blog. Eddie



This blog is property of Edward Shore. © 2012

Wednesday, February 8, 2012

Repeated Applications of Functions



Repeated Functions

If you have ever owned a calculator, chances are you done this: you enter a number and press the square root button many times in a row to see what happens.

For example, you enter say 200. And then you push the square root button. Here are the results for 10 applications of the square root function (to eight decimal places):

14.14213562
3.76060309
1.93922745
1.39256147
1.18006842
1.08630954
1.04226174
1.02091221
1.01040200
1.00518755

Eventually with any positive number, if you press the square root function enough times, you get 1 as a repeated answer.

The following graph shows three functions:

The function in red is the normal square root function.

The function in green shows what happens when the square root function is applied three times to each number.

The function in blue shows what happens when the square root function is applied five times to each number.

Each of the graphs on this blog have been produced using an TI nSpire CAS calculator. All photographs were taken using an iPad 2.

Finding a Closed Form for Repeating the Square Root

If we want to describe what a function would look like when applying the square root n times, we can use a nice, closed, and compact formula.

Let f(x) = √ x = x ^(1/2)

Then

f^n(x) = x ^ 1/2 ^ 1/2 ^ .... ^ 1/2 (n times)
= x ^ (1/ (2^n))
= x ^ (2 ^ -n)

Repeated Sine and Logarithm

Now let's apply common scientific functions and repeat them. First the sine function for x ∈ [-3 π, 3 π].

The graph in blue represents the normal sine function. (x is in radians)

The graph in green is sine repeated 25 times.

The graph in magenta is sine repeated 100 times.

Note with repeated applications of sine, the graph gets more flatter, towards 0, for each point. Could the approximation formula sin x ≈ x have something to do with this?


This next graph shows what happens when you repeatedly apply the natural logarithmic function:


The graph in red is the normal natural logarithmic function.

The graph in green represents the natural logarithm function applied three times.

Something interesting happens with repeating the natural logarithm function. Eventually, you will get a complex number (or an error message on a standard scientific calculator).

Cases in point:

When x=2,
ln 2 = 0.69314718 (to eight decimal places)
ln ln 2 = -0.36651292
ln ln ln 2 = -1.00372150 + π i

When x = 50
ln 50 = 3.91202301 (to eight decimal places)
Repeated applications of the natural logarithm yield:
1.36405463
0.31046161
-1.16969502
0.15674305 + π i

I hope you enjoy this blog, until next time,

Eddie




This blog is property of Edward Shore. © 2012


Monday, February 6, 2012

What a find: An Atari Calculator

I went to the Pasadena City College Swap Meet yesterday, and I found this calculator.

Pictured is the Atari CC 1900 calculator. While it isn't programmable, the calculator features a memory of 32 steps. I picked this up for $5. It looks like this calculator was produced in the 1980s, but I could be wrong on that. Thankfully it runs on two AAA batteries.

This is not the only model of Atari calculators as smaller and solar versions were produced.

Some info about the Atari CC 1900 that I found.

Pasadena City College Flea Market - 1st Sunday of every month

I am looking for a manual.

Take care, Eddie

What to do next?

I think I want to tackle chaos theory or the study of patterns next.

Monday, January 2, 2012

Setting up Equations for Integration/Solve - HP 15C

Setting up equations for the integration and solve functions for the HP 15C. Since the release of the HP 15C Limited Edition, the processing speed has increased.

The most important thing to remember is that the equation starts with "x" on the x-register of the stack.

With integration, "x" is the variable to be integrated.

With the solve function, "x" is the variable to be solved for.

Depending on the equation, in general, you will need to duplicate "x" with [ENTER] as many times as "x" appears in the equation. Algebraic manipulation of the equation can be helpful. A technique known as Horner's Method can be used for polynomials. It also helps to handle the innermost expressions first, working outside.

I often straw a stack diagram:

ST X, ST Y, ST Z, ST T

Several things to remember:

Most two-argument functions (arithmetic, power, combination, permutation, etc):

ST T retains what was in ST T
ST Z copies the contents of ST T
ST Y the contents of ST Z moves here
ST X result of the function

Pressing ENTER, recalling from a memory register, or entering π

ST T the contents of ST Z moves here
ST Z the contents of ST Y moves here
ST Y the contents of ST X moves here
ST X the number just entered or recalled


Horner's Method

Let the polynomial p(x) = a_n * x^n + a_n-1 * x^(n-1) + ... + a1 * x + a0

Applying Horner's Method to p(x):

( ... (a_n * x + a_n-1) * x + a_n-2) * x + a_n-3) ... + a1 ) * x + a0

Functions

Integration: [ f ] [ x ] label

Solve: [ f ] [ ÷ ] label


This blog provides examples of integration, but ideas can be taken from the examples for use in solving equations.


Examples are in the format of:

b
∫ f(x) dx
a

All results shown here are rounded to 4 decimal places (FIX 4).

Example 1:

5
∫ x^2 * cos x dx
1




KEY ST X ST Y ST Z ST T
LBL 1 x - - -
ENTER x x - -
COS cos(x) x - -
x<>y x cos(x) - -
x^2 x^2 cos(x) - -
× f(x) - - -


Result: -19.4578


Example 2:

π
∫ x sin((π * x)/4) dx
0



KEY ST X ST Y ST Z ST T
LBL 2 x - - -
ENTER x x - -
π π x x -
× π*x x - -
4 4 π*x x -
÷ (π*x)/4 x - -
SIN sin(π*x/4) x - -
× f(x) - - -
RTN


Result: 4.1369


Example 3

3.5
∫ x / (x^2 + 3x - 4 ) dx =
3

3.5
∫ x / ((x + 3) *x - 4) dx
3



KEY ST X ST Y ST Z ST T
LBL 5 x - - -
ENTER x x - -
ENTER x x x -
3 3 x x x
+ x+3 x x x
× x(x+3) x x x
4 4 x(x+3) x x
- x(x+3)-4 x x x
1/x 1/... x x x
× f(x) x x x
RTN


Result: 0.0998


Example 4:

3
∫ √(x^3 - 2x + 1)/x dx
1



Let ø = √(x^3 -2x+1)


KEY ST X ST Y ST Z ST T
LBL 3 x - - -
ENTER x x - -
ENTER x x x -
3 3 x x x
y^x x^3 x x x
x<>y x x^3 x x
2 2 x x^3 x
× 2x x^3 x x
- x^3-2x x x x
1 1 x^3-2x x x
+ x^3-2x+1 x x x
√ ø x x x
x<>y x ø x x
÷ f(x) x x x
RTN


Result: 2.0912

Here are a few more examples of integrals. Try and draw the stack diagram for each step.

Example 5:

8.5
∫ x * √(x^2 - 3*x - 4) dx =
4.5

8.5
∫ x * √((x - 3) * x - 4) dx
4.5



LBL 6
ENTER
ENTER
3
-
×
4
-

×
RTN


Result: 117.2455

Example 6:
π/4
∫ x * (( sin(x-2) )/(cos x)) dx
0



LBL 7
ENTER
ENTER
2
-
SIN
x<>y
COS
÷
×
RTN


Result: -0.3578


I hope you find this blog helpful. Until next time, Eddie



This blog is property of Edward Shore. © 2012

Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...