6: Special Theory of Relativity

Example number 3, Page number 235

In [1]:
#importing modules
import math
from __future__ import division

#Variable declaration
l=5;         #length(m)
v=3*10**4;      #velocity(m/sec)
c=3*10**8;      #velocity of light(m/sec)
lamda=5000*10**-10;     #wavelength(m)

#Calculation
S=2*l*v**2/(c**2*lamda);     #fringe shift

#Result
print "fringe shift is",S
fringe shift is 0.2

Example number 4, Page number 235

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration
x=1000;       #x-coordinate(m)
c=3*10**8;    #velocity of light(m/sec)
t=2*10**-6;   #time(s)
v1=0.6*c;
y1=y=100;     #y-coordinate(m)
z1=z=100;     #z-coordinate(m)

#Calculation
x1=(x-(v1*t))/math.sqrt(1-((v1/c)**2));    #coordinate along x-axis
t1=(t-(x*v1/c**2))/math.sqrt(1-((v1/c)**2));    #time

#Result
print "coordinates w.r.t moving observer are (x1,y1,z1,t1)=(",int(x1),int(y1),int(z1),int(t1),")"
coordinates w.r.t moving observer are (x1,y1,z1,t1)=( 800 100 100 0 )

Example number 5, Page number 236

In [18]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_t=2.3;      #time(micro s)
c=1;              #assume
v=0.8*c;          #velocity

#Calculation
delta_t1=delta_t/math.sqrt(1-(v**2/c**2));     #decay time(micro s)

#Result
print "decay time is",round(delta_t1,2),"micro s"
decay time is 3.83 micro s

Example number 6, Page number 236

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_t=24;      #time(hours)
delta_t1=28;     #decay time(hours)

#Calculation
v=math.sqrt(1-(delta_t/delta_t1)**2);      #space shuttle velocity(c)

#Result
print "space shuttle velocity is",round(v,3),"c"
space shuttle velocity is 0.515 c

Example number 7, Page number 236

In [28]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_t=2.5*10**-6;      #time(s)
c=3*10**8;              #velocity of light
v=c/2;          #velocity

#Calculation
delta_t1=delta_t/math.sqrt(1-(v**2/c**2));     #decay time(s)
x=v*delta_t;                                   #observed displacement(m)
x1=v*delta_t1;                                 #relative displacement(m)

#Result
print "observed displacement is",x,"m"
print "relative displacement is",round(x1,2),"m"
observed displacement is 375.0 m
relative displacement is 433.01 m

Example number 8, Page number 237

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration
R=6400;     #radius(km)
c=3*10**8;     #velocity of light(m/sec)
v=30*10**3;    #orbital velocity(m/sec)

#Calculation
d=2*R;      #diameter(km)
d1=d*math.sqrt(1-(v**2/c**2));        
delta_d=d-d1;                         #relative decay in earth diameter(m)

#Result
print "relative decay in earth diameter is",round(delta_d*10**5,1),"*10**-5 m"
print "answer given in the book is wrong"
relative decay in earth diameter is 6.4 *10**-5 m
answer given in the book is wrong

Example number 9, Page number 237

In [41]:
#importing modules
import math
from __future__ import division

#Variable declaration
L=1;       #length(m)
L1=0.96;   #recorded length(m)

#Calculation
v=math.sqrt(1-(L1/L)**2);      #velocity(c)

#Result
print "velocity is",v,"c"
velocity is 0.28 c

Example number 10, Page number 237

In [44]:
#importing modules
import math
from __future__ import division

#Variable declaration
R=0.1;     #radius(m)
c=1;       #assume
v=0.6*c;   #velocity

#Calculation
A=math.pi*R**2;      #area(sq m)
R1=R*math.sqrt(1-(v**2/c**2));    
A1=math.pi*R*R1;     #plate area in ellipse shape(sq m)  
deltaA=A-A1;         #change in area(sq m)

#Result
print "change in area is",round(deltaA,4),"sq m"
change in area is 0.0063 sq m

Example number 11, Page number 238

In [48]:
#importing modules
import math
from __future__ import division

#Variable declaration
c=1;           #assume
v=0.8*c;       #velocity
theta=30*math.pi/180;     #angle(rad)
L=1;           #length(m)

#Calculation
Ix=L*math.cos(theta)*math.sqrt(1-(v**2/c**2));
Iy=L*math.sin(theta);
L1=math.sqrt((Ix**2)+(Iy**2));       #changed length(m)
delta_L=L-L1;                        #change in length(m)

#Result
print "change in length is",round(delta_L*100),"cm"
change in length is 28.0 cm

Example number 12, Page number 238

In [52]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_t=10;      #time(days)
c=1;             #assume
v=0.99*c;        #velocity
d=280;           #number of days  

#Calculation
delta_t1=delta_t/math.sqrt(1-(v**2/c**2));     #decay time(days)
x=d/int(delta_t1);                             #number of folds
n=1*2**x;                                      #number of bacteria grown 

#Result
print "number of bacteria grown is",int(n)
number of bacteria grown is 16

Example number 13, Page number 239

In [54]:
#importing modules
import math
from __future__ import division

#Variable declaration
c=1;          #assume
u1=c/3;       #velocity
v=c/4;        #velocity

#Calculation
u=(u1+v)/(1+(u1*v/c**2));     #relative velocity of B w.r.t A(c)

#Result
print "relative velocity of B w.r.t A is",round(u,3),"c"
relative velocity of B w.r.t A is 0.538 c

Example number 14, Page number 239

In [56]:
#importing modules
import math
from __future__ import division

#Variable declaration
c=1;          #assume
u1=0.8*c;       #velocity
v=0.5*c;        #velocity

#Calculation
u=(u1+v)/(1+(u1*v/c**2));     #relative velocity(c)

#Result
print "relative velocity is",round(u,4),"c"
relative velocity is 0.9286 c

Example number 16, Page number 239

In [57]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=1;        #assume
m=2*m0;

#Calculation
v=math.sqrt(1-(m0/m)**2);      #velocity(c)

#Result
print "velocity is",round(v,3),"c"
velocity is 0.866 c

Example number 17, Page number 240

In [60]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=1;        #assume
m=3*m0;

#Calculation
v=math.sqrt(1-(m0/m)**2);      #velocity(c)

#Result
print "velocity is",round(v,4),"c"
velocity is 0.9428 c

Example number 19, Page number 240

In [64]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=10;        #mass(kg)
c=3*10**8;    #velocity of light(m/s)

#Calculation
E=m0*c**2;    #rest energy(J)

#Result
print "rest energy is",int(E/10**17),"*10**17 J"
print "answer given in the book is wrong"
rest energy is 9 *10**17 J
answer given in the book is wrong

Example number 20, Page number 240

In [68]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=9*10**-31;          #mass of electron(g)
c=3*10**8;             #velocity of light(m/sec) 
v=0.6*c;              #velocity of electron(m/sec)
e=1.6*10**-19;         #conversion factor

#Calculation
KE=m0*c**2*((1/math.sqrt(1-(v**2/c**2)))-1);         #kinetic energy(J)
KE=KE/e;               #kinetic energy(eV)       

#Result
print "kinetic energy is",round(KE/10**6,4),"MeV"
kinetic energy is 0.1266 MeV

Example number 21, Page number 241

In [74]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=50;         #mass(gm)
L=80*4.2;     #latent heat(cal/gm)
c=3*10**8;    #velocity of light(m/sec)

#Calculation
Q=m*L;             #heat loss(J)
delta_m=Q/c**2;    #loss in mass(kg)

#Result
print "loss in mass is",round(delta_m*10**13,4),"*10**-13 kg"
loss in mass is 1.8667 *10**-13 kg

Example number 22, Page number 241

In [76]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=9.1*10**-31;          #mass of photon(g)
c=3*10**8;               #velocity of light(m/sec) 
h=6.62*10**-34;          #planck's constant(Jsec)

#Calculation
new=m0*c**2/h;           #frequency of photon(Hz)

#Result
print "frequency of photon is",round(new/10**20,3),"*10**20 Hz"
frequency of photon is 1.237 *10**20 Hz

Example number 23, Page number 241

In [80]:
#importing modules
import math
from __future__ import division

#Variable declaration
m0=9*10**-31;          #mass of photon(g)
c=3*10**8;             #velocity of light(m/sec) 
e=1.6*10**-19;         #conversion factor
E=1.8;                 #energy(MeV)

#Calculation
E0=m0*c**2/(e*10**6);  #kinetic energy of electron(MeV) 
k=(E/2)-E0;            #kinetic energy of positron(MeV) 

#Result
print "kinetic energy of electron is",round(E0,3),"MeV"
print "kinetic energy of positron is",round(k,3),"MeV"
print "answer for kinetic energy of positron given in the book is wrong"
kinetic energy of electron is 0.506 MeV
kinetic energy of positron is 0.394 MeV
answer for kinetic energy of positron given in the book is wrong

Example number 24, Page number 242

In [83]:
#importing modules
import math
from __future__ import division

#Variable declaration
Z=7;       #atomic number of nitrogen
N=7;       
mp=1.0086;   #mass of proton(amu)
mn=1.0078;   #mass of nucleus(amu)
amu=931.5;   #energy(MeV)
A=14;    #atomic mass 

#Calculation
EB=((Z*mp)+(N*mn)-A)*amu;     #binding energy(MeV)

#Result
print "binding energy is",round(EB,1),"MeV"
binding energy is 106.9 MeV