hp41programs

Speed of Light

The Speed of Light for the HP-41


Overview
 

-If the clocks are synchronized along the path of the light and if we use the proper time, the speed of light is constant.
-In this case, no program is needed to calculate it:  c = 299792458 m/s

-The following routine employs the coordinate-time t to measure the velocity of light  V = dL/dt
-We may have V < c or V > c  or V = c

-The propagation of light is characterized by null geodesics:

        ds2 = gab dxa dxb = 0       a , b  =  0 , 1 , 2 , 3    where    x0 = c.t  &  x1 , x2 , x3  are spatial coordinates

-This may be re-written

              ds2 = g00 dx0 dx0 + 2 g0i dx0 dxi + gij dxi dxj       i , j = 1 , 2 , 3
                    = [ sqrt(g00) dx0 + g0i dxi / sqrt(g00) ]2 -  ( g0i  g0j / g00 ) dxi dxj  + gij dxi dxj
                    =  g00 ( dx0 )2 [ 1 + ( g0i / g00) ( dxi / dx0 ) ]2  -  dL2

   where    dL2 =  hij dxi dxj    is the spatial metric  with  hij = - gij + ( g0i  g0j / g00 )

 [ The spatial tensor is usually denoted  gij  ( the geek letter gamma ), but I've prefered to use hij  in case your browser ignores greek symbols ]

-The coordinates of the velocity of light are  Vi = dxi / dt  and its modulus is  V = dL/dt = sqrt ( hij Vi Vj )

   whence  ds2 / dt2 = 0 =  g00 c2 [ 1 + ( g0i / g00) ( 1/c ) ( dxi / dt ) ]2  -  V2  =  g00 c2 [ 1 + ( g0i / g00) Vi / c ]2  -  V2
 

-The direction of propagation is defined by a 3-vector  ki = dxi / dL = ( dxi / dt ) ( dt / dL ) = Vi / V      (  hij ki kj = 1 )

  so,   V = c Sqrt(g00)  +  ( g0i / sqrt(g00) ) ki V

-Finally, it yields:            V/c  = sqrt (g00) / [ 1 - ki g0i / sqrt(g00) ]
 

Program Listing
 

-Don't worry about the condition  hij ki kj = 1  ,  lines 60 to 94  normalize the direction.
 

Data Registers:           •  R00 = function name                ( Registers R00 thru R07 are to be initialized before executing "SPOL" )

                                      •  R01 = x1                   •  R05 = k1           R08 = g00       R12 = g01       R15 = g12       R17 = g23
                                      •  R02 = x2                   •  R06 = k2           R09 = g11       R13 = g02       R16 = g13
                                      •  R03 = x3                   •  R07 = k3           R10 = g22       R14 = g03
                                      •  R04 = x0 = c.t                                        R11 = g33

                                                         R09 = h11       R13 = h02       R16 = h13
                                                         R10 = h22       R14 = h03
                                                         R11 = h33
Flags: /
Subroutine:   A program that takes  x1 ,  x2  ,  x3  ,  x0  in registers  R01-R02-R03-R04  and calculates
                       and stores the 10 components gab  into  R08 to R17  as shown above.
 
 

  01  LBL "SPOL"
  02  XEQ IND 00
  03  RCL 12        
  04  X^2
  05  RCL 08
  06  /
  07  RCL 09
  08  -
  09  STO 18
  10  RCL 13
  11  X^2
  12  RCL 08
  13  /
  14  RCL 10
  15  -
  16  STO 19
  17  RCL 14
  18  X^2
  19  RCL 08
  20  /
  21  RCL 11
  22  -
  23  STO 20
  24  RCL 12        
  25  RCL 13
  26  *
  27  RCL 08
  28  /
  29  RCL 15
  30  -
  31  STO 21
  32  RCL 12
  33  RCL 14
  34  *
  35  RCL 08
  36  /
  37  RCL 16
  38  -
  39  STO 22
  40  RCL 13
  41  RCL 14
  42  *
  43  RCL 08
  44  /
  45  RCL 17        
  46  -
  47  STO 23
  48  LBL 10
  49  RCL 05
  50  RCL 12
  51  *
  52  RCL 06
  53  RCL 13
  54  *
  55  +
  56  RCL 07
  57  RCL 14
  58  *
  59  +
  60  RCL 05
  61  RCL 06
  62  *
  63  RCL 21
  64  *
  65  RCL 05
  66  RCL 07        
  67  *
  68  RCL 22
  69  *
  70  +
  71  RCL 06
  72  RCL 07
  73  *
  74  RCL 23
  75  *
  76  +
  77  ST+ X
  78  RCL 05
  79  X^2
  80  RCL 18
  81  *
  82  +
  83  RCL 06
  84  X^2
  85  RCL 19        
  86  *
  87  +
  88  RCL 07
  89  X^2
  90  RCL 20
  91  *
  92  +
  93  SQRT
  94  /
  95  RCL 08
  96  STO Z
  97  SQRT
  98  X<>Y
  99  -
100  /
101  END
 

 
     ( 127 bytes / SIZE 024 )
 
 

      STACK        INPUT      OUTPUT
           X             /           v/c

   where  v  is the speed of light measured with the time coordinate

Example1:          ds2 = [ 1 - 1 / (4r) + r2 / 1000 ] c2 dt2 - ( dx2 + dy2 + dz2 ) / [ 1 - 1/(4r) + r2/1000 ] - ( 2 / r3 ) ( y.dx - x.dy ) c dt

   with  r = sqrt ( x2 + y2 + z2 )

  •   Evaluate the speed of light at a point  P(1,2,3,0)

          a)  in the direction defined by the vector k(4,5,6)
          b)  in the direction defined by the vector k(0,1,0)

-We have  g00 = 1 - 1/(4r) + r2/1000 = - 1 / g11 =  - 1 / g22 =  - 1 / g33   ,  g01 = - y / r3  ,  g02 = x / r3  , the other components of the metric tensor = 0
 
 

 01  LBL "GAB"
 02  8.017
 03  CLRGX
 04  SIGN
 05  RCL 01       
 06  X^2
 07  RCL 02
 08  X^2
 09  +
 10  RCL 03       
 11  X^2
 12  +
 13  STO Z
 14  SQRT
 15  4
 16  *
 17  1/X
 18  -
 19  X<>Y
 20   E3
 21  /
 22  +
 23  STO 08       
 24  1/X
 25  CHS
 26  STO 09
 27  STO 10
 28  STO 11
 29  RCL 01       
 30  R^
 31  1.5
 32  Y^X
 33  /
 34  STO 13
 35  RCL 02       
 36  LASTX
 37  /
 38  CHS
 39  STO 12
 40  END

 
-Lines 02-03 may ne replaced with  CLX   STO 14  STO 15  STO 16  STO 17
 

  "GAB"   STO 00

      1        STO 01
      2        STO 02
      3        STO 03
      0        STO 04

 a)  In the 1st direction

      4        STO 05
      5        STO 06
      6        STO 07

   XEQ "SPOL"  >>>>   V/c = 0.966923596

  b) In the 2nd direction

     0        STO 05
     1        STO 06
     0        STO 07

   XEQ "SPOL"  or  R/S  or  XEQ 10  ( faster )   >>>>  V/c = 0.992171327
 

  •   Evaluate the speed of light at a point  P(7,8,9,0)  in the direction defined by the vector k(2,3,4)

      7  STO 01      2  STO 05
      8  STO 02      3  STO 06
      9  STO 03      4  STO 07
      0  STO 04

  XEQ "SPOL"  >>>>   V/c = 1.084831634

Notes:

-The components of k may be multiplied by a positive constant without changing the results.

-Line 48  LBL 10  is only useful to get faster results at the same point. Otherwise, it may be deleted.

-The metric tensor of this example is not very realistic though it could represent approximately the gravitational field of a rotating sphere
  in a universe with a ( very ) large negative cosmological constant.
 

Example2:          ds2 = [ 1 -  r2 / 10000 ] c2 dt2 - ( dx2 + dy2 + dz2 )  - ( 0.02  ) ( x.dy - y.dx ) c dt

   with  r = sqrt ( x2 + y2 + z2 )

  •   Evaluate the speed of light at the point  P(1,0,0,0)  in the directions  k(0,1,0)  and k(0,-1,0)

-We have  g00 = 1 -  r2/10000  ,   g11 = g22 = g33 = -1  ,  g01 = 0.01 y  ,  g02 = -0.01 x  , the other components of the metric tensor = 0
 
 

 01  LBL "GAB2"
 02  1
 03  RCL 01        
 04  X^2
 05  RCL 02
 06  X^2
 07  +
 08  RCL 03        
 09  X^2
 10  +
 11   E4
 12  /
 13  -
 14  STO 08
 15  1
 16  CHS
 17  STO 09        
 18  STO 10
 19  STO 11
 20  RCL 02
 21   E2
 22  /
 23  STO 12
 24  RCL 01        
 25  LASTX
 26  /
 27  CHS
 28  STO 13
 29  CLX
 30  STO 14        
 31  STO 15
 32  STO 16
 33  STO 17
 34  END

 
 "GAB2"   STO 00

      1        STO 01     0   STO 05
      0        STO 02     1   STO 06
      0        STO 03     0   STO 07
      0        STO 04

  XEQ "SPOL"  >>>>   V/c = 0.990049504

     1  CHS  STO 06   R/S  or  XEQ 10  >>>>  V'/c = 1.010050504
 

Notes:

-This metric corresponds to a rotating frame of reference.
-The difference between V and V' explains the Sagnac effect ( interference )

-More generally, if the angular velocity = w , the metric may be written in cylindrical coordinates:

  ds2 = ( 1 - r2w2/c2 )  c2 dt2 - dr2 - r2 df2 - dz2 - 2 w r2 df dt

-And the spatial metric is

  dL2 = dr2 + dz2 + r2 df2 / ( 1 - r2w2/c2 )

-The ratio  circumference / radius = 2.p / ( 1 - r2w2/c2 ) 1/2 > 2.p

-As for the speed of light ( if its path is the circumference )   V/c = 1 ± r.w/c    ( if we neglect the terms of order 2 and higher )

-Note that we've just gotten a more accurate result in the example above with  r.w/c = 0.01
 

Remarks:

-"SPOL" is essentially useful if there is at least an index i  for which  g0i # 0
-Otherwise, the formula is much simpler:

     V/c = Sqrt(g00)

-In this case, V does not depend on the direction k and calculating the other  gab  is unuseful.
-For instance, with the Schwarzschild metric:

     ds2 = [ 1 - 2 GM / ( c2 r ) - L r2 / 3 ] c2 dt2 - ( dx2 + dy2 + dz2 ) / [ 1 - 2 GM / ( c2 r ) - L r2 / 3 ]    where   L  is the cosmological constant,

     G = gravitational constant = 6.673 E-11  m3/ kg / s2  and   M = mass of the central body ( for example, the Sun  M = 1.989 E30 kg )

-The speed of light is     V/c = [ 1 - 2 GM / ( c2 r ) - L r2 / 3 ] 1/2

-Neglecting the cosmological constant, the speed of light near the Sun ( at a distance = Sun's radius = 6.96 E8 m ) is

    V/c ~  0.999997878   whence   V ~  299791822 m / s
 

References:

[1]  Henri Arzelies - "Relativité Généralisée, Gravitation" - Gauthier-Villars ( in French )
[2]  Albert Einstein - "The Meaning of Relativity"
[3]  Landau & Lifshitz - "Classical Theory of Fields" - Pergamon Press