# The General Theory of Relativity¶

## Example 15.1 Page 491¶

In [2]:
#initiation of variable
w=121.5;   #lambeda
G=6.67*10**-11; #Various given values and constants
M= 1.99*10**30;
R= 6.96*10**8;
c=3*10**8;

#calculation
k= G*M/(R*c**2);    #(delLambeda)/(lambeda)
delw=k*w;           #del(lambeda)

#result
print "The change in wavelength due to gravitational shift in pm is",round(delw*10**3,3);

#part3
k=5.5*10**-5;#due to thermal Doppler broadening effect
delw=k*w;

#result
print "The change in wavelength due to thermal Doppler broadening effect in pm is",round(delw*10**3,3);

 The change in wavelength due to gravitational shift in pm is 0.257
The change in wavelength due to thermal Doppler broadening effect in pm is 6.683


## Example 15.2 Page 501¶

In [3]:
#initiation of variable
mp=938.280;   #mass of various particles
me=0.511;
m2h=1875.628;

#calculation
mic2=2*mp;           #mass energy on L.H.S
mfc2=m2h+me;  #mass energy on R.H.S
Q=mic2-mfc2;    #Q value of reation
pc=Q;
mc2=1875.628;
K=(pc**2)/(2*mc2);     #kinetic threshold energy
Emax=Q-K;        #maximum energy

#result
print "The maximum neutrino energy in MeV is",round(Emax,3);

The maximum neutrino energy in MeV is 0.421