# Programs

## Physics Programs

### Uniform Acceleration Solution

#### Summary Description

Programs:

UNIFACCE

Version:

1.0, 22 January 2006

Description:

The UNIFACCE program computes the factors of a body undergoing uniform acceleration that can be deduced from a given set of factors.

Compatibility:

 CFX-9850G Compatible with CFX-9850G FX-7400G Compatible with FX-7400G

#### Detailed Description

The UNIFACCE program computes the unknown quantities that can be deduced from known quantities using the following equations of uniformly accelerated motion:

The subscripts 0 and f indicate initial and final value of the quantity, respectively; the operator Δ represents the change in the quantity; and s indicates distance, v indicates velocity, a indicates acceleration, and t indicates time.

There are combinations of values for which there is no solution for some or all remaining quantities, or for which there is not a unique solution for some or all remaining quantities. In these circumstances, the program will issue a diagnostic or fail to produce values for some quantities. However, if there are two possible solutions for time, based on the quadratic equation, the program will produce both solutions. The smaller positive value, if there is one, will be identified as “the” solution for t, and the other will be identified as an “alternate” solution for t.

#### Usage

Enter the UNIFACCE program into the calculator, using either the calculator data cable or entering the program directly.

Choose a system of measurement (mKs, cgs, English, etc.), and convert all known values into this system. The results in the solution will also be expressed in this system.

Run the program.

The program will display the prompt “1:A 2:Vini 3:Vfin 4:DelV 5:DelT 6:Sini 7:Sfin 8:DelS 0:Done?” and pause for you to input a code. This menu is shown in the screen shot to the right. These codes refer to: a, the acceleration (here called A, code 1); v0, the initial velocity (here called Vini, code 2); vf, the final velocity (here called Vfin, code 3); Δv, the change in velocity (here called DelV, code 4); Δt, the amount of time over which the uniform acceleration is applied (here called DelT, code 5); s0, the initial displacement or distance (here called Sini, code 6); sf, the final displacement or distance (here called Sfin, code 6); and Δs, the change in displacement or distance (here called DelS, code 7).

You enter each known factor by first entering the appropriate code (1 through 8), then entering the factor’s value. The program displays the name of the factor after you enter the factor’s code, to help ensure the correct factor is entered. This two-step process of identifying the data to be entered, then entering the data, is indicated in the screen shot to the right.

If you enter an incorrect value for a factor, you can enter the factor again with the correct value. The most recently entered factor value is the value that is used. If you enter an incorrect factor code, you must restart the program. There is no way to “erase” a factor once it has been entered.

When you have entered all the known factor values, use the code 0 to indicate that entry of the factor values is complete. The program will then compute and display the factor values that were not entered and can be deduced from the factors that were entered. The display of values is shown in the screen shot to the right.

The program displays the message “Done” when it has displayed all the factors which can be determined from the factors you entered. This may occur without the display of any factors which were deduced, if the information you entered was insufficient to deduce any factors. This message is shown in the screen shot to the left.

#### Program

##### Source Code

The program is available in a ZIP file, or may be entered as shown below. Remember that this program is copyrighted; see the copyright issues page for limitations on redistribution.

Program UNIFACCE (1638 bytes):

'UNIFACCE 1.0
0→A~S
Do
ClrText
"1:A 5:DelT2:Vini 6:Sini3:Vfin 7:Sfin4:DelV 8:DelS0:Done"?→A
If A=1
Then 1→B
"A"?→C
IfEnd
If A=2
Then 1→D
"Vini"?→E
IfEnd
If A=3
Then 1→F
"Vfin"?→G
IfEnd
If A=4
Then 1→H
"DelV"?→I
IfEnd
If A=5
Then 1→J
"DelT"?→K
IfEnd
If A=6
Then 1→L
"Sini"?→M
IfEnd
If A=7
Then 1→N
"Sfin"?→O
IfEnd
If A=8
Then 1→P
"DelS"?→Q
IfEnd
LpWhile A≠0
Do
0→A
If B(H=0)J
Then 1→A
2→H
CK→I
IfEnd
If BH(J=0)
Then If C≠0
Then 1→A
2→J
I÷C→K
IfEnd
IfEnd
If (B=0)HJ
Then If K≠0
Then 1→A
2→B
I÷K→C
IfEnd
IfEnd
If DF(H=0)
Then 1→A
2→H
G-E→I
IfEnd
If D(F=0)H
Then 1→A
2→F
E+I→G
IfEnd
If (D=0)FH
Then 1→A
2→D
G-I→E
IfEnd
If DFJ(P=0)
Then 1→A
2→P
(E+G)K÷2→Q
IfEnd
If DF(J=0)P
Then If E≠(-)G
Then 1→A
2→J
2Q÷(E+G)→K
IfEnd
IfEnd
If D(F=0)JP
Then If K≠0
Then 1→A
2→F
2Q÷K-E→G
IfEnd
IfEnd
If (D=0)FJP
Then If K≠0
Then 1→A
2→D
2Q÷K-G→E
IfEnd
IfEnd
If LN(P=0)
Then 1→A
2→P
O-M→Q
IfEnd
If (L=0)NP
Then 1→A
2→L
O-Q→M
IfEnd
If L(N=0)P
Then 1→A
2→N
M+Q→O
IfEnd
If BDJ(P=0)
Then 1→A
2→P
.5CK2+EK→Q
IfEnd
If B(D=0)JP
Then If K≠0
Then 1→A
2→D
(Q-.5CK2)÷K→E
IfEnd
IfEnd
If (B=0)DJP
Then If K≠0
Then 1→A
2→B
2(Q-EK)÷K2→C
IfEnd
IfEnd
If BD(J=0)P
Then If C=0
Then 1→A
2→J
Q÷E→K
Else E2+2CQ→S
If S<0
Then "No real T"
Else ((-)E-√S)÷C→R
((-)E+√S)÷C→S
If R>S
Then S→A
R→S
A→R
IfEnd
If R>0
Then R→K
Else S→K
R→S
IfEnd
1→A
2→J
2→R
IfEnd
IfEnd
IfEnd
If BFJ(P=0)
Then 1→A
2→P
(-).5CK2+GK→Q
IfEnd
If BF(J=0)P
Then If C=0
Then 1→A
2→J
Q÷G→K
Else G2-2CQ→R
If R<0
Then "No real T"
Else (G+√R)÷C→S
(G-√R)÷C→R
If R>S
Then R→A
S→R
A→S
IfEnd
If R>0
Then R→K
Else S→K
R→S
IfEnd
1→A
2→J
2→R
IfEnd
IfEnd
IfEnd
If B(F=0)JP
Then If K≠0
Then 1→A
2→F
(Q+.5CK2)÷K→G
IfEnd
IfEnd
If (B=0)FJP
Then If K≠0
Then 1→A
2→B
(GK-O)÷K2→C
IfEnd
IfEnd
If (B=0)DFP
Then If Q≠0
Then 1→A
2→B
.5(G2-E2)÷Q→C
IfEnd
IfEnd
If BDF(P=0)
Then If C≠0
Then 1→A
2→P
.5(G2-E2)÷C→Q
IfEnd
IfEnd
LpWhile A≠0
If B>1
Then "A"
C
IfEnd
If D>1
Then "Vini"
E
IfEnd
If F>1
Then "Vfin"
G
IfEnd
If H>1
Then "DelV"
I
IfEnd
If J>1
Then "DelT"
K
IfEnd
If R>1
Then "T2"
S
IfEnd
If L>1
Then "Sini"
M
IfEnd
If N>1
Then "Sfin"
O
IfEnd
If P>1
Then "DelS"
Q
IfEnd
"Done"

##### Programming Notes

The program tests for multi-variable conditions by using arithmetic. The values used are 0 for false, and non-zero for true; note that the calculator’s various control constructs use the same convention. This permits multiplication to be used as an equivalent to logical and, addition to be used as an equivalent to logical or, and testing for not equal to 0 to be used as an equivalent to logical not.

Each factor is kept as a pair of values: the first value indicates whether the factor is known and, if known, how it is known, while the second value indicates the factor’s value. The first value is 0 to indicate the factor is not known, 1 to indicate the factor was entered by the user, and 2 to indicate the factor was computed by the program. Only factors computed by the program are displayed.

Page last updated 22 January 2006.

# Brian’s Casio Calculator Corner

Home

Programs

Index

Mathematics

Finance

Physics

Index

Vector Sum

Right Triangle

Newton’s Law

Uniform Acceleration

Ohm’s Laws

Utility

Tutorial

Puzzles

Site Information