##Chapter 2, Example 2.1, Page 29
import math
##Find the inscrease in mass of the Satellite
v = 7.5*10**3
c = 2.998*10**8
##Calculating the expression using the taylor series
FMI = (1/2.)*(v**2/c**2)
print'%s %.2e %s'%("The fractional mass increase = ",FMI,"");
##Answers may vary due to round off error
##Chapter 2, Example 2.2, Page 33
import math
##Find the energy equivalent in MeV of the electron rest mass
m1 = 9.109*10**-31 ## kg
m2 = 5.486*10**-4 ## atomic mass units
c1 = 2.998*10**8 ## m/s
c2 = 931.49 ## MeV/u
E1 = (m1*c1*c1)/(1.602*10**-13)
E2 = m2*c2
print'%s %.2f %s'%("E = ",E1," MeV");
print'%s %.2f %s'%("\n E measured in atomic mass unit and appropriate conversion factor= ",E2," MeV");
##Answers may vary due to round off error
##Chapter 2, Example 2.3, Page 37
import math
##maximum wavelength of light required to liberate photoelectrons
A = 2.35 ##eV
h = 4.136*10**-15 ## eV/s^-1
c = 2.998*10**8 ## m/s
v = A/h
w = c/v
print'%s %.2e %s'%("v-min = ",v," s^-1");
print'%s %.2f %s'%("\n Maximum wavelength = ",w*10**9," nm which corresponds to green");
##Answers may vary due to round off error
##Chapter 2, Example 2.4, Page 39
import math
##Recoil Kinetic Energy
m1 = 9.109*10**-31 ## kg
c1 = 2.998*10**8 ## m/s
E = 3. ##Mev
mc2 = (m1*c1*c1)/(1.602*10**-13) ## converting to MeV
E1 = 1./((1./E)+(1./mc2)*(1.-math.cos(math.pi/4.)))
print'%s %.2f %s'%("\n Recoil kinetic energy = ",E1," MeV");
##Answers may vary due to round off error