The simple harmonic oscillator and the wave equation

doug  <sweetser@world.com>

The simple harmonic oscillator
The damped SHO
The wave equation
Implications
Initialization functions

The Simple Harmonic Oscillator

The differential equation for a simple harmonic oscillator in one dimension can be express with quaternion operators.

\(\((q[d\/dt, 0, 0, 0].q[d\/dt, 0, 0, 0].q[0, x[t], 0, 0]\  + \ 
			
            q[0, \ \(k\/m\) x[t], 0, 0])\).{1, 0, 0, 0}\  == \ 0\){0, (((d^2) x[t])/(dt^2)) + ((k x[t])/m), 0, 0} == 0

\(\(\((d\/dt, 0\&⇀)\)\^2\) \((0, x, 0, 0)\)\  + \ 
        \((0, \ \(k\/m\) x, 0, 0)\)
 = 
      \(\((0, \(d\^2\ x\)\/dt\^2 + \(k\ x\)\/m, 0, 0)\) = 0\)\)

This equation can be solved directly.

\(DSolve[
      \((
		oneoponq[q[D, 0, 0, 0], 
		
                oneoponq[q[D, 0, 0, 0], q[0, x[t], 0, 0]]]\  + \ 
			
              q[0, \ \(k\/m\) x[t], 0, 0])\)[\([2, 1]\)] == \ 0, x[t], t]\){{x[t] -> C[2] Cos[(((Sqrt[k]) t)/(Sqrt[m]))] + C[1] Sin[(((Sqrt[k]) t)/(Sqrt[m]))]}}

x -> C[2] Cos[(((Sqrt[k]) t)/(Sqrt[m]))] + C[1] Sin[(((Sqrt[k]) t)/(Sqrt[m]))]

Find the velocity by taking the derivative with respect to time.

D[%[[1]], t]{x'[t]->(((Sqrt[k]) C[1] Cos[(((Sqrt[k]) t)/(Sqrt[m]))])/(Sqrt[m])) - 
          (((Sqrt[k]) C[2] Sin[(((Sqrt[k]) t)/(Sqrt[m]))])/(Sqrt[m]))}

x'->(((Sqrt[k]) C[1] Cos[(((Sqrt[k]) t)/(Sqrt[m]))])/(Sqrt[m])) - 
        (((Sqrt[k]) C[2] Sin[(((Sqrt[k]) t)/(Sqrt[m]))])/(Sqrt[m]))

The damped Simple Harmonic Oscillator

Generate the differential equation for a damped simple harmonic oscillator as done above.

\(\((q[d\/dt, 0, 0, 0].q[d\/dt, 0, 0, 0].q[0, x[t], 0, 0]\  + \ 
			
            q[d\/dt, 0, 0, 0].q[0, b\ x[t], 0, 0]\  + \ 
			
            q[0, \ \(k\/m\) x[t], 0, 0])\).{1, 0, 0, 0}\  == \ 0\){0, (((d^2) x[t])/(dt^2)) + ((b d x[t])/dt) + ((k x[t])/m), 0, 0}
         == 0

\(\(\((d\/dt, 0\&⇀)\)\^2\) \((0, x, 0, 0)\)\  + 
        \((d\/dt, 0\&⇀)\) \((0, b\ x, 0, 0)\)\  + \ 
			
        \((0, \ \(k\/m\) x, 0, 0)\)
 = 
      \(\((0, \(d\^2\ x\)\/dt\^2 + \(b\ d\ x\)\/dt + \(k\ x\)\/m, 0, 0)\) = 0
        \)\)

Solve the equation.

\(DSolve[
      \((
		oneoponq[q[D, 0, 0, 0], 
		
                oneoponq[q[D, 0, 0, 0], q[0, x[t], 0, 0]]]\  + \ 
		
              oneoponq[q[D, 0, 0, 0], q[0, b\ x[t], 0, 0]]\  + 
		
              q[0, \ \(k\/m\) x[t], 0, 0])\)[\([2, 1]\)] == \ 0, x[t], t]\){{x[t] -> 
          (E^((((-b m - (Sqrt[-4 k m + (b^2) (m^2)])) t)/(2 
                      m)))) C[1] + 
            (E^((((-b m + (Sqrt[-4 k m + (b^2) (m^2)])) t)/(2
                       m)))) C[2]}}

x -> 
      (E^((((-b m - (Sqrt[-4 k m + (b^2) (m^2)])) t)/(2 m
                  )))) C[1] + 
        (E^((((-b m + (Sqrt[-4 k m + (b^2) (m^2)])) t)/(2 m
                  )))) C[2]

The wave equation

Consider a wave traveling along the x direction.  The equation which governs its motion is given by

(q[(d/(v dt)), (d/dx), 0, 0].q[(d/(v dt)), (d/dx), 0, 0].q[0, 0, 
            f[t v  +  x], 0]).{1, 0, 0, 0}{0, 0, (-((d^2)/(dx^2)) + ((d^2)/((dt^2) (v^2)))) f[t v + x], 
      ((2 (d^2) f[t v + x])/(dt dx v))}

\(\(\((d\/\(v\ dt\), d\/dx, 0, 0)\)\^2\) \((0, 0, f[t\ v\  + \ x], 0)\)

       = \((0, 0, 
        \((\(-\(d\^2\/dx\^2\)\) + d\^2\/\(dt\^2\ v\^2\))\)\ f[t\ v + x], 
        \(2\ d\^2\ f[t\ v + x]\)\/\(dt\ dx\ v\))\)\)

The third term is the one dmensional wave equation.  The forth term is the instantaneous power transmitted by the wave.

Implications

Using the appropriate combinations of quaternion operators, the classical simple harmonic oscillator and wave equation were written out and solved.  The functional definition of classical physics employed here is that the time operator is decoupled from any space operator.  There is no reason why a similar combination of operators cannot be used when time and space operators are not decoupled.  In fact, the four Maxwell equations appear to be one nonhomogeneous quaternion wave equation, and the structure of the simple harmonic oscillator appears in the Klein-Gordon equation.