chapter 01 : Relativity

Ex1.1 : Pg:20

In [47]:
#Relative Speed of approach
c = 1     # For the sake of simplicity, assume c = 1, m/s
u = 0.87*c     # Velocity of approach of spaceship A towards spaceship B, m/s
v = -0.63*c     # Velocity of approach of spaceship B towards spaceship A, m/s
V = (u - v)/(1 - (u*v)/c**2)     # Velocity Addition Rule giving relative speed of approach of particles, m/s
print "The relative speed of approach of particles = %6.4fc" %V
The relative speed of approach of particles = 0.9689c

Ex1.2 : Pg: 20

In [48]:
#Relative Speed of spaceships
c = 1     # For the sake of simplicity, assume c = 1, m/s
u = 0.9*c     # Velocity of approach of spaceship A towards spaceship B, m/s
v = -0.9*c     # Velocity of approach of spaceship B towards spaceship A, m/s
V = (u - v)/(1 - (u*v)/c**2)     # Velocity Addition Rule giving relative speed of approach of spaceships, m/s
print "The relative speed of B w.r.t. A = %5.3fc"% V
The relative speed of B w.r.t. A = 0.994c

Ex1.3 : Pg: 20

In [49]:
#Relativistic length contraction
L0 = 1.0     # Actual length of the metre stick, m
rel_mass = 3.0/2     # Relative mass of stick w.r.t. rest its mass
# As m = m0/sqrt(1 - (v/c)**2) and L =  L0*sqrt(1 - (v/c)**2)
# Thus L/m = (L0/m0)*(1 - (v/c)**2), solving for L
# L = (m0/m)*L0 i.e.
L = 1/rel_mass*L0     # Apparent length of the metre rod, m
print "The apparent length of the metre rod = %5.3f m" %L
# Result 
# The apparent length of the metre rod = 0.667 m
The apparent length of the metre rod = 0.667 m

Ex1.5 : Pg: 22

In [50]:
#Mass-Energy Equivalence
U = 7.5e+011     # Total electrical energy generated in a country, kWh
kWh = 1000*3600     # Conversion factor for kilowatt-hour into joule, J/kWh
c = 3e+08     # Speed of light, m/s
m = (U*kWh)/c**2     # Mass equivalent of energy, kg
print "The mass converted into energy = %2d kg" % m
# Result 
# The mass converted into energy = 30 kg 
The mass converted into energy = 30 kg

Ex1.6 : Pg:22

In [51]:
#Energy equivalent of mass
m = 1     # Mass of a substance, kg
c = 3e+08     # Speed of light, m/s
U = m*c**2     # Energy equivalent of mass, J
print "The energy equivalent of mass = %1.0e J"% U
The energy equivalent of mass = 9e+16 J

Ex1.7 : Pg: 22

In [52]:
from math import sqrt
#Relativistic variation of mass with speed
m0 = 1e-024     # Mass of a particle, kg
v = 1.8e+08     # Speed of the particle, m/s
c = 3e+08     # Speed of light, m/s
m = m0/sqrt(1-(v/c)**2)     # Mass of the moving particle, kg
print "The mass of moving particle = %4.2e kg"% m
The mass of moving particle = 1.25e-24 kg

Ex1.8 : Pg: 23

In [53]:
#Increase in mass of water
c = 3e+08     # Speed of light, m/s
T1 = 273     # Initial temperature of water, K
T2 = 373     # Final temperature of water, K
M = 1e+06     # Mass of water, kg
C = 1e+03     # Specific heat of water, cal/kg-K
J = 4.18     # Joule's mechanical equivalent of heat, cal/joule
U = M*C*(T2 - T1)*J     # Increase in energy of water, J
m = U/c**2     # Increase in mass of water, kg
print "The increase in mass of water = %4.2e kg"% m
The increase in mass of water = 4.64e-06 kg

Ex1.9 : Pg:23

In [54]:
from math import sqrt
#Ratio of rest mass and mass in motion
c = 1     # For convenience, speed of light is assumed to be unity, m/s
v = 0.5*c     # Velocity of moving particle, m/s
# As m0 = m*sqrt(1 - (v/c)**2), and m0/m = rel_mass, we have
rel_mass = sqrt(1 - (v/c)**2)     # Ratio of rest mass and the moving mass
print "The ratio of rest mass and the mass in motion = %6.4f kg"% rel_mass
# Result 
# The ratio of rest mass and the mass in motion = 0.8660 kg 
The ratio of rest mass and the mass in motion = 0.8660 kg

Ex1.10 : Pg:23

In [55]:
#Heat equivalent of mass
c = 3e+08     # Speed of light, m/s
J = 4.18     # Joule's equivalent of heat, joule per calorie
m = 4.18e-03     # Mass of the substance, kg
U = m*c**2     # Energy equivalent of mass, J
Q = U/J     # Heat equivalent of mass, calorie
print "The heat equivalent of mass = %1.0e cal"% Q
# Result 
# The heat equivalent of mass = 9e+013 cal
The heat equivalent of mass = 9e+13 cal

Ex1.11 : Pg: 23

In [56]:
from math import sqrt
#Variation of space and time
L = 0.5     # Shortened length of the rod, m
L0 = 1     # Actual length of the rod, m
t0 = 1     # Actual time on the spaceship, s
c = 3e+08     # Speed of light, m/s
v = sqrt(1 - (L/L0)**2)*c     # Speed of the spaceship, m/s
t = t0/sqrt(1 - (v/c)**2)        # Dilated time for stationary observer, s
print "The speed of light = %5.3e m/s"% v
print "The time dilation corresponding to 1 s on the spaceship = %d s"% round(t)
The speed of light = 2.598e+08 m/s
The time dilation corresponding to 1 s on the spaceship = 2 s

Ex1.12 : Pg: 24

In [57]:
#Mean lifetime of a moving meason
c = 1     # For convenience, speed of light is assumed to be unity
t0 = 2e-08     # Mean life time of pi-meson at rest, s
v = 0.8*c     # Velocity of moving pi-meason, m/s
t = t0/sqrt(1-(v/c)**2)     # Mean lifetime of moving pi-meason, s
print "The mean lifetime of moving meason = %4.2e s"% t
The mean lifetime of moving meason = 3.33e-08 s

Ex1.13 : Pg: 24

In [58]:
#Velocity of one atomic mass unit
c = 1.0     # For convenience, speed of light is assumed to be unity, m/s
m0 = 1.0     # For convenience, rest mass is assumed to be unity
# Here 2*m0*c**2 = m*c**2 - m0*c**2 = KE which gives
m = 3*m0     # Atomic mass in motion, kg
# As m = m0/sqrt(1 - (v/c)**2), solving for v
v = sqrt(1 - (m0/m)**2)*c     # Velocity of one atomic mass, m/s 
print "The velocity of one atomic mass = %5.3fc"% v
# Result 
# The velocity of one atomic mass = 0.943c 
The velocity of one atomic mass = 0.943c

Ex1.14 : Pg: 25

In [59]:
#Speed of an electron for an equivalent proton mass
c = 3e+08     # Speed of light, m/s
m0 = 1     # For convenience, rest mass of an electron is assumed to be unity
m = 2000*m0     # Rest mass of a proton, units
# As m = m0/sqrt(1 - (v/c)**2), solving for v
v = sqrt(1 - (m0/m)**2)*c     # Speed of the moving electron, m/s 
print "The speed of the moving electron = %4.2e m/s (approx.)"% v 
The speed of the moving electron = 3.00e+08 m/s (approx.)

Ex1.15 : Pg: 25

In [60]:
#Speed at total energy twice the rest mass energy
c = 1     # Speed of light is assumed to be unity, m/s
m0 = 1.0     # For convenience, rest mass of the particle is assumed to be unity, kg
m = 2*m0     # Mass of the moving particle when m*c**2 = 2*m0*c**2, kg
# As m = m0/sqrt(1 - (v/c)**2), solving for v
v = sqrt(1 - (m0/m)**2)*c     # Speed of the moving particle, m/s 
print "The speed of the moving  particle = %5.3fc"% v
The speed of the moving  particle = 0.866c

Ex1.16 : Pg:26

In [61]:
#Relative velocity and mass
c = 3e+08     # Speed of light, m/s
u = 2e+08     # Speed of first particle, m/s
v = -2e+08     # Speed of second particle, m/s
u_prime = (u - v)/(1 - u*v/c**2)     # Velocity addition rule giving relative velocity, m/s
m0 = 3e-025     # Rest mass of each particle, kg
m = m0/sqrt(1 - (u_prime/c)**2)     # Mass of one particle relative to the other, kg
print "The relative speed of one particle w.r.t the other = %5.3e m/s"% u_prime
print "The mass of one particle relative to the other = %3.1e kg"% m 
The relative speed of one particle w.r.t the other = 2.769e+08 m/s
The mass of one particle relative to the other = 7.8e-25 kg

Ex1.17 : Pg: 26

In [62]:
#Relativistic variation of density with velocity
c = 1     # Speed of light is assumed to be unity for convenience, m/s
v = 0.9*c     # Speed of moving frame, m/s
rho_0 = 19.3e+03     # Density of gold in rest frame, kg metre per cube
L0 = 1     # Actual length is assumed to be unity, m
m0 = 1     # Rest mass of gold is assumed to be unity, kg
V0 = m0/rho_0     # Volume of gold in rest frame, metre cube
L = L0*sqrt(1 - (v/c)**2)     # Relativistic Length Contraction Formula, m
y = 1     # Width of gold block is assumed to be unity, m
z = 1     # Height of gold block is assumed to be unity, m
V = L*y*z*V0     # Volume of gold as observed from moving frame, metre cube
m = m0/sqrt(1 - (v/c)**2)     # Mass of gold as observed from moving frame, kg
rho = m/V     # Density of gold as observed from moving frame, kg per metre cube
print "The density of gold as observed from moving frame = %5.1fe+003 kg per metre cube"% (rho/1e+03)
The density of gold as observed from moving frame = 101.6e+003 kg per metre cube

Ex1.18 : Pg: 27

In [63]:
#Electrons accelerated to relativistic speeds
U = 1.0e+09*1.6e-019     # Kinetic energy of the electrons, J
# As U = m*c**2, solving for m
m = U/c**2     # Mass of moving electrons, kg
m0 = 9.1e-031     # Rest mass of an electron, kg
mass_ratio = m/m0     # Ratio of a moving electron mass to its rest mass 
c = 3e+08     # Speed of light, m/s
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Velocity of moving electron, m/s
vel_ratio = v/c     # Ratio of electron velocity to the velocity of light
U0 = m0*c**2     # Rest mass energy of electron, J
ene_ratio = U/U0     # Ratio of electron energy to its rest mass energy
print "The ratio of a moving electron mass to its rest mass %4.2e" %(mass_ratio) 
print "The ratio of electron velocity to the velocity of light = 1 - %5.3e" %((1-vel_ratio**2)/2) 
print "The ratio of electron energy to its rest mass energy = %5.3e"%(ene_ratio) 
# Result 
# The ratio of a moving electron mass to its rest mass 1.95e+003
# The ratio of electron velocity to the velocity of light = 1 - 1.310e-007
# The ratio of electron energy to its rest mass energy = 1.954e+003 
 
The ratio of a moving electron mass to its rest mass 1.76e+20
The ratio of electron velocity to the velocity of light = 1 - 0.000e+00
The ratio of electron energy to its rest mass energy = 1.954e+03

Ex1.19 : Pg: 28

In [64]:
#Electron speed equivalent of twice its rest mass
m0 = 9.1e-031     # Rest mass of an electron, kg
m = 2*m0     # Mass of moving electron, kg
c = 3e+08     # Speed of light, m/s
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Velocity of moving electron, m/s
print "The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s"% v
The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s

Ex1.20 : Pg: 28

In [65]:
from math import sqrt
#Electron speed equivalent of twice its rest mass
m0 = 9.1e-031     # Rest mass of an electron, kg
m = 2*m0     # Mass of moving electron, kg
c = 3e+08     # Speed of light, m/s
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Velocity of moving electron, m/s
print "The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s"%v  
The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s

Ex1.21 : Pg:29

In [66]:
from math import sqrt
#Fractional speed of electron
m0 = 9.1e-031     # Rest mass of an electron, kg
c = 3e+08     # Speed of light, m/s
E = 0.5*1e+06*1.6e-019     # Kinetic energy of electron, J
# As E = (m - m0)*c**2, solving for m
m = E/c**2+m0     # Mass of moving electron, kg
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Velocity of moving electron, m/s
print "The speed of electron relative to speed of light = %5.3f"%(v/c) 
The speed of electron relative to speed of light = 0.863

Ex1.22 : Pg: 29

In [67]:
#Effective mass and speed of electron
c = 3e+08     # Speed of light, m/s
e = 1.6e-019     # Electron-volt equivalent of 1 joule, eV/joule
U = 2*1e+06*e     # Total energy of electron, J
# As E = (m - m0)*c**2, solving for m
m = U/c**2     # Effective mass of electron, kg
m0 = 0.511*1e+06*e/c**2     # Rest mass of the electron, kg
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Velocity of moving electron, m/s
print "The effective mass of electron = %4.1e kg"% m 
print "The relativistic speed of electron = %4.2fc m"% (v/c) 
The effective mass of electron = 3.6e-30 kg
The relativistic speed of electron = 0.97c m

Ex1.23 : Pg: 30

In [68]:
#Energy released in fission
c = 3.0e+08     # Speed of light, m/s
e = 1.6e-019     # Charge on an electron, coulomb
r0 = 1.2e-015     # Equilibrium nuclear radius, m
A = 238.0     # Twice the mass of each fragment
q1 = 46.0*e     # Charge on first fragment, coulomb
q2 = 46.0*e     # Charge on second fragment, coulomb
R = r0*(A/2)**(1.0/3) 
d = 2*R     # Distance between two fragments, m
U = q1*q2*9e+09/d     # Energy released in fission, J
print "The energy released in fission of U(92,238) = %3d MeV"%(U/(e*1e+06)) 
# Result 
# The energy released in fission of U(92,238) = 258 MeV  
The energy released in fission of U(92,238) = 258 MeV

Ex1.24 : Pg: 30

In [69]:
from math import sqrt
#Relativistic speed form relativistic mass
c = 3e+08     # Speed of light, m/s    
m0 = 1.0/2     # Rest mass of the particle, MeV/c**2
m = 1/sqrt(2)     # Relativistic mass of the particle, MeV/c**2
# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have
v = sqrt(1 - (m0/m)**2)*c     # Relativistic velocity of particle, m/s
print "The relativistic velocity of particle = %4.2e m/s"%(v) 
# Result 
# The relativistic velocity of particle = 2.12e+008 m/s 
The relativistic velocity of particle = 2.12e+08 m/s

Ex1.25 : Pg: 31

In [70]:
from math import sqrt
#Decay of muon
c = 3e+08     # Speed of light, m/s 
v = 0.992*c     # Relativistic speed of muon, m/s
S = 60*1e+03     # Distance travelled by muon before it decays, m
t_prime = S/v     # Time measured by observer on earth (Dilated Time), s
t = t_prime*sqrt(1 - (v/c)**2)     # Time measured by muon in its own frame, s  
s = v*t     # Distance covered by the muon in its own frame of reference, m   
print "The time measured by observer on earth (Dilated Time) = %5.3e s"% t_prime
print "The time measured by muon in its own frame = %4.2e s"% t 
print "The distance covered by the muon in its own frame of reference = %4.2f km"%(s/1e+03) 
# Result 
# The time measured by observer on earth (Dilated Time) = 2.016e-004 s
# The time measured by muon in its own frame = 2.55e-005 s
# The distance covered by the muon in its own frame of reference = 7.57 km 
The time measured by observer on earth (Dilated Time) = 2.016e-04 s
The time measured by muon in its own frame = 2.55e-05 s
The distance covered by the muon in its own frame of reference = 7.57 km

Ex1.26 : Pg: 31

In [71]:
from math import sqrt
#Decay of unstable particlec = 3e+08     # Speed of light, m/s 
v = 0.9*c     # Relativistic speed of unstable particle, m/s
t0 = 1e-06     # Time of decay of unstable particle in rest frame, s
t = t0/sqrt(1 - (v/c)**2)     #Time of decay of unstable particle in moving frame, s 
s = v*t     # Distance travelled by unstable particle before it decays in moving frame, m   
print "The distance travelled before the unstable particle decays = %4.2e m"% s
# Result 
# The distance travelled before the unstable particle decays = 6.19e+002 m 
The distance travelled before the unstable particle decays = 6.19e+02 m