import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.8* c # velocity of rod
l1 = 1 # let
theta1 = 60 # anlge between length of rod and speed in degree
l_x = l1 * math.cos(theta1 * pi /180) * math.sqrt (1-(v /c)**2)
l_y = l1 * math.sin(theta1 * pi /180)
l2 = math.sqrt (l_x**2 + l_y**2)
per_contrtaction = (l1 - l2) / l1 *100
angle = math.atan (l_y/l_x)
print "Percentage contraction in rod is ",round(per_contrtaction,4)," and apparant orientation is ",round(math.tan(angle),4),""
import math
#Given that
c = 3e8 # speed of light in m/s
u_x_ = -3e8 # velocity of first photon in ground frame in m/s
v = -3e8 # velocity of second photon in ground frame in m/s
print "Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) "
u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon with respect to another
print "Velocity of photon with respect to another is ",(u_x / c)," * c Thus photons are approaching each other."
import math
#Given that
c = 3e8 # speed of light in m/s
u_x_ = -0.9 * c # velocity of first spaceship in ground frame in m/s
v = -0.9 *c # velocity of second spaceship in ground frame in m/s
print "Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) "
u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon
print "Velocity of photon with respect to another is ",round(u_x / c,4)," c."
import math
#Given that
E = 7.5e11 # Energy in kWh
c = 3e8 # speed of light in m/s
print " Standard formula used E = m*c**2"
m = (E *3.6e6) / c**2 # calculation of Amount of mass consumed
print " Amount of mass consumed is ",m," kg."
import math
#Given that
m = 4 # mass of substance consumed fully in kg
c = 3e8 # speed of light in m/s
print " Standard formula used E = m*c**2"
E = m * c**2 # calculation of Amount of energy produced
print " Amount of energy produced is ",E," J."
import math
#Given that
m_0 = 1e-24 # mass of moving particle in kg
v = 1.8e8 # speed of particle in m/s
c = 3e8 # speed of light in m/s
print " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)"
m = m_0 / math.sqrt(1 - (v / c)**2) # calculation of Relativistic mass of particle
print " Relativistic mass of particle is ",m," kg."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.5 * c # speed of particle in m/s
print " Standard formula used m = m_o/math.sqrt ( 1- (v/c)**2)"
ratio = math.sqrt(1- (v /c)**2) # calculation of Ratio of rest mass and relativistic mass of particle
print " Ratio of rest mass and relativistic mass of particle is ",round(ratio,4),"."
import math
#Given that
ratio = 0.5 # Ratio of lengths of spaceship
c = 3e8 # speed of light in m/s
print "Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)"
v = c * math.sqrt(1 - ratio**2) # calculation of Speed of spaceship
print " Speed of spaceship is ",v," m/s."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 2.598e8 # speed of spaceship
t_0 = 1 # time in second
print " Standard formula used t= t_o/ math.sqrt ( 1- (v/c)**2)"
t = t_0 / math.sqrt(1 - (v **2 / c **2) ) # calculation of Time corresponding to 1 sec
print " Time corresponding to 1 sec is ",math.ceil (t)," sec."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 2.4e8 # speed of meson
t_0 = 2e-8 # lifetime of meson in second
print " Standard formula used "
t = t_0 / math.sqrt(1 - (v / c )**2 ) # calculation of Lifetime of meson
print " Lifetime of meson is ",t," sec."
import math
#Given that
c = 3e8 # speed of light in m/s
m_0 = 1 # atomic mass in amu
m = 3 * m_0 # relativistic mass
print " Standard formula used l = l_o * math.sqrt ( 1- (v/c)**2)"
v = c * math.sqrt(1- (m_0 / m)**2) # calculation of Velocity of particle
print " Velocity of particle is ",v / c," c."
import math
#Given that
mass_ratio = 0.5 # Ratio of rest mass and relativistic mass
c = 3e8 # speed of light in m/s
print " Standard formula used m = m_o / math.sqrt ( 1- (v/c)**2) "
v = c * math.sqrt(1- mass_ratio**2) # calculation of Velocity of particle
print " Velocity of particle is ",v / c," c."
import math
#Given that
c = 3e8 # speed of light in m/s
u_x_ = -2e8 # velocity of first photon in ground frame in m/s
v = -2e8 # velocity of second photon in ground frame in m/s
m_0 = 3e-25
print " Standard formula used u_x = (u_x_ + v) / (1 + v * u_x_ / c**2)"
u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon with respect to another
m = m_0 / math.sqrt(1 - (u_x / c)**2) # calculation of Relativistic mass of particle with respect to another
print " Velocity of photon with respect to another is ",u_x," m/s."
print " Relativistic mass of particle with respect to another is ",m," kg."
import math
#Given that
c = 3e8 # speed of light in m/s
ratio = 1.95e+03 # Ratio of relativistic mass and rest mass
print " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)"
ratio_1 = 1 /(2* ratio**2) # calculation of ratio of velocity to velocity of light for
print " Ratio of velocity to velocity of light for particle is 1 - ",ratio_1," ."
import math
#Given that
c = 3e8 # speed of light in m/s
u = 0.9*c # velocity of first particle with respect to other in m/s
density1 = 19.3e-3 # density of gold in rest frame
print " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2) and l = l_o* math.sqrt ( 1- (v/c)**2) "
mass_ratio = math.sqrt (1 - (u/c)**2) # calculation of ratio of relativistic mass
volume_ratio = 1 / math.sqrt (1 - (u/ c)**2) # calculation of ratio of relativistic volume
density2 = density1 * (volume_ratio /mass_ratio ) #calculation of ratio of relativistic density
print " Relativistic density of rod in moving frame is ",density2,"."
import math
#Given that
E = 1e9 # energy of electron in eV
c = 3e8 # speed of light in m/s
m_0 = 9.1e-31 # mass of electron in kg
print " Standard formula used E = m*c**2"
m = E / c**2 * 1.6e-19 # calculation of relativistic mass of particle
ratio = m / m_0 # calculation of Ratio of relativistic mass and rest mass of particle
print " Ratio of relativistic mass and rest mass of particle is ",ratio,"."
import math
#Given that
c = 3e8 # speed of light in m/s
ratio = 1.95e+03 # Ratio of relativistic mass and rest mass
print " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)"
ratio_1 = 1 /(2* ratio**2) # calculation of ratio of velocity to velocity of light for
print " Ratio of velocity to velocity of light for particle is 1 - ",ratio_1," ."
import math
#Given that
m = 9e-31 # mass in kg
E = 1e9 # Energy of accelerated electron in eV
c = 3e8 # speed of light in m/s
print " Standard formula used E = m*c**2"
E_0 = m * c**2 # calculation of rest mass energy
ratio = E / E_0 *1.6e-19 # calculation of Ratio of energy to rest mass energy
print " Ratio of energy to rest mass energy is ",ratio,"."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.6 * c # velocity of rod wrt laboratory
l_ = 1 # length of rod measured by observer in lab
print " Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)"
l = l_ / math.sqrt (1 - (v / c)**2) # calculation of Proper length of rod
print " Proper length of rod is ",l," m."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.9 * c # velocity of rod wrt laboratory
proper_time = 2.5e-8 # proper mean life time of mesons
print " Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)"
t = proper_time / math.sqrt (1 - (v / c)**2) # calculation of New mean life time
print " New mean life time is ",t," s."
import math
#Given that
E = 1 # energy of electron in MeV
c = 3e8 # speed of light in m/s
m_0 = 9e-31 # rest mass of electron
print " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) and E=m*c**2"
m = E * 1.6e-13 / c**2 # calculation of mass of electron
v = c * math.sqrt(1 - (m_0 / m)**2) # calculation of Velocity of electron
print " Velocity of electron is ",v," m/s."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.99 * c # velocity of particle
proper_time = 2.2e-6 # proper mean life time of mesons
print " Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)"
t = proper_time / math.sqrt (1 - (v / c)**2) # calculation of time period
d = v *t # calculation of Distance travelled by particle
print " Distance traveled by particle is ",d," m."
import math
#Given that
c = 3e8 # speed of light in m/s
m = 1 # let
m_change = 1 # change in mass in percentage by increamath.sing velocity
print " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) "
v = c * math.sqrt (1 - (m / (m + m_change/100))**2) # calculation of Velocity required to increase mass by one percent
print " Velocity required to increase mass by one perfect is ",v," m/s."
import math
#Given that
c = 3e8 # speed of light in m/s
m_ratio = 2000 # ratio of rest mass and relativistic mass
print " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) "
v = c * math.sqrt (1 - (1/m_ratio)**2) # calculation of Velocity required to increase mass by 2000 times
print " Velocity required to increase mass by 2000 times is ",c," - ",(c -v)," m/s."
import math
#Given that
h = 6.63e-34 # plank's constant
c = 3e8 # speed of light in m/s
lambda1 = 5e-4 # wavelength of photon in angstrom
e_rest_mass = 0.511 # rest mass of electron in Mev/c**2
p_rest_mass = 0.511 # rest mass of electron in Mev/c**2
print " Standard formula used E_total = E_rest + E_kinetic"
k = (((h * c / (lambda1 * 1.6e-23 )) - (e_rest_mass + p_rest_mass))) /2 # calculation of Energy of each particle
print " Energy of each particle is ",k," MeV."
import math
#Given that
h = 6.63e-34 # plank's constant
c = 3e8 # speed of light in m/s
p_rest_mass = 938 # rest mass of proton in Mev/
ap_rest_mass = 938 # rest mass of antiproton in Mev
print " Standard formula used E = h* c / lambda1"
lambda1 = h * c / ((p_rest_mass + ap_rest_mass) * 1.6e-19) # calculation of Threshold wavelength for proton - antiproton production
print " Threshold wavelength for proton - antiproton production is ",round((lambda1 / 1e-10),4)," angstrom."
import math
#Given that
c = 3e8 # speed of light in m/s
p_rest_mass = 0.938 # rest mass energy of proton in BeV
KE = 1 # kinetic energy of proton in BeV
print " Standard formula used E**2 = p**2*c**2 + m_o**2*c**4*"
E = KE + p_rest_mass # calculation of energy of particle
p = (math.sqrt (E**2 *1e6 - (p_rest_mass * 1e3)**2)) *(1.6e-19)*(1e9) / c # calculation of Momentum of photon
print " Momentum of photon is ",p," kg m/s."
import math
#Given that
c = 3e8 # speed of light in m/s
t = 8e-6 # mean life of meson
l = 10 # distance of meson from earth surface
print " Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)"
v = l*1e3/ math.sqrt( t**2 +(l * 1e3 /c)**2) # calculation of relative speed of meson with respect to
print " Relative speed of meson with respect to earth is ",round(v/c,4)," c ."
import math
#Given that
c = 3e8 # speed of light in m/s
v = 0.8 *c # velocity of rod in m/s
m_0 = 1.673e-27 # rest mass of proton in kg
print " Standard formula used E_total = KE + E_mass"
K_E = m_0 * c**2 *(1/math.sqrt(1-(v/c)**2) - 1) / 1.6e-13 # calculation of Kinetic energy of proton
print " Kinetic energy of proton is ",K_E,"MeV."