Friday, May 23, 2014

PCalc and HP 50g: Newton's Law of Gravity Solver



PCalc Program: Newton's Law of Gravity (U.S. units)
5/20/2014

F = (G * m1 * m2) / r^2

A solver program for PCalc. Turn Multiple Memories on. Use the Skip If Equal command to simulate a menu.

Pre-load the following values:
M0 = F (force: ft^3/(lb s^2))
M1 = m1 (mass of object 1 in pounds)
M2 = m2 (mass of object 2 in pounds)
M3 = r (distance between center of masses in feet)

Enter 0 (zero) for any variable you want to solve for.

Program:
Decimal Mode
Set X To 1.0690466104e-9
Skip 3 If M0 = 0
Skip 7 If M1 = 0
Skip 13 If M2 = 0
Skip 19 If M3 = 0
Multiply X By M1
Multiply X By M2
Power M3 To -2
Multiply X By M3
Stop
Invert X
Multiply X By M0
Invert M2
Multiply X By M2
Power M3 To 2
Multiply X By M3
Stop
Invert X
Multiply X By M0
Invert M1
Multiply X By M1
Power M3 To 2
Multiply X By M3
Stop
Multiply X By M1
Multiply X By M2
Invert M0
Multiply X By M0
Power X To 0.5
Stop

Example:
M0 = 0 (solve for F)
M1 = 4.384e30
M2 = 1.317e25
M3 = 49079712000 = 92954000 × 5280

Solve: X = 2.562411e25 (F)


HP 50g: Newton's Law of Gravity Solver

F = force (ft^3)/(lb s^2)
M1 = mass of object 1 (lb)
M2 = mass of object 2 (lb)
R = distance between objects (ft)

Program GRAVITY
<< {'F' 'M1' 'M2' 'R'} PURGE F M1 M2 1.0690466104E-9
* * R SQ / = STEQ 30 MENU >>


This blog is property of Edward Shore. 2014


Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...