A brief summary of important laws in physics written as quaternions

doug  <sweetser@world.com>

Classical physics
    Newton's 2nd law in an inertial reference frame, Cartesian coordinates
    Newton's 2nd law in a rotating reference frame
    Newton's 2nd law in an inertial reference frame, polar coordinates, for a central force
    The wave equation
    The simple harmonic oscillator
    A test if a force in conservative
    
Special relativity
    The invariant interval squared between two events
    Transformations between inertial reference frames for a boost along the x axis
    
Electromagnetism
    The electric and magnetic fields
    Electrostatics
    Magnetostatics
    The gauge-invariant Maxwell equations
    The Maxwell equations in the Lorenz gauge
    The Maxwell equations in the light gauge (QED?)
    The Lorentz force
    
Quantum mechanics
    A complete inner product space
    The wave function
    The Schrödinger equation
    The Klein-Gordon equation
    Time reversal
    
Gravity
    The gravitational field
    The Maxwell gravitational wave equations
    The Lorentz gravitational force

The following laws of physics are generated by quaternion operators  acting on the appropriate quaternion-valued functions.  Quaternions are defined by the function q[] which can take two arguments (a scalar and a 3-vector) or four in the matrix representation of quaternions.  The function op[] takes a list of operators and has them multiply and act on a quaternion-valued function.

Classical physics

Newton's 2nd law in an inertial reference frame, Cartesian coordinates

\(F\&⇀\  == \ \ 
      m\ \ op[{q[dt, 0\&⇀], q[dt, 0\&⇀]}, 
            q[0, r\&⇀[t]]].{1, 0}

       == {0, m\ \ \(\(d\^2\) r\&⇀[t]\)\/\(d\ t\^2\)\ }\)

(Overscript[F, ⇀])  = 
        m A  = 
          m (((((d )/(d t)), (Overscript[0, ⇀])))^2) 
              (t,  (Overscript[r, ⇀])) = 
            m (0,  (((d^2) (Overscript[r, ⇀]))/(d (t^2))))

Newton's 2nd law in an inertial reference frame, polar coordinates, for a central force

(Overscript[F,  ⇀])  == 
\(Simplify[
        Expand[\((

              q[Cos[θ[t]], \ 0, \ 0, \ \(-Sin[θ[t]]\)]\ .\ 

                  oneoponq[q[D, 0, 0, 0], 

                    oneoponq[q[D, 0, 0, 0], \ 

                      m\ q[t, \ r[t]\ Cos[θ[t]], \ 
                          r[t]\ Sin[θ[t]], \ 0]]]\  /. \ 
                
{\(\(θ'\)'\)[t]\  -> \ 0, \ 
                  \(θ'\)[t]\  -> \ L/\ \((m\ r[t]^2)\)})\).{1, 0, 0, 0}
              \ ]]\)
=={0,r''[t] m-((L^2)/(m r[t]^3)),((2 L r'[t])/(r[t]^2)),0}

(Overscript[F, ⇀]) =m (Overscript[A, ⇀]) = 
m (Cos[θ], 0, 0, -Sin[θ]) 
              (((((d )/(d t)), (Overscript[0, ⇀])))^2) 
              (t,  r Cos[θ],  r Sin[θ],  0)
=(0,-((L^2)/((m^2) (r^3)))+r'',((2 L r')/(m (r^2))),0)

Newton's 2nd law in a rotating reference frame

\(\(F\& ⇀ \)\  == \ 
      m\ op[{q[d\/dt, \(ω\& ⇀ \)], 
              q[d\/dt, \(ω\& ⇀ \)]}, 
            q[0, \(r\& ⇀ \)[t]]].{1, 0}

       == {m\ \((
          \(-\((\(ω\& ⇀ \)·\((
                    \(ω\& ⇀ \) X 
                      \( r\& ⇀ \)[t])\))\)\) - 
            2\ \(ω\& ⇀ \)·\ 
                \(d\ \(r\& ⇀ \)[t]\)\/\(d\ t\))\), 

        m\ \((\(ω\& ⇀ \) X \((
                \(ω\& ⇀ \) X \( r\& ⇀ \)[t])
                \) + \ \ 
              2\ \(ω\& ⇀ \) X 
                \( d\ \(r\& ⇀ \)[t]\)\/\(d\ t\)\  - 
              \(ω\& ⇀ \), 
            \((\(ω\& ⇀ 
                      \)·\(r\& ⇀ \)[t])\) + \ 
              \(\(d\^2\) \(r\& ⇀ \)[t]\)\/\(d\ t\^2\))\)}\)

\(F\&⇀\  = 
      \(m\ A\&⇀\  = 
        \(m \(\((\(d\ \)\/\(d\ t\), ω\&⇀)\)\^2\) 
            \((0, r\&⇀)\)
\ \  = 
          \((\(\(d  ω\&⇀\)\/dt\).r\&⇀, \ 
            \(-ω\^2\) r\&⇀\  - \ 
              2\ \(d  r\&⇀\)\/dt\ x\ ω\&⇀\ 
               + \ \(d  ω\&⇀\)\/dt\ x\ r\&⇀\ 
               + \ \(\(d\^2\) r\&⇀\)\/dt\^2)\)\)\)\)

The simple harmonic oscillator

\(DSolve[
      \((
oponq[D, oponq[D, 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]))]}}

\(\(\((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\)\)x -> C[2] Cos[(((Sqrt[k]) t)/(Sqrt[m]))] + C[1] Sin[(((Sqrt[k]) t)/(Sqrt[m]))]

The wave equation

\(\((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.

A test if a force is conservative

\({\(-
          \(▽\& ⇀ \).
            \(F\& ⇀ \)\), \(0\& ⇀ \)}\  == \ 
      op[{q[0, \(▽\& ⇀ \)]}, 
          q[0, \(F\& ⇀ \)]].{1, 0}

       == {\(-\((
            \(▽\& ⇀ \)·\(F\& 
                  ⇀ \))\)\), 
        \(▽\& ⇀ \) X \( F\& ⇀ \)}
        \)

[((d/dt), (Overscript[∇, ⇀])), 
        (Overscript[F, ⇀])] =0

The other tests for a conservative force involving path integrals and potential functions can be formed with quaternions.

Special relativity

The invariant interval squared between 2 events

The invariant interval squared is the first term of the square of the difference.

\({τ\^2, 2\ Δt\ Δx, \ 
        2\ Δt\ Δy, \ 
        2  Δt\ Δz}\  == 
      Simplify[

        \((q[t\_2, \ x\_2, \ y\_2, z\_2]\  - \ q[t\_1, \ x\_1, \ y\_1, z\_1])
            \).
\((q[t\_2, \ x\_2, \ y\_2, z\_2]\  - \ 
              q[t\_1, \ x\_1, \ y\_1, z\_1])\).{1, 0, 0, 0}]

       == {\((t\_1 - t\_2)\)\^2 - \((x\_1 - x\_2)\)\^2 - 
          \((y\_1 - y\_2)\)\^2 - \((z\_1 - z\_2)\)\^2, 

        2\ \((t\_1 - t\_2)\)\ \((x\_1 - x\_2)\), 
        2\ \((t\_1 - t\_2)\)\ \((y\_1 - y\_2)\), 

        2\ \((t\_1 - t\_2)\)\ \((z\_1 - z\_2)\)}\)

((((t,  (Overscript[X, ⇀])) - 
            ((t^′),  ((Overscript[X, ⇀])^′))))^2) = 
      ((dt^2) - d  (Overscript[X, ⇀]).d  (Overscript[X, ⇀]), 
        2 dt d  (Overscript[X, ⇀]))

Transformations of an inertial reference frame for a boost along the x axis

if t = y = z = 0

\({t', x', 0, 0} == \ 
      q[γ, \ γ\ β, 0, 0]\ .\ q[0, x, 0, 0].{1, 0, 0, 0}

       == {\(-γ\)\ β\ x, γ\ x, 0, 0}\)

L = γ (1, β, 0, 0)q  ->  (q^′)  =  Lq(0, x, 0, 0)  ->  ((t^′), (x^′), 0, 0)  =  
      (-γ β x, γ x, 0, 0)

if x = y = z = 0

\({t', x', 0, 0} == \ 
      q[γ, \(-\ γ\)\ β, 0, 0]\ .\ 
        q[t, 0, 0, 0].{1, 0, 0, 0}

       == {γ\ t, \(-γ\)\ β\ t, 0, 0}\)

L =  γ (1, -β, 0, 0)\(q\  -> \ q\^′\  = \ Lq	\)(t, (Overscript[0, ⇀]))  ->  
        ((t^′), (x^′), 0, 0) =  
      (γ t, -γ β t, 0, 0)

if t = x, y = z = 0  (the sign depends on redshift versus blueshift)

\({t', x', 0, 0} == 
      \((γ\  ± \ γ\ β)\)\ 
        q[t, x, 0, 0].{1, 0, 0, 0}\ 

       == {\((γ ± γ\ β)\)\ t, 
        \((γ ± γ\ β)\)\ x, 0, 0}\)

L = γ (1 ± β, 0, 0, 0)\(q\  -> \ q\^′\  = \ Lq	\)(t, x, 0, 0) -> ((t^′), (x^′), 0, 0) = 
      γ (1 ± β) ( t, x, 0, 0)

if y = z = 0

\({t', x', 0, 0} == 
      Simplify[

        \((q[\(γ\ t\^2\  - \ 2\ γ\ β\ t\ x\  + \ 
                    γ\ x\^2\)\/\(t\^2 + \ x\^2\), 
                \(\(-γ\)\ β \((t\^2 - \ x\^2)\)\)\/\(t\^2 + \ 
                    x\^2\), 0, 0]
.q[t, x, 0, 0])\).{1, 0, 0, 0}]

       == {\((t - x\ β)\)\ γ, \((x - t\ β)\)\ γ, 0, 
        0}\)

L = 
      (((γ (t^2)  -  2 γ β t x  +  
            γ (x^2))/((t^2) +  (x^2))), 
        ((-γ β ((t^2) -  (x^2)))/((t^2) +  (x^2))), 0, 
        0)\(q\  -> \ q\^′\  = \ Lq	\)\(\((t, x, 0, 0)\) -> \((t\^′, x\^′, 0, 0)\)

      											 = 
      \((γ\ t - γ\ x\ β\ , 
        \(-γ\)\ β\ t + γ\ x\ , 0, 0)\)\)

In general for a boost along the x axis:

\({t', x', y', z'} == 

      Simplify[1\/\(t\^2 + \ x\^2 + \ y\^2\  + \ z\^2\)

        q[
            γ\ t\^2 - 2\ γ\ β\ t\ x\  + \ γ\ x\^2\ 
               + \ y\^2\  + \ z\^2, \ 
            \(-\ γ\)\ β \((t\^2 - \ x\^2)\), 

            t\ y\  - \ x\ z\  + \ γ\ y \((\(-t\)\  + \ β\ x)\)\ 
               + \ γ\ z \((\(-β\)\ t\  + \ x)\), 

            x\ y\  + \ t\ z\  + \ γ\ y \((β\ t\  - \ x)\)\ \  + 
              \ γ\ z \((\(-t\)\  + \ β\ x)\)].

          q[t, x, y, z].{1, 0, 0, 0}]

       == {\((t - x\ β)\)\ γ, \((x - t\ β)\)\ γ, y, 
        z}\)

L = (1/((t^2) +  (x^2) +  (y^2)  +  (z^2)))\(\((γ\ t\^2 - 2\ γ\ β\ t\ x\  + \ γ\ x\^2 + \ 
        y\^2 + \ z\^2, \(-\ γ\)\ β \((t\^2 - \ x\^2)\), 

      t\ y - x\ z + \ γ\ y \((\(-t\)\  + \ β\ x)\)\  + \ 
        γ\ z \((\(-β\)\ t\  + \ x)\), 

      x\ y + \ t\ z + \ γ\ y \((β\ t\  - \ x)\) + \ 
        γ\ z \((\(-t\)\  + \ β\ x)\))\)\)\(q\  -> \ q\^′\  = \ Lq	\)\(\((t, x, 0, 0)\) -> \((t\^′, x\^′, 0, 0)\)

      											 = 
      \((γ\ t - γ\ x\ β\ , 
        \(-γ\)\ β\ t + γ\ x\ , y, z)\)\)

Electromagnetism

The electric and magnetic fields

\(E\  == \ 
      vector[evenop[{q[dt, \(-\(▽\& ⇀ \)\)]}, 
            q[ϕ[t], \(-\(A\& ⇀ \)[t]\)]]].{1, 0}

       == {0, \(-
            \((\ \(▽\& ⇀ \)\ ϕ[t]\ )
              \)\) - ∂\(A\& ⇀ \)[t]\/∂t}\)\(B\  == \ 
      oddop[{q[dt, \(▽\& ⇀ \)]}, 
          q[ϕ[t], \(A\& ⇀ \)[t]]].{1, 0}

       == {0, \(\ 
        \(▽\& ⇀ \)\ X\ 
          \(A\& ⇀ \)[t]\ \)}\)

E =vector{((∂/∂)t, 
              (Overscript[▽, ⇀])), 
            (ϕ, -(Overscript[A, ⇀]))}=(0, -(Overscript[▽, ⇀]) ϕ - 
            ∂((Overscript[A, ⇀])/∂)t)B = [((∂/∂)t, 
            (Overscript[▽, ⇀])), 
          (ϕ, (Overscript[A, ⇀]))]=(0,  (Overscript[▽, ⇀]) X (Overscript[A, ⇀]) )

Electrostatics

\({4\ π \ ρ, \(0\& ⇀ \)}\  == \ 
      op[{q[0, \(▽\& ⇀ \)], 
            q[0, \(▽\& ⇀ \)]}, 
          q[ϕ, \(0\& ⇀ \)]].{1, 0}

       == {\(-\((
            \(▽\& ⇀ \)·\((
                \(▽\& ⇀ \), 
                  ϕ)\))\)\), 
        \(▽\& ⇀ \) X \((
          \(▽\& ⇀ \), ϕ)
          \)}\)

(4 π  ρ, (Overscript[0, ⇀]))  =  
      (((0, (Overscript[▽, ⇀])))^2) 
          (ϕ, (Overscript[0, ⇀]))  =  
        (-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]), ϕ, 
            (Overscript[▽, ⇀]) X 
               (Overscript[▽, ⇀]), ϕ)

Magnetostatics

\({0, \ \(4\ π\ \(j\& ⇀ \)\)\/c} == \ 
      op[{q[0, \(▽\& ⇀ \)], 
            q[0, \(▽\& ⇀ \)]}, 
          q[0, \(A\& ⇀ \)]].{1, 0}

       == {\(-\(▽\& ⇀ \)\)·\((
              \(▽\& ⇀ \) X 
                \( A\& ⇀ \))\), 
          \(▽\& ⇀ \) X \((
              \(▽\& ⇀ \) X 
                \( A\& ⇀ \))\) - 
            \(▽\& ⇀ \), 
          \((\(▽\& ⇀ \)·\(A\& 
                  ⇀ \))\)}\)

(0, 4 π (Overscript[J, ⇀])) = 
      (((0, (Overscript[▽, ⇀])))^2) 
          (0, (Overscript[A, ⇀])) = 
        (-(Overscript[▽, ⇀])·(Overscript[▽, ⇀])  X  (Overscript[A, ⇀]), 
            (Overscript[▽, ⇀]) X 
                 (Overscript[▽, ⇀]) X 
                 (Overscript[A, ⇀]) - 
              (Overscript[▽, ⇀]), 
            (Overscript[▽, ⇀])·(Overscript[A, ⇀]))

The Maxwell equations

\({0, \ 0\&⇀} == 
      \((evenop[{q[dt, ▽\&⇀]}, 
              q[0, B\&⇀[t]]]
 + \ 
            oddop[{q[dt, ▽\&⇀]}, 
              q[0, E\&⇀[t]]])\).{1, 0}

       == {\(-\((\ 
            ▽\&⇀\ ·\ 
              B\&⇀[t]\ \ )\)\), 
        \(\ ▽\&⇀\ X\ E\&⇀[t]\ 
          \) + ∂B\&⇀[t]\/∂t}\)\(4\ π\ {ρ, \ J\&⇀}\  == 
      \((oddop[{q[dt, ▽\&⇀]}, 
              q[0, B\&⇀[t]]]\ 
 - \ 
            evenop[{q[dt, ▽\&⇀]}, 
              q[0, E\&⇀[t]]])\).{1, 0}

       == {\ ▽\&⇀\ ·\ 
          E\&⇀[t]\ \ , 
        \(\ ▽\&⇀\ X\ B\&⇀[t]\ 
          \) - ∂E\&⇀[t]\/∂t}\)

From E and B fields{((∂/∂)t, 
              (Overscript[▽, ⇀])), 
            (0, (Overscript[B, ⇀]))} + [((∂/∂)t, 
              (Overscript[▽, ⇀])), 
            (0, (Overscript[E, ⇀]))]
=(-(Overscript[▽, ⇀])·(Overscript[B
                , ⇀])  ,  
            (Overscript[▽, ⇀]) X (Overscript[E, ⇀])  + 
              ∂((Overscript[B, ⇀])/∂)t)= (0,  (Overscript[0, ⇀]))
	
[((∂/∂)t, 
                  (Overscript[▽, ⇀])), 
                (0, (Overscript[B, ⇀]))]- {((∂/∂)t, 
                  (Overscript[▽, ⇀])), 
                (0, (Overscript[E, ⇀]))}
=( (Overscript[▽, ⇀])·(Overscript[E
                    , ⇀])  ,  
                (Overscript[▽, ⇀]) X (Overscript[B, ⇀]) 
                   - ∂((Overscript[E, ⇀])/∂)t) = 
              4 π (ρ, (Overscript[J, ⇀]))
		From 4 - potentials{((∂/∂)t, (Overscript[▽, ⇀]))
              ,[((∂/∂)t, 
                (Overscript[▽, ⇀])), 
              (ϕ, (Overscript[A, ⇀]))]} 
+[((∂/∂)t, (Overscript[▽, ⇀]))
              ,vector{((∂/∂)t, 
                  (Overscript[▽, ⇀])), 
                (ϕ, -(Overscript[A, ⇀]))}]
=(-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]) X (Overscript[A, ⇀]) ,-(Overscript[▽, ⇀]) X (Overscript[▽, ⇀]) ϕ)=(-(Overscript[▽, ⇀])·(Overscript[B
                , ⇀]), 
            (Overscript[▽, ⇀]) X (Overscript[E, ⇀]) + 
              ∂((Overscript[B, ⇀])/∂)t)=(0,  (Overscript[0, ⇀]))

		[((∂/∂)t, 
                    (Overscript[▽, ⇀])),[((∂/∂)t, 
                      (Overscript[▽, ⇀])), 
                    (ϕ, (Overscript[A, ⇀]))]]
	- {((∂/∂)t, 
                    (Overscript[▽, ⇀])),vector{((∂/∂)t, 
                        (Overscript[▽, ⇀])), 
                      (ϕ, -(Overscript[A, ⇀]))}}
=(-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]) ϕ  - 
                  (Overscript[▽, ⇀])·∂((Overscript[A
                          , ⇀])/∂)t, 
                (Overscript[▽, ⇀]) X 
                    (Overscript[▽, ⇀]) X 
                    (Overscript[A, ⇀])  + 
                  (∂^2) ((Overscript[A, ⇀])/∂)(t^2) + 
                  ((∂(Overscript[▽, ⇀]), ϕ)/∂)t) = 
              4 π (ρ, (Overscript[J, ⇀]))

The Maxwell equations in the Lorenz gauge

\({4\ π\ ρ, \(4\ π\ j\&⇀\)\/c} == \ 
      Simplify[

        op[{q[dt, \ \ ▽\&⇀], 
                q[dt, \ \ ▽\&⇀]}, 
              
{q[dt, \(-▽\&⇀\)], 
                q[dt, \(-▽\&⇀\)]}, 
	
              q[ϕ[t], A\&⇀[t]]].{1, 0}/2]

       == {\(-▽\&⇀\)·\((
                \(▽\&⇀\) X 
                   A\&⇀[t])\) - 
            ▽\&⇀·\((
                ▽\&⇀, 
                  ϕ[t])\) + ∂\^2 ϕ[t]\/∂t\^2, 

          \(▽\&⇀\) X 
              \((\(▽\&⇀\) X 
                   A\&⇀[t])\) + 
            \(▽\&⇀\) X 
              \((▽\&⇀, 
                  ϕ[t])\) - 
            ▽\&⇀, 
          \((▽\&⇀·A
                    \&⇀[t])\) + 
            ∂\^2 A\&⇀[t]\/∂t\^2}\)

\(4\ π\ \((ρ, J\&⇀)\) = 
      \(\((\((∂\/∂t, \ \ 
                  ▽\&⇀)\)\^2 + 
              \((∂\/∂t, 
                  \(-\ ▽\&⇀\))\)\^2)\) 
          \((ϕ, A\&⇀)\)\/2
 = 
        \((∂\^2 ϕ\/∂t\^2 - 
              \(▽\&⇀\^2\) ϕ - 
              ▽\&⇀·▽\&⇀  X  A\&⇀, 
            ∂\^2 A\&⇀\/∂t\^2\  - 
              ▽\&⇀\(, \^2\)A
                \&⇀\  + 
              \(▽\&⇀\) X 
                 ▽\&⇀, ϕ)
          \)\)\)

The Maxwell equations in the light gauge (QED?)

{0,  (Overscript[0, ⇀])}==\(\((evenop[{q[dt, ▽\&⇀]}, 

              oddop[{q[dt, ▽\&⇀]}, 
                q[ϕ[t], A\&⇀[t]]]]\ 
 + \ 
            oddop[{q[dt, ▽\&⇀]}, 

              evenop[{q[dt, \(-▽\&⇀\)]}, 
                q[ϕ[t], \(-A\&⇀[t]\)]]])\).{1, 0}\)
=={-( (Overscript[▽, ⇀]) · 
                ( (Overscript[▽, ⇀]) X 
                    (Overscript[A, ⇀])[t] )  ), -(Overscript[▽, ⇀]) X ( (Overscript[▽, ⇀]) ϕ[t])}\({4\ π\ ρ, 4\ π\ J\&⇀} == 
      \((oddop[{q[dt, ▽\&⇀]}, 

              oddop[{q[dt, ▽\&⇀]}, 
                q[ϕ[t], A\&⇀[t]]]]\ 
 + \ 
            evenop[{q[dt, ▽\&⇀]}, 

              evenop[{q[dt, \(-▽\&⇀\)]}, 
                q[ϕ[t], \(-A\&⇀[t]\)]]])\).{1, 0}

       == {\ ▽\&⇀\ ·\ 
              ▽\&⇀\ ϕ[t]\  + 
          ∂\^2 ϕ[t]\/∂t\^2, 

        ▽\&⇀\ X\ 
            \((\ ▽\&⇀\ X\ 
                A\&⇀[t]\ )\)\  - \ 
          ▽\&⇀\ 
            \((\ ▽\&⇀\ ·\ 
                A\&⇀[t])\)\  - 
          ∂\^2 A\&⇀[t]\/∂t\^2}\)

((∂/∂)t, (Overscript[▽, ⇀]))
              ,[((∂/∂)t, 
                (Overscript[▽, ⇀])), 
              (ϕ, (Overscript[A, ⇀]))]} 
+[((∂/∂)t, (Overscript[▽, ⇀]))
              ,{((∂/∂)t, 
                -(Overscript[▽, ⇀])), 
              (ϕ, -(Overscript[A, ⇀]))}]
=(-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]) X (Overscript[A, ⇀]) ,-(Overscript[▽, ⇀]) X (Overscript[▽, ⇀]) ϕ)=(0,  (Overscript[0, ⇀]))
	
[((∂/∂)t, 
                  (Overscript[▽, ⇀])),[((∂/∂)t, 
                    (Overscript[▽, ⇀])), 
                  (ϕ, (Overscript[A, ⇀]))]]
	+ {((∂/∂)t, 
                  (Overscript[▽, ⇀])),{((∂/∂)t, 
                    -(Overscript[▽, ⇀])), 
                  (ϕ, -(Overscript[A, ⇀]))}}
=( (∂^2) (ϕ/∂)(t^2) + 
                ((Overscript[▽, ⇀])^2) ϕ , 
              -(∂^2) ((Overscript[A, ⇀])/∂)(t^2) -  
                ((Overscript[▽, ⇀])^2) (Overscript[A, ⇀]) )
               = 4 π (ρ, (Overscript[J, ⇀]))

The Lorentz force

\(\(\(\(\((
                    q[∂\/∂t, 
                      \(-\(▽\& ⇀ \)\)]\)}\).\ 
                q[ϕ[t], \(-\(A\& ⇀ \)[t]\)]]\).q[γ, 
              \(-γβ\)]
 - \ 
          q[γ, \(-γβ\)].q[∂\/∂t, 
              \(▽\& ⇀ \)].q[ϕ[t], 
              \(A\& ⇀ \)[t]])\).{1, 0}\)\({\(-γβ\)·\((
            \(▽\& ⇀ \), 
              ϕ[t] + ∂\(A\& ⇀ \)[t]\/∂t)
            \), 
\(-γ\) 
            \((\(▽\& ⇀ \), 
                ϕ[t] + 
                  ∂\(A\& ⇀ \)[t]\/∂t)\) + \ 
          γβ\ X \((
            \(▽\& ⇀ \) X 
              \( A\& ⇀ \)[t])\), }\)

\(\((∂\/∂t, \(-▽\&⇀\))
            \) \((ϕ, \(-A\&⇀\))\) 
          \((γ, \(-γβ\))\) - \ 
        \((γ, \(-γβ\))\) 
          \((∂\/∂t, ▽\&⇀)
            \) \((ϕ, A\&⇀)\)
 = 
      \(γ 
          \((\(-β\)·\((
                  ▽\&⇀, 
                    ϕ + ∂A\&⇀\/∂t)\), 
              \(-\((▽\&⇀, 
                      ϕ + ∂A\&⇀\/∂t)
                    \)\) + \ 
                β\ X 
                  \((\(▽\&⇀\) X 
                       A\&⇀)\), )\)
 = \ 
        γ\ e \((\ β.E, E\  + β\ ×\ B)\)\)\)

Quantum Mechanics

A complete inner product space

Define the inner product as the transpose of a quaternion times a quaternion.

\(\((Transpose[q[t, x, y, z]]\ .\ q[t, x, y, z])\)
.{1, 0, 0, 0}\){(t^2) + (x^2) + (y^2) + (z^2), 0, 0, 0}

\(\(\((t, X\&⇀)\)\^*\) 
        \((t\^′, X\&⇀\^′)\) = 
      \((t\ t\^′ + X\&⇀.X\&⇀\^′, 
        0\&⇀)\)\)

The norm (when q = q') is Euclidean, so this inner product space is complete.

The wave function

Set c = h = 1.  Consider the momentum representation of the wave function as a quaternion which can be normalized by multiplying by its conjugate.

Ψ  ≡  
      (∑_(n = 0)^∞) q[(Subscript[E, n]), (Subscript[(Overscript[P, ⇀]), n])]

Ψ  ≡  
      (∑_(n = 0)^∞)((Subscript[E, n]), (Subscript[(Overscript[P, ⇀]), n]))

The Schrödinger equation

H ψ  =  
      -(V/(Sqrt[V V])) ℏ ∂(ψ/∂)t =  
        ((-(ℏ^2))/(2 m)) (∇^2) ψ  +  
          v (0, X) ψ

H ψ  =  
      -(V/(Sqrt[V V])) ℏ ∂(ψ/∂)t =  
        ((-(ℏ^2))/(2 m)) (∇^2) ψ  +  
          v (0, X) ψ

The phase 3-vector V is a unitary quaternion.  Psi is quaternion-valued function.

The Klein-Gordon equation

The following operators generate the Klein-Gordon equation along with several vector identities.

\(0 == 
      ∑\+\(n = 0\)\%∞ Evaluate[
          Simplify[

            op[{q[dt, \(▽\& ⇀ \)], 
                    q[dt, \(▽\& ⇀ \)]}, 
                  
{q[dt, \(-\(▽\& ⇀ \)\)], 
                    q[dt, \(-\(▽\& ⇀ \)\)]}, 
                  
{q[E\_n[t], \(P\& ⇀ \)\_n[t]], 
                    q[E\_n[t], \(P\& ⇀ \)\_n[t]]}, 
                  
{q[E\_n[t], \(-\(P\& ⇀ \)\_n[t]\)], 
                    q[E\_n[t], \(-\(P\& ⇀ \)\_n[t]\)]}, 
	
                  q[E\_n[t], \(P\& ⇀ \)\_n[t]]].{1, 0}/2]]		

       == ∑\+\(n = 0\)\%∞{
          \(-\(▽\& ⇀ \)\)·\((
                  \(▽\& ⇀ \) X 
                    \( P\& ⇀ \)\_n[t])\) - 
              \(▽\& ⇀ 
                    \)·\(▽\& ⇀ 
                    \), 
            E\_n[t]
\  - 
              \(P\& ⇀ \)\_n[t]·\((
                  \(P\& ⇀ \)\_n[t] X 
                    \( P\& ⇀ \)\_n[t])\)
\  - 
              \((\(P\& ⇀ \)\_n[t]
                    ·\(P\& ⇀ \)\_n[t])
                \), 
            E\_n[t] + E\_n[t]\(, \^3\)\(+
              \(∂\^2 E\_n[t]\/∂t\^2\)\), 

            \(▽\& ⇀ \) X \((
                \(▽\& ⇀ \) X 
                  \( P\& ⇀ \)\_n[t])\) + 
              \(▽\& ⇀ \) X \((
                \(▽\& ⇀ \), 
                  E\_n[t])\)
\  + 
              \(P\& ⇀ \)\_n[t] X \((
                \(P\& ⇀ \)\_n[t] X 
                  \( P\& ⇀ \)\_n[t])\)
\  + 
              \((\(P\& ⇀ \)\_n[t] X 
                  \( P\& ⇀ \)\_n[t])\), 
            E\_n[t] - 
              \(▽\& ⇀ \), 
            \(\((\(▽\& ⇀ 
                      \)·\(P\& ⇀ \)\_n[t])\)
\  + 
              \), 
            \(P\& ⇀ \)\_n[t], 
            E\_n[t]\^2
\  - \(P\& ⇀ \)\_n[t], 
            \((\(P\& ⇀ \)\_n[t]
                    ·\(P\& ⇀ \)\_n[t])\) + 
              ∂\^2\( P\& ⇀ \)\_n[t]\/∂t\^2}
          \)

\(\(∑\+\(n = 0\)\%∞\((
              \((∂\/∂t, 
                    ▽\&⇀)\)\^2 + 
                \((∂\/∂t, 
                    \(-▽\&⇀\))\)\^2 + 
                \((E\_n, P\&⇀\_n)\)\^2 + 
                \((E\_n, \(-P\&⇀\_n\))\)\^2)\))\) 
        \((E\_n, P\&⇀\_n)\)/2		
\  = 
      ∑\+\(n = 0\)\%∞\((
          \(-▽\&⇀\)·\((
                  \(▽\&⇀\) X 
                     P\&⇀\_n)\) - 
              ▽\&⇀·▽\&⇀, 
            E\_n - P\&⇀\_n·\((
                  \(P\&⇀\_n\) X  P\&⇀\_n)\) - 

              				\((P\&⇀\_n·P\&⇀\_n)
                \), 
            E\_n + E\_n\(, \^3\)\(+
              \(∂\^2 E\_n\/∂t\^2\)\), 
				
            \(▽\&⇀\) X 
                \((\(▽\&⇀\) X 
                     P\&⇀\_n)\) + 
              \(▽\&⇀\) X 
                \((▽\&⇀, E\_n)
                  \) + \(P\&⇀\_n\) X 
                \((\(P\&⇀\_n\) X  P\&⇀\_n)\) + 

              				\((\(P\&⇀\_n\) X  P\&⇀\_n)
                \), 
            E\_n - ▽\&⇀, 
            \(\((▽\&⇀·P
                      \&⇀\_n)\) + \), 
            P\&⇀\_n, 
            E\_n\^2 - P\&⇀\_n, 
            \((P\&⇀\_n·P\&⇀\_n)\) + 
              ∂\^2 P\&⇀\_n\/∂t\^2)\)\)

Time reversal

\(Simplify[
      \((
	q[\(\(-t\^2\) + x\^2 + y\^2 + z\^2\)\/\(t\^2 + x\^2 + y\^2 + 
                  z\^2\), \(2\ t\ x\)\/\(t\^2 + x\^2 + y\^2 + z\^2\), 
	
              \(2\ t\ y\)\/\(t\^2 + x\^2 + y\^2 + z\^2\), 
              \(2\ t\ z\)\/\(t\^2 + x\^2 + y\^2 + z\^2\)].q[t, x, y, z])\).{
          1, 0, 0, 0}]\){-t, x, y, z}

(-(t^2) +  (Overscript[X, ⇀]).(Overscript[X, ⇀]), 
          2 t  (Overscript[X, ⇀])) 
        (t,  (Overscript[X, ⇀]))/
          ((t^2) +  (Overscript[X, ⇀]).(Overscript[X, ⇀])) = 
      (-t,  (Overscript[X, ⇀]))

Gravity

The gravitational field

Use the triangle inequality in energy-momentum space to find the shortest path for a mass (the inequality applies to the scalar).

\(Simplify[
	
        0\  <= \((
              q[E + \ E\^′, P\_x + \ P\_x\%′, 
                    P\_y + P\_y\%′, P\_z + P\_z\%′].

                  q[E + \ E\^′, P\_x + \ P\_x\%′, 
                    P\_y + P\_y\%′, P\_z + P\_z\%′]\ 
 - \ 
                q[E, P\_x, P\_y, P\_z].q[E, P\_x, P\_y, P\_z]\ 
 - 
                q[\ E\^′, P\_x\%′, P\_y\%′, 
                    P\_z\%′].q[\ E\^′, P\_x\%′, 
                    P\_y\%′, P\_z\%′])\).{1, 0, 0, 0}]\) 0≤{2 E  (E^′)-2 (Subscript[P, x]) (Subscript[P, x]^′)-2 (Subscript[P, y]) (Subscript[P, y]^′)-2 (Subscript[P, z]) (Subscript[P, z]^′),
2  (E^′) (Subscript[P, x])+2 E (Subscript[P, x]^′),2  (E^′) (Subscript[P, y])+2 E (Subscript[P, y]^′),2  (E^′) (Subscript[P, z])+2 E (Subscript[P, z]^′)}

0  ≤ 
          (((E +  (E^′), 
                (Overscript[P, ⇀]) +  ((Overscript[P, ⇀])^′)))^2)  - 
            (((E, (Overscript[P, ⇀])))^2) - 
            ((((E^′), ((Overscript[P, ⇀])^′)))^2)
=2(E (E^′)  - 
                (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))

The Maxwell gravitational wave equations

Substitute the above field into the quaternion differential operators that generate the Maxwell equations.

{8 π ρ, ((8  π (Overscript[j,  ⇀]) )/c)}== Simplify[
op[{q[dt,   (Overscript[▽,  ⇀]) ], 
                  q[dt,   (Overscript[▽,  ⇀]) ]},
{q[dt, -(Overscript[▽,  ⇀]) ], 
                  q[dt, -(Overscript[▽,  ⇀]) ]},
	q[(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t],( (E^′) P+E P')[t]]].{1, 0}/2]
=={-(Overscript[▽,  ⇀]) ·((Overscript[▽,  ⇀]) X( (E^′) P+E P')[t])-(Overscript[▽,  ⇀]) ·((Overscript[▽,  ⇀]) ,(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t])
 +(((∂^2)(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t])/(∂(t^2))),
	(Overscript[▽,  ⇀]) X((Overscript[▽,  ⇀]) X( (E^′) P+E P')[t])+(Overscript[▽,  ⇀]) X((Overscript[▽,  ⇀]) ,(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t])
 -(Overscript[▽,  ⇀]) ,((Overscript[▽,  ⇀]) ·( (E^′) P+E P')[t])+(((∂^2)( (E^′) P+E P')[t])/(∂(t^2)))}

{((∂/∂)t, (Overscript[▽, ⇀]))
              ,[((∂/∂)t, 
                  (Overscript[▽, ⇀])),(E (E^′)  - 
                      (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))]} 
+[((∂/∂)t, (Overscript[▽, ⇀]))
              ,vector{((∂/∂)t, 
                    (Overscript[▽, ⇀])),(E (E^′)  - 
                        (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),-E ((Overscript[P, ⇀]))'-(E^′) (Overscript[P, ⇀]))}]
=(-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]) X (E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀])) ,-(Overscript[▽, ⇀]) X (Overscript[▽, ⇀]) (E (E^′) -(Overscript[P, ⇀]).((Overscript[P, ⇀])^′)))
=(-(Overscript[▽, ⇀])·(Overscript[F
                , ⇀]), 
            (Overscript[▽, ⇀]) X (Overscript[G, ⇀]) + 
              ∂((Overscript[F, ⇀])/∂)t)=(0,  (Overscript[0, ⇀]))

		[((∂/∂)t, 
                    (Overscript[▽, ⇀])),[((∂/∂)t, 
                        (Overscript[▽, ⇀])),(E (E^′)  - 
                            (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))]]
	- {((∂/∂)t, 
                    (Overscript[▽, ⇀])),vector{((∂/∂)t, 
                          (Overscript[▽, ⇀])),(E (E^′)  - 
                              (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),-E ((Overscript[P, ⇀]))'-(E^′) (Overscript[P, ⇀]))}}
=(-(Overscript[▽, ⇀])·(Overscript[▽, ⇀]) E (E^′) -(Overscript[P, ⇀]).((Overscript[P, ⇀])^′)-(Overscript[▽, ⇀])·((∂E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))/(∂t)),
					(Overscript[▽, ⇀]) X  (Overscript[▽, ⇀]) X (E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))+(((∂^2) E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))/(∂(t^2)))+((∂(Overscript[▽, ⇀]) 
                          (E (E^′)  - 
                              (Overscript[P, ⇀]).((Overscript[P, ⇀])^′))
                            )/∂)t)
=( (Overscript[▽, ⇀])·(Overscript[G
                      , ⇀])  ,  
                  (Overscript[▽, ⇀]) X (Overscript[F, ⇀]) 
                     - ∂((Overscript[G, ⇀])/∂)t) = 
                8 π 
                  (mass density, (Overscript[(mass flow), ⇀]))

The Lorentz gravitational force

(q[(∂/∂)t, 
                      -(Overscript[▽,  ⇀]) ]}. q[(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t],
-( (E^′) P+E P')[t]]].q[γ, -γβ]
 - q[γ, -γβ].q[(∂/∂)t, 
              (Overscript[▽,  ⇀]) ].q[(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t],
( (E^′) P+E P')[t]]).{1, 0}{-γβ·((Overscript[▽,  ⇀]) ,(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t]+((∂( (E^′) P+E P')[t])/(∂t))),
-γ((Overscript[▽,  ⇀]) ,(E  (E^′)- (Subscript[P, x]) (Subscript[P, x]^′))[t]+((∂( (E^′) P+E P')[t])/(∂t)))
 + γβ X((Overscript[▽,  ⇀]) X( (E^′) P+E P')[t]),}

((∂/∂)t, 
              -(Overscript[▽, ⇀]))(E (E^′)  - 
                  (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),-E ((Overscript[P, ⇀]))'-(E^′) (Overscript[P, ⇀]))(γ, -γβ)
			- (γ, -γβ)((∂/∂)t, 
              (Overscript[▽, ⇀]))(E (E^′)  - 
                  (Overscript[P, ⇀]).((Overscript[P, ⇀])^′),E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))
=γ(-β·(Overscript[▽, ⇀]),(E (E^′)  - 
                    (Overscript[P, ⇀]).((Overscript[P, ⇀])^′))-β·((∂E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))/(∂t))),
			-((Overscript[▽, ⇀]),(E (E^′)  - 
                      (Overscript[P, ⇀]).((Overscript[P, ⇀])^′))+((∂E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀]))/(∂t)))+ β X((Overscript[▽, ⇀])X(E ((Overscript[P, ⇀]))'+(E^′) (Overscript[P, ⇀])),)
= γ 
          ( β.(Overscript[G, ⇀]), 
            (Overscript[G, ⇀])  + β × (Overscript[F, ⇀]))