# Chapter 11: Theory of Relativity¶

## Example 11.5, Page 11.19¶

In :
from math import *
# Given
x = 100 # in meter
y = 10 # in meter
z = 5  # in meter
t = 1e-4 # in sec
# coordinates of point in frame F
v = 2.7e8 # velocity of frame F_ w.r.t. frame F in m/sed
c=3e8 # speed of light in m/sec

#Calculations
# according to Galilean transformation
x__ = x-v*t
y__=y
z__=z
t__=t
# according to Lorentz transformation
x_ = (x-v*t)/sqrt(1-(v/c)**2)
y_=y
z_=z
t_=(t-(v*x/c**2))/sqrt(1-(v/c)**2)

#Results
print "Coordinate of the event in reference frame F_ using \n(a)Galilean transformation-x=%.f m, y=%.f m, z = %.f m, t = %.e sec"%(x__,y__,z__,t__)
print "(b)Lorentz transformation-x=%.f m,y =%.f m, z = %.f m, t=%.e sec "%(x_,y_,z_,t_)

Coordinate of the event in reference frame F_ using
(a)Galilean transformation-x=-26900 m, y=10 m, z = 5 m, t = 1e-04 sec
(b)Lorentz transformation-x=-61713 m,y =10 m, z = 5 m, t=2e-04 sec


## Example 11.6, Page 11.19¶

In :
from math import *

# Given
r = 4 # ratio of mass of particle to the rest mass

#Calculations
v = 3e8 * sqrt(1 - (1 / r)**2)

#Result
print "Speed of particle is %.e meter/sec"%v

Speed of particle is 3e+08 meter/sec


## Example 11.7, Page 11.20¶

In :
from math import *

# Given
r = 1.2 # ratio of mass of particle to the rest mass

#Calculations
v = 3e8 * sqrt(1 - (1 / r)**2)

#Results
print "Speed of particle is %.3f c"%(v/3e8)

Speed of particle is 0.553 c


## Example 11.9, Page 11.20¶

In :

# Given
E = 2 # kinetic energy of electron in Mev

#Calculations
v = 3e8 * sqrt(1 - (1 / (1 + (1.6e-19 * 2e6) / (9.1e-31 * 3e8**2)))**2)
m = (9.1e-31) / sqrt(1 - (v / 3e8)**2)

#Results
print "Speed of electron is %.2f c\nMass of electron is %.2e kg"%(v/3e8,m)

Speed of electron is 0.98 c
Mass of electron is 4.47e-30 kg


## Example 11.11, Page 11.21¶

In :

# Given
r = 2.25 # ratio of mass of particle to the rest mass

#Calculations
v = 3e8 * sqrt(1 - (1 / r)**2)

#Result
print "Speed of particle is %.2e meter/sec"%v

Speed of particle is 2.69e+08 meter/sec


## Example 11.12, Page 11.22¶

In :
from math import *

# Given
r = 2. # ratio of kinetic energy of body to its rest mass

#Calculations
v = 3e8 * sqrt(1 - (1 / (r + 1))**2)

#Result
print "Velocity of particle is %.2f c"%(v/3e8)

Velocity of particle is 0.94 c


## Example 11.13, Page 11.22¶

In :
from math import *

# Given
r = 11. # ratio of mass of particle to the rest mass of electron

#Calculations
KE = (r - 1) * 9.1e-31 * 3e8**2 / (1.6e-19)
m = 3e8 * sqrt(1 - (1 / r)**2) * 9.1e-31 * 11

#Result
print "Kinetic energy of electron is %.1f MeV\nMomentum of particle is %.2e N-sec"%(KE/1e6,m)

Kinetic energy of electron is 5.1 MeV
Momentum of particle is 2.99e-21 N-sec


## Example 11.14, Page 11.23¶

In :
from math import *

# Given
m = 1.67e-27  # mass of electron in kg
m_ = 9.1e-31 # rest mass of electron in kg

#Calculations
v = 3e8 * sqrt(1 - (m_ / m)**2)

#Result
print "Velocity of electron is %.3e meter/sec"%v

Velocity of electron is 3.000e+08 meter/sec


## Example 11.15, Page 11.23¶

In :
from math import *

# Given
E = 0.1 # kinetic speed of electron in Mev

#Calculations
v_ = sqrt(2 * (E * 1.6e-13) / 9.1e-31)
v = 3e8 * sqrt(1 - (1 / (1 + (1.6e-13 * E) / (9.1e-31 * 3e8**2)))**2)

#Results
print "Speed according to classical mechanics is %.2e meter/sec\nSpeed according to relativistic mechanics is %.2e meter/sec"%(v_,v)

Speed according to classical mechanics is 1.88e+08 meter/sec
Speed according to relativistic mechanics is 1.64e+08 meter/sec


## Example 11.17, Page 11.24¶

In :
from math import *

# Given
r1 = 3. # ratio of kinetic energy of body to its rest mass in first case
r2 = 1. # ratio of kinetic energy of body to its rest mass in second case

#Calculations
v1 = 3e8 * sqrt(1 - (1 / (r1 + 1))**2)
v2 = 3e8 * sqrt(1 - (1 / (r2 + 1))**2)

#Results
print "Velocity of particle if kinetic energy is %d times of rest mass energy  is %.2e meter/sec\nVelocity of particle if kinetic energy is %.1e times of rest mass energy  is %e meter/sec"%(r1,v1,r2,v2)

Velocity of particle if kinetic energy is 3 times of rest mass energy  is 2.90e+08 meter/sec
Velocity of particle if kinetic energy is 1.0e+00 times of rest mass energy  is 2.598076e+08 meter/sec


## Example 11.19, Page 11.25¶

In :
from math import *

# Given
E = 1.5 # kinetic energy of electron in Mev

#Calculations
v = 3e8 * sqrt(1 - (1 / (1 + (1.6e-19 * 2e6) / (9.1e-31 * 3e8**2)))**2)
m = (E * 1.6e-13 / (3e8)**2) + 9.1e-31

#Results
print "Speed of electron is %.2e meter/sec\nMass of electron is %.1e kg"%(v,m)

Speed of electron is 2.94e+08 meter/sec
Mass of electron is 3.6e-30 kg


## Example 11.20, Page 11.26¶

In :

# Given
r = 3. / 2 # ratio of mass of metre stick to the rest mass of metre stick

#Calculations
l = 1 * (1. / r)

#Result
print "Length of meter stick is %.2f meter if mass is %.2f times of its rest mass"%(l,r)

Length of meter stick is 0.67 meter if mass is 1.50 times of its rest mass


## Example 11.21, Page 11.26¶

In :
from math import *
# Given
r = 1. / 2 # ratio of area of circular lamina in frame S_ to the ratio of area of circular lamina in frame S

#Calculations
v = 3e8 * sqrt(1 - r**2)

#Result
print "Velocity of frame S_ w.r.t. frame S is %.1e meter/sec"%v

Velocity of frame S_ w.r.t. frame S is 2.6e+08 meter/sec


## Example 11.22, Page 11.27¶

In :
from math import *
# Given
t = 1 # lose in time in an hour in minute

#Calculations
v = 3e8 * sqrt(1 - ((60. - t) / 60)**2)

#Result
print "Speed of clock is %.2e meter/sec"%v

Speed of clock is 5.45e+07 meter/sec


## Example 11.23, Page 11.27¶

In :
from math import *
# Given
t_ = 2.5e-8 # proper life of pi+ mesons in sec
v = 2.4e8 # velocity of beam of mesons in m/sec
r = 1. / exp(2) # ratio of final flux to initial flux of the meson beam

#Calculations
t = t_ / sqrt(1 - (v / 3e8)**2)
T = t * log(1. / r)
d = T * v

#Result
print "Distance travel by the beam is %.2f meter"%d

Distance travel by the beam is 20.00 meter


## Example 11.24, Page 11.27¶

In :

# Given
v = 1.8e8 # velocity of space ship away from the earth in m/sec
v1 = 2.1e8 # velocity of rocket w.r.t. space ship away from the earth in first case in m/sec
v2 = -2.1e8 # velocity of rocket w.r.t. space ship away from the earth in second case in m/sec

#Calculations
u1 = (v1 + v) / (1 + ((v1 * v) / (3e8)**2))
u2 = (v2 + v) / (1 + ((v2 * v) / (3e8)**2))

#Results
print "Velocity of rocket w.r.t. earth in first case = %.2f c away from the earth\nVelocity of rocket w.r.t. earth in second case = %.2f c away from the earth "%(u1/3e8,u2/3e8)

Velocity of rocket w.r.t. earth in first case = 0.92 c away from the earth
Velocity of rocket w.r.t. earth in second case = -0.17 c away from the earth


## Example 11.25, Page 11.28¶

In :
from math import *

# Given
l = 1 # length of the rod in meter
v = 1.8e8 # speed of rod along its length in meter/sec

#Calculations
L = l * sqrt(1- (v / 3e8)**2)

#Result
print "Length as it appear to the observer is %.1f meter"%L

Length as it appear to the observer is 0.8 meter


## Example 11.26, Page 11.28¶

In :
from math import *

# Given
l = 2 # length of the rod in meter
v = 2.7e8 # speed of rod along its length in meter/sec

#Calculations
L = l * sqrt(1- (v / 3e8)**2)

#Result
print "Length as it appear to the observer is %.3f meter"%L

Length as it appear to the observer is 0.872 meter


## Example 11.27, Page 11.28¶

In :
from math import *

# Given
l = 100. # consider the length of the rod in meter
v = 2.4e8 # speed of rod in meter/sec
theta = pi / 3 # direction of velocity of rod along its length in radian

#Calculations
Lx = l * cos(theta)
Ly = l * sin(theta)
L_x = Lx * sqrt(1 - (v / 3e8)**2)
L_y = Ly
L = sqrt(L_x**2 + L_y**2)
p_l = ((l - L) / l) * 100

#Result
print "Percentage length contraction is %.1f percent"%p_l

Percentage length contraction is 8.3 percent


## Example 11.28, Page 11.29¶

In :
from math import *
# Given
r = 0.5 # ratio of length of rod when it is in motion to the length of the rod when it is in rest

#Calculations
v = 3e8 * sqrt(1 - r**2)

#Result
print "Speed of the rod relative to observer is %.3f c"%(v/3e8)

Speed of the rod relative to observer is 0.866 c


## Example 11.29, Page 11.29¶

In :
from math import *

# Given
l = 5 # length of the rod in meter
v = 1.8e8 # speed of rod in meter/sec
theta = pi / 6 # direction of velocity of rod along its length in radian

#Calculations
Lx = l * cos(theta)
Ly = l * sin(theta)
L_x = Lx * sqrt(1 - (v / 3e8)**2)
L_y = Ly
L = sqrt(L_x**2 + L_y**2)
orientation = atan(L_y / L_x) * (180 / pi)

#Results
print "Length of the rod in moving frame is %.2f meter\nOrientation of the rod is %.2f degree"%(L,orientation)

Length of the rod in moving frame is 4.27 meter
Orientation of the rod is 35.82 degree


## Example 11.30, Page 11.30¶

In :
from math import *

# Given
T = 17.8e-9 # half-life of prticle at rest in sec
v = 2.4e8 # speed of particle in meter/sec

#Calculations
t = T / (sqrt(1 - (v / 3e8)**2))

#Result
print "New half-life of particle is %.2f nanosec"%(t/1e-9)

New half-life of particle is 29.67 nanosec


## Example 11.31, Page 11.30¶

In :
from math import *

# Given
T = 24 # no. of hours in a day
v = 1e8 # speed of spaceship in meter/sec

#Calculations
t = T * (sqrt(1 - (v / 3e8)**2))
T_ = T - t
m=(T_-1)*60
s=(m-22)*60

#Result
print "Time lost per day is %d hours %d minute %d sec"%(T_,m,s)

Time lost per day is 1 hours 22 minute 21 sec


## Example 11.32, Page 11.30¶

In :
from math import *

# Given
T = 4. # no. of year when rocket is moving corresponding to one year

#Calculations
v = 3e8 * sqrt(1 - (1 / T)**2)

#Result
print "Speed of rocket is %.2f c"%(v/3e8)

Speed of rocket is 0.97 c


## Example 11.33, Page 11.31¶

In :
from math import *

# Given
d = 4 # distance of star from the earth in light years
v = 3e8 * sqrt(0.9999) # speed of rocket in meter/sec

#Calculations
t = (2 * d * 3e8) / v
T_ = t * sqrt(1 - (v / 3e8)**2)

#Result
print "Time taken by the rocket is %.2f year"%T_

Time taken by the rocket is 0.08 year


## Example 11.34, Page 11.31¶

In :
from math import *

# Given
t = 2e-7 # life time of particle when it is moving in sec
v = 2.8e8 # speed of particle in meter/sec

#Calculations
T_ = t * sqrt(1 - (v / 3e8)**2)

#Result
print "Proper life time of particle is %.2e sec"%T_

Proper life time of particle is 7.18e-08 sec


## Example 11.35, Page 11.31¶

In :

# Given
v1 = 2.7e8 # velocity of first electron beam in meter/sec
v2 = -2.7e8 # velocity of second electron beam in meter/sec

#Calculations
u = v1 - v2
u_ = (v1 - v2) / (1 - (v1 * v2) / (3e8)**2)

#Results
print "Velocity of electrons beam w.r.t. another electron beam according to Newtonian mechanics is %.1f c\nVelocity of electrons beam measured by the observer moving with other electron beam = %.2f c"%(u/3e8,u_/3e8)

Velocity of electrons beam w.r.t. another electron beam according to Newtonian mechanics is 1.8 c
Velocity of electrons beam measured by the observer moving with other electron beam = 0.99 c


## Example 11.37, Page 11.32¶

In :

# Given
E = 900 # total relativistic energy of proton in Mev
m = 1.63-27 # rest mass of proton in kg
c = 3e8 # velocity of photon in meter/sec

#Calculations
m_ = (E * 1.6e-13) / (c)**2

#Results
print "Relativistic mass of proton is %.2e kg\nHere relativistic mass is same as rest mass\n hence proton is at rest and speed and kinetic energy of proton will be zero"%(m_)

Relativistic mass of proton is 1.60e-27 kg
Here relativistic mass is same as rest mass
hence proton is at rest and speed and kinetic energy of proton will be zero


## Example 11.38, Page 11.32¶

In :

# Given
E = 5.4e6 # energy liberates during dynamite explosion in J/kg
c = 3e8 # velocity of photon in meter/sec

#Calculations
E_ = 1 * c**2 # energy liberated by 1 kg content in J
f = E / E_

#Result
print "Fraction of total energy content in it is %.1e per kg"%f

Fraction of total energy content in it is 6.0e-11 per kg


## Example 11.39, Page 11.32¶

In :
from math import *
# Given
k = 1.02 # kinetic energy of electron in Mev
E_ = 0.51 # rest mass energy of electron in Mev
c = 3e8 # velocity of photon in meter/sec

#Calculations
E = k + E_
v = c * sqrt(1 - (E_ / E)**2)

#Result
print "Speed of the electron is %.2e meter/sec"%v

Speed of the electron is 2.83e+08 meter/sec


## Example 11.40, Page 11.33¶

In :
from math import *

# Given
E = 1400 # solar energy receives by the earth in W/square meter
d = 1.5e11 # distance between earth and the sun in meter
c = 3e8 # velocity of photon in meter/sec

#Calculations
E_ = 4 * pi * d**2 * E
m = E_ / c**2

#Result
print "Rate of decrement of mass of the sun is %.2e kg/sec"%m

Rate of decrement of mass of the sun is 4.40e+09 kg/sec