Simple Harmonic Oscillators

Everything is a simple harmonic oscillator, so if we pay attention to the details, we may learn something from these animations.

A Classical Simple Harmonic Oscillator

summary: 

A spring with no losses due to friction will oscillate forever.

description: 

The motion happens to occur along one axis only. The animation has the look we expect of springs, stretching out when going fastest, compressing at the endpoints. Just what everyone expects to see. Try to predict what the velocity animation looks like (my guess was wrong).

command: 
q_graph -out sho-x -dir sho -box 10 -command 't_function -mqs 2 -mqs 1 -t_function polynomial -t_function one -x_function cos -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero 1 2 1 2 1 3 0 0 0 1 0 0 -shift "-11 5 0 0" -pi 8 -n_steps 1600' -color yellow
math
equation: 

(t, x, y, z) = (t, cos (2 t + 3), 0, 0)

tags
Physics Tag: 
simple harmonic oscillator
Math Tag: 
cosine
Programming Tag: 
command line quaternions
t_function

The Velocity of a Classic SHO

summary: 

The scalar term is equal to 1 for every velocity because the problem is classical.

description: 

When one take the time derivative of the oscillator, \frac{d t}{d t} = 1. I puzzled over that obvious result for days, since its meaning was not clear. Then I recalled in relativistic physics, one takes the derivative with respect to the interval tau, so \frac{d t}{d \tau} = \gamma. For tiny values of velocity, gamma will equal 1. What people often graph is the velocity parameterized by time. They don't wish to treat the 4-velocity like a 4-velocity. If you keep the books consistent, you can get fun surprises.

command: 
q_graph -out sho-x_and_v -dir sho -box 10 -command 't_function -mqs 2 -mqs 1 -t_function polynomial -t_function one -x_function cos -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero 1 2 1 2 1 3 0 0 0 1 0 0 -shift "-11 5 0 0" -pi 8 -n_steps 1600' -color yellow -command 't_function -mqs 2 -mqs 1 -t_function one -t_function one -x_function sin -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 0 0 0 -2 0 0' -color blue
math
equation: 

(t, x, y, z) = (t, cos( 2 t + 3), 0, 0)
(\gamma, \gamma \beta_x, \gamma \beta_y, \gamma \beta_z) = (1, -2 sin( 2 t + 3), 0, 0)

tags
Physics Tag: 
simple harmonic oscillator
Math Tag: 
sine
cosine
Programming Tag: 
command line quaternions
t_function

Velocity and Acceleration of a Classical SHO

summary: 

The first term of the 4-acceleration is frozen at 0, an observations whose implications I do not understand.

description: 

The oscillator is in yellow, its first time derivative in blue, and second time derivative in red. I understand why the velocity has a fixed scalar value equal to 1, that is what gamma is for low velocities. Acceleration in special relativity must be handled with care. The math is easy: tack the derivative of a constant, and zero will result. The implications of that math are not clear to me.

command: 
q_graph -out sho-x_and_v_and_a -dir sho -box 10 -command 't_function -mqs 2 -mqs 1 -t_function polynomial -t_function one -x_function cos -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero 1 2 1 2 1 3 0 0 0 1 0 0 -shift "-11 5 0 0" -pi 8 -n_steps 1600' -color yellow -command 't_function -mqs 2 -mqs 1 -t_function one -t_function one -x_function sin -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 0 0 0 -2 0 0' -color blue -command 't_function -mqs 2 -mqs 1 -t_function zero -t_function zero -x_function cos -x_function polynomial -y_function zero -y_function zero -z_function zero -z_function zero -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 0 0 0 -4 0 0' -color red
math
equation: 

(t, x, y, z) = (t, cos(2 t + 3), 0, 0)
(\gamma, \gamma \beta_x, \gamma \beta_y, \gamma \beta_z) = (1, -2 sin(2 t + 3, 0, 0)
(a_t, a_x, a_y, a_z) = (0, -4 cos(2 t + 3, 0, 0)

tags
Physics Tag: 
simple harmonic oscillator
Math Tag: 
sine
cosine
Programming Tag: 
command line quaternions
t_function

3 Frequency classical SHO

summary: 

The 3 complex planes in a quaternion can be tuned to different frequencies and amplitudes.

description: 

The simple harmonic oscillator is in yellow, its velocity in blue, and acceleration in red. The scalar value for the a low velocity system is equal to one while the scalar acceleration is zero. The differences between both frequencies and amplitudes change the relative lengths of the blue and red lines, velocity and acceleration respectively. In this example, the frequency decreases while the amplitude increase going from x to y to z.

command: 
q_graph -out sho-xyz_and_v_and_a -dir sho -box 10 -command 't_function -mqs 2 -mqs 1 -t_function polynomial -t_function one -x_function cos -x_function polynomial -y_function cos -y_function polynomial -z_function cos -z_function polynomial 1 2 1 2 1 3 2 1 0 1 6 8 -shift "-11 5 0 0" -pi 8 -n_steps 1600' -color yellow -command 't_function -mqs 2 -mqs 1 -t_function one -t_function one -x_function sin -x_function polynomial -y_function sin -y_function polynomial -z_function sin -z_function polynomial -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 2 1 0 -2 -6 -4' -color blue -command 't_function -mqs 2 -mqs 1 -t_function zero -t_function zero -x_function cos -x_function polynomial -y_function cos -y_function polynomial -z_function cos -z_function polynomial -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 2 1 0 -4 -6 -2' -color red
math
equation: 

(t, x, y, z) = (t, cos(2 t + 3), 6 cos(t + 2), 8 cos(t/2 + 1))
(\gamma, \gamma \beta_x, \gamma \beta_y, \gamma \beta_z) = (1, -2 sin(2 t + 3), -6 sin(t + 2), -4 sin(t/2 + 1))
(a_t, a_x, a_y, a_z) = (0, -4 cos(2 t + 3), -6 cos(t + 2), -2 cos(t/2 + 1))

tags
Physics Tag: 
simple harmonic oscillator
Math Tag: 
sine
cosine
Programming Tag: 
command line quaternions
t_function