E-Code

Simple harmonic motion: spring or pendulum — a TI-84 Plus CE program

By E-Code · updated

SHM is a TI-BASIC program for the TI-84 Plus CE. Mass on a spring or a simple pendulum released from rest at its amplitude (x = A·cos ωt; the pendulum uses small angles and g = 9.81 m/s²): angular frequency, period and frequency, then position, velocity and acceleration at any time, and the maximum speed.

What it asks for and what it shows

It asks for 4 values at its prompts, after you pick option 1 from its menu. In the example below it shows OMEGA, PERIOD, FREQ HZ, X (M), V (M/S), ACC, VMAX.

Example run

One of its oracle test cases: “mass on a spring”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 1
Input 10.5
Input 2200
Input 30.1
Input 40.3
The screen shows
OMEGA=20
PERIOD=0.3141592654
FREQ HZ=3.183098862
X (M)=0.09601702867
V (M/S)=0.5588309964
ACC=-38.40681147
VMAX=2

How it's checked

3 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 21 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE physics programs · All TI-84 Plus CE programs