# Chapter 7:Relativity¶

## Example 7.5 , Page no:42¶

In [1]:
import math
from __future__ import division

#initialisation of variables
l=4; #height in ft
v=0.444; #v=(v/c)^2 (given)

#CALCULATIONS
l0=l/math.sqrt(1-v); #calculating using l=l0sqrt(1-(v/c)^2)

#RESULTS
print"Astronauts height at rest in ft =",round(l0,3);

Astronauts height at rest in ft = 5.364


## Example 7.6 , Page no:42¶

In [2]:
import math
from __future__ import division

#initialisation of variables
m=0.934; #v=(v/c)^2 (given)
v=2.9*10**8; #velocity in m/sec
t0=2.2*10**-6; #initial velocity in m/sec

#CALCULATIONS
t=t0/math.sqrt(1-m); #calculating t using t=t0/sqrt(1-(v/c)^2)

#RESULTS
print"Time in sec =",round(t,5);

Time in sec = 1e-05


## Example 7.7 , Page no:43¶

In [3]:
import math
from __future__ import division

#initialisation of variables
t0=3600; #time in sec
t=3601; #time in sec
c=3*10**8; #velocity in m/sec

#CALCULATIONS
v=c*math.sqrt((1-(t0/t)**2)); #calculating velocity

#RESULTS
print"Velocity in m/sec =",round(v);

Velocity in m/sec = 7069595.0


## Example 7.8 , Page no:43¶

In [4]:
import math
from __future__ import division

#initialisation of variables
m0=9.1*10**-31; #mass in kg
t=0.998; #t=(v/c)^2 (given)t

#CALCULATIONS
m=m0/(math.sqrt(1-(t))); #calculating mass in kg

#RESULTS
print"Mass in kg =",'%.3E'%m;

Mass in kg = 2.035E-29


## Example 7.9 , Page no:43¶

In [5]:
import math
from __future__ import division

#initialisation of variables
m=0.980; #m=(m0/m)^2 (given)
c=186000; #velocity in m/sec

#CALCULATIONS
v=c*(math.sqrt(1-m)); #calculating velocity

#RESULTS
print"Velocity in min/sec =",round(v,3);

Velocity in min/sec = 26304.372