import math
h=6.62*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
q=1.6*10**-19 #charge of electron in coulombs
#V energy of electron in eV
lamda=round(((h/math.sqrt(2*m*q))*10**10),2)
print"de-Broglie wavelength for an electron of energy V ev is= %s/sqrt(V) Angstrom"%lamda
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
q=1.6*10**-19 #charge of electron in coulombs
V=50. #potential difference in volts(given)
lamda=int(((h/math.sqrt(2*m*q))*10**10)*1e2)*1e-2/sqrt(V) #lamda=h/sqrt(2mE)=h/sqrt(2mqV)
print"de-Broglie wavelength = ", round(lamda,4),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
q=1.6*10**-19 #charge of electron in coulombs
V=100. #potential difference in volts(given)
E=q*V
lamda=round(((h/math.sqrt(2*m*q))*10**10),2)/math.sqrt(V) #lamda=h/sqrt(2mE)=h/sqrt(2mqV)
print"de-Broglie wavelength =",round(lamda,3),"Angstrom"
import math
h=6.6*10**-34 #planck constant in joule-sec
m=9.0*10**-31 #mass of electron in kg
KE=(15*10**3)*(1.6*10**-19) #Kinetic Energy of electron in joule
v=math.sqrt((2*KE)/m) #KE=1/2(mv**2) joule
p=m*v #momentum of electron in Kg-m/sec
lamda=h/p #de-broglie wavelength
print"de-Broglie wavelength is=",round(lamda*10**10,1),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=1.67*10**-27 #mass of neutron in Kg
lamda=10**-10 #de-broglie wavelength in meter(given)
v=h/(m*lamda) #since lamda=h/mv
KE=(1./2)*m*v**2 #in joule
KE=KE/(1.6*10**-19) #in eV
print"Velocity of neutron is= %.2e m/sec"%v
print"Kinetic Energy of Neutron is= ",round(KE,3),"eV"
import math
h=6.6*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
q=1.6*10**-19 #charge of electron in coulombs
E=(1.25*10**3)*(1.6*10**-19) #Kinetic energy in joule
lamda=h/math.sqrt(2*m*E)
print"wavelength is =","{:.2e}".format(lamda),"m"
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=1.67*10**-27 #mass of proton in Kg
v=2.0*10**8 #speed of proton in m/sec
c=3*10**8 #speed of light in m/sec
p=(mo*v)/math.sqrt(1-(v/c)**2) #momentum of proton
lamda=h/p
print"wavelength is =","{:.2e}".format(lamda*10**10),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
mp=1.67*10**-27 #mass of proton in Kg
c=3*10**8 #speed of light in m/sec
v=c/20 #speed of proton in m/sec
lamda=h/(mp*v)
print"de-Broglie wavelength =","{:.3e}".format(lamda),"m"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
c=3*10**8 #speed of light in m/sec
lamda=2.0*10**-10#wavelength of electron and photon in meter
#(a) momenta
Pe=h/lamda #momentum of electron in Kg-m/s
Pp=h/lamda #momentum of photon in kg-m/s
print"(a)Since wavelength of photon is same as that of an electron, therefore their moments is also same i.e ",Pe,"Kg-m/s"
#(b) total energies
me=mo=m
KE=(Pe**2)/(2*me) #Kinetic energy of electron in joule
Re=mo*c**2 #rest energy of electron in joule
Re=Re/(1.6*10**-19) #in eV
Ee=Re/10**6 #total energy of electron in Mev(since K.E. of electron is negligible compared to its rest energy so total energy is equal to the rest energy)
Ep=Pp*c #total energy of photon in joule(since rest energy of photon is zero so its total energy is same as its K.E.)
Ep=(Ep/(1.6*10**-19))*10**-3 #in KeV
print"(b)Total energy of electron is",round(Ee,2),"MeV","\n Total energy of photon is",round(Ep,2),"KeV"
#(c) ratio of kinetic energies
Ke=round((KE/(1.6*10**-19)),1)#Kinetic energy of electron in eV
Kp=round(Ep,2)*(10**3) #Kinetic energy of photon in eV
ratio=Ke/Kp
print"(c)Ratio of kinetic energies=","{:.2e}".format(ratio)
import math
h=6.62*10**-34 #planck constant in joule-sec
m=1.67*10**-27 #mass of neutron in Kg
c=3*10**8 #speed of light in m/sec
E=28.8 #Kinetic energy of neutron in eV(given)
E=28.8*1.6*(10**-19)#in joule
Rn=m*c**2 #Rest mass energy of neutron in joule
Rn=(Rn/(1.6*10**-19))/10**6 #in MeV
#since Kinetic energy of neutron under consideration is very small compared to its rest mass energy,the relativistic consideration may be ignored.
lamda=h/math.sqrt(2*m*E)
print"de-Broglie wavelength=",round(lamda*10**10,5),"Angstrom"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=4*1.67*10**-27 #mass of alpha particle Kg=4*mass of proton
q=2*1.6*10**-19 #for alpha particle q=2*e coulomb
V=200 #potential difference in volts
lamda=h/math.sqrt(2*m*q*V)
print"de-Broglie wavelength=",round(lamda*10**10,5),"Angstrom"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
mo=m #for velocity much less than the velocity of light, m=mo
#(a)wavelength for a ball of mass 1.0Kg and v=1.0m/s
v=1.0 #speed of ball in m/sec
mass=1.0 #mass of ball in Kg
lamda=h/(mass*v)
print"de-Broglie wavelength for a ball of mass 1.0Kg and v=1.0m/s =","{:.2e}".format(lamda*10**10),"Angstrom"
#(b)wavelength for an electron of mass 9.1*10**-31 Kg and v=10**6 m/sec
v=10**6 #speed of electron in m/sec
lamda=h/(mo*v)
print"de-Broglie wavelength for an electron of mass 9.1*10**-31Kg and v=10**6m/sec =",round(lamda*10**10,2),"Angstrom"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=1.67*10**-27 #mass of neutron in Kg
c=3*10**8 #speed of light in m/sec
E=1. #Kinetic energy of neutron in eV
Rn=m*c**2 #rest mass energy of neutron in joule
Rn=(Rn/(1.6*10**-19))/10**6 #in MeV
#Kinetic energy of given neutron 1eV is very small as compared to its rest mass energy,therefore the relativistic consideration may be ignored
E=1*1.6*10**-19 #in joule
lamda=h/math.sqrt(2*m*E)
print"de-Broglie wavelength=",round(lamda*10**10,3),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=1.675*10**-27 #mass of neutron in Kg
c=3*10**8 #speed of light in m/sec
E=12.8 #energy of neutron in MeV
Rn=m*c**2 #rest mass energy of neutron in joule
Rn=(Rn/(1.6*10**-19))/10**6 # in MeV
#since the given energy 12.8MeV is very small as compared to the rest mass energy,therefore the relativistic consideration may be ignored
E=E*(10**6)*(1.6*10**-19) # in eV
lamda=h/math.sqrt(2*m*E)
print"de-Broglie wavelength=","{:.1e}".format(lamda*10**10),"Angstrom"
import math
h=6.6*10**-34 #planck constant joule-sec
m=9.1*10**-31 #mass of electron kg
e=1.6*10**-19 #charge of electron in coulomb
lamda=0.40*10**-10#wavelength in meter
V=(h**2)/round(((lamda**2)*2*m*e),72)#lamda=h/sqrt(2mE)=h/sqrt(2meV)
print"applied voltage=",round(V,2),"Volt"
import math
h=6.6*10**-34 #planck constant in joule-sec
m=1.67*10**-27 #mass of neutron in Kg
K=8.6*10**-5 #Boltzmann constant in eV/degree
K=K*1.6*10**-19 #in J/K
T=27+273 #temperature in Kelvin
E=K*T #energy of particle
lamda=h/round(math.sqrt(2*m*E),26)
print"wavelength=",round(lamda*10**10,3),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=4.65*10**-26 #mass of nitrogen atom in Kg
T=27+273 #Temperature in Kelvin
K=1.38*10**-23 #Boltzmann constant in J/K
E=(3./2)*K*T #for nitrogen atom E=(3/2)*K*T
lamda=h/math.sqrt(2*m*E)
print"de-Broglie wavelength=",round(lamda*10**10,4),"Angstrom"
import math
h=6.62*10**-34 #planck constant in joule-sec
m=6.7*10**-27 #mass of helium atom in Kg
K=1.38*10**-23 #Boltzmann constant in J/K
T=400 #Temperature in Kelvin
E=(3./2)*K*T #for helium atom E=(3/2)*K*T
lamda=h/math.sqrt(2*m*E)
print"de-Broglie wavelength=",round(lamda*10**10,3),"Angstrom"
import math
E=100*1.6*10**-19 #kinetic energy of electron in joule
m=9.0*10**-31 #mass of electron in Kg
h=6.62*10**-34 #planck constant joule-sec
D=20 #distance of screen from foil in cm
diameter=2.44 #diameter of ring in cm
r=diameter/2 #radius of ring in cm
lamda=h/math.sqrt(2*m*E)
tan_theta=r/D
#for small value of theta tan(theta)=sin(theta)
#According to Bragg's law, 2d(sin(theta))=n*lamda
n=1
sin_theta=tan_theta
d=(n*lamda)/(2*sin_theta)
print"spacing of the related lattice planes in the metal=",round(d*10**10,2),"Angstrom"
import math
r=0.53*10**-10 #radius of first Bohr orbit in hydrogen atom in Meter
h=6.6*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in Kg
lamda=2*math.pi*r#since 2*pi*r=n*lamda where n=1 for the first Bohr orbit, So lamda=2*pi*r=h/(m*v)
v=h/(lamda*m)
print"velocity of electron=","{:.2e}".format(v),"m/s"
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=9.1*10**-31 #rest mass of electron in Kg
lamda=5896*10**-10#wavelength in meter
#Since lamda=h/(mo*v) and Kinetic energy=(1/2)*mo*v**2
#therefore on putting v=h/(mo*lamda) in equation of Kinetic energy
K=((h/lamda)**2)/(2*mo) #kinetic energy of electron in joule
K=K/(1.6*10**-19) #in eV
print"Kinetic energy of electron=","{:.2e}".format(K),"eV"
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=1.67*10**-27 #rest mass of neutron in Kg
lamda=10**-10 #de-broglie wavelength in meter
v=h/(mo*lamda) #velocity of neutron in m/s (since lamda=h/(mo*v))
print"velocity of neutron=","{:.2e}".format(v),"m/s"
K=(mo*v**2)/2 #kinetic energy of neutron in joule
K=K/(1.6*10**-19) #in eV
print"kinetic energy of neutron=",round(K,3),"eV"
import math
h=6.62*10**-34 #planck constant in joule-sec
mo=9.1*10**-31 #rest mass of electron in Kg
c=3e8 #speed of light in m/sec
K=1 #Kinetic energy in MeV
Re=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of electron in Mev
lamda=h*c/math.sqrt(K*(K+(2*Re)))
print"Wavelength is %.2e Angstrom"%(lamda*1e10/(1.6e-19*1e6))
#answer is wrong in book because of calculation mistake
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=9.1*10**-31 #rest mass of electron in Kg(in book it is given wrong in question)
c=3*10**8 #speed of light in m/sec
#(a)wavelength associated with 1MeV electron
K=1 #kinetic energy of electron in MeV
Re=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of electron in Mev
#since given K.E(1MeV)of electron is comparable with its rest mass energy
#therefore relativistic variation of mass with velocity is taken in to account
d=round(math.sqrt(K*(K+(2*Re))),2)*1.6*10**-13 #value of sqrt(K*(K+(2*mo*c**2))) in volt
lamda=h*c/d
print"wavelength associated with 1MeV electron=","{:.2e}".format(lamda*10**10),"Angstrom"
#(b)wavelength associated with 1MeV proton
K=1*1.6*10**-13 #kinetic energy of electron in volt
mo=1.67*10**-27 #rest mass of proton in Kg
Rp=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of proton in Mev
#since given K.E(1MeV)of proton is much less than its rest mass energy
#therefore relativistic effect can be ignored
lamda=h/math.sqrt(2*mo*K)
print"wavelength associated with 1MeV proton=","{:.2e}".format(lamda*10**10),"Angstrom"
#(c)wavelength associated with 1MeV photon
#since rest mass of photon is zero so its rest mass energy is also zero
E=K #Energy of photon is entirely kinetic energy in volt
lamda=h*c/E
print"wavelength associated with 1MeV photon=","{:.2e}".format(lamda*10**10),"Angstrom"
import math
V=54. #potential difference in volt
lamda=12.28/math.sqrt(V) #de-Broglie wavelength of electron
phi=50 #angle of scattering in degree
sin_phi=math.sin(math.radians(phi))
D=lamda/sin_phi #according to Bragg's law for normal incidence lamda=D*(sin phi),where D is the distance between two consecutive atoms in the surface layer
print"Distance between two neighbouring atoms in the surface of Ni-crystal=",round(D,2),"Angstrom"
theta=90-(phi/2) #glancing angle in degree
sin_theta=math.sin(math.radians(theta))
d=lamda/(2*sin_theta)
print"Distance between successive Bragg's planes of Ni-crystal=",round(d,2),"Angstrom"
import math
V=54. #potential difference in volt
lamda=12.28/math.sqrt(V) #de-Broglie wavelength of electron
D=2.15 #distance between successive atoms of crystal plane in angstrom
#for first order diffraction
n=1
phi=math.asin(n*lamda/D)#Bragg's equation, D*sin(phi)=n*lamda,where phi is angle of scattering
phi=math.degrees(phi)# in degree
#for second order diffraction
n=2
sin_phi_2=n*lamda/D
print"since sin_phi_2=",round(sin_phi_2,2),">1 which is impossible because sin(phi) can never exceed 1.Hence second and third orders can't occur."
#when V is increased from 54volt to 60 volt
V=60.
n=1
lamda=12.28/math.sqrt(V)#de-Broglie wavelength of electron
phi=math.asin(n*lamda/D)
phi=math.degrees(phi)
print"When accelerating potential were changed from 54volt to 60volt, first order diffracted beams occur at=",int(round(phi)),"degree"
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=9.1*10**-31 #rest mass of electron in kg
c=3*10**8 #speed of light in m/sec
lamda=10**-12 #wavelength in meter
pc=(h*c/lamda)/(1.6*10**-19)
Eo=(mo*c**2)/(1.6*10**-19)#rest energy of electron in eV
E=math.sqrt((pc**2)+(Eo**2)) #total energy of electron eV
v=round(math.sqrt(1-(Eo/E)**2),3)
print"Group velocity of the de-Broglie waves,Vg = v = %s*c"%v
Vp=round((1/math.sqrt(1-(Eo/E)**2)),2)
print"Phase velocity of the de-Broglie waves,Vp= %s*c"%Vp
import math
h=6.63*10**-34 #planck constant in joule-sec
mo=9.1*10**-31 #rest mass of electron in kg
c=3*10**8 #speed of light in m/sec
lamda=2.0*10**-12 #wavelength in meter
pc=round((h*c/lamda)/(1.6*10**-16),2)#in KeV
Eo=int((mo*c**2)/(1.6*10**-16))#rest energy of electron in KeV
E=round(math.sqrt((pc**2)+(Eo**2)),2)#total energy of electron KeV
KE=E-Eo
print"Kinetic energy of electron=",KE,"KeV"
v=round(math.sqrt(1-(Eo/E)**2),4)
print"Group velocity of the de-Broglie waves,Vg = v = %s*c"%v
Vp=round((1/math.sqrt(1-(Eo/E)**2)),2)
print"Phase velocity of the de-Broglie waves,Vp= %s*c"%Vp
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x
h=6.63*10**-34 #planck constant joule-sec
delta_x=0.2*10**-10 #uncertainty in position in meter
delta_p=h/(2*math.pi*delta_x) #uncertainty in momentum
print"Uncertainty in momentum =","{:.2e}".format(delta_p),"Kg-ms-1"
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p
h=6.62*10**-34 #planck constant in joule-sec
mo=9.0*10**-31 #rest mass of electron in kg
c=3*10**8 #speed of light in m/sec
v=3.0*10**7 #velocity of electron in m/sec
delta_p=mo*v/math.sqrt(1-(v/c)**2)#maximum uncertainty in momentum
delta_x=h/(2*math.pi*delta_p)#smallest uncertainty in position
print"Smallest possible uncertainty in position of an electron=",round(delta_x*10**10,4),"Angstrom"
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x
h=1.05*10**-34 #planck constant in joule-sec
m=9.1*10**-31 # mass of electron in kg
delta_x=1.1*10**-8#uncertainty in position in meter
delta_p=h/delta_x #uncertainty in momentum
delta_v=delta_p/m #minimum uncertainty in velocity
print"minimum uncertainty in velocity of an electron=","{:.2e}".format(delta_v),"m/s"
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x
h=6.62*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
delta_x=10*10**-10#uncertainty in position in meter
delta_p=h/(2*math.pi*delta_x)#uncertainty in momentum in Kg-m/s
delta_v=delta_p/m #uncertainty in velocity of an electron
print"uncertainty in velocity of an electron=","{:.2e}".format(delta_v),"m/s"
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p
h=6.62*10**-34 #planck constant in joule-sec
m=9.0*10**-31 #mass of electron in kg
v=1.05*10**4 #speed of electron in m/s
p=m*v #momentum of electron in Kg-m/s
delta_p=(0.01/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.01% of its value)
delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron
print"uncertainty in the position of electron=","{:.3e}".format(delta_x),"m"
import math
#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p
h=6.63*10**-34 #planck constant in joule-sec
m=9.0*10**-31 #mass of electron in kg
v=600 #speed of electron in m/s
delta_v=(.005/100)*v#uncertainty in velocity of an electron in m/s
delta_p=m*delta_v#uncertainty in momentum of an electron in Kg-m/s
#value of delta_p is wrong in book
delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron
print"uncertainty in position of electron=",round(delta_x,4),"m"#answer is wrong in book
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9*10**-31 #mass of electron in kg
v=6.6*10**4 #speed of electron in m/s
p=m*v #momentum of electron in Kg-m/s
delta_p=(0.01/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.01% of its value)
delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron(From Heisenberg uncertainty relation)
print"uncertainty in the position of electron=","{:.2e}".format(delta_x),"m"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
r=0.5*10**-10 #radius of hydrogen atom in meter
delta_x=r #uncertainty in position of electron meter
delta_Px=round(h/(2*math.pi*delta_x),25)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation)
p=delta_Px #momentum of electron(since magnitude of momentum can't be less than that of uncertainty)
KE=((p**2)/(2*m))/(1.6*10**-19)#Kinetic energy in eV
print"Kinetic energy=",round(KE,1),"eV"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.0*10**-31 #mass of electron in kg
v=5.00*10**3 #speed of electron in m/s
p=m*v #momentum of electron in Kg-m/s
delta_p=(0.003/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.003% of its value)
delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron(From Heisenberg uncertainty relation)
print"uncertainty in the position of electron=","{:.2e}".format(delta_x),"m"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
r=0.53*10**-10 #radius of hydrogen atom in meter
delta_x=r #uncertainty in position of electron in meter
delta_Px=h/(2*math.pi*delta_x)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation)
p=delta_Px #momentum of electron(since magnitude of momentum can't be less than that of uncertainty)
KE=((p**2)/(2*m))/(1.6*10**-19)#Kinetic energy in eV
print"Minimum energy=",round(KE,1),"eV"
import math
c=3*10**8 #speed of light in m/sec
dlamda=(10**-4)*(10**-10) #width of spectral line in meter
lamda=5000*10**-10 #wavelength of spectral line in meter
#From Heisenberg uncertainty relation (delta_E*delta_t)>=h or delta_t>=h/(2*pi*delta_E)
#since E=h*c/lamda so delta_E=(h*c/lamda**2)*dlamda
#putting value of delta_E in Heisenberg uncertainty relation,delta_t=lamda**2/(2*pi*c*dlamda)
delta_t=(lamda**2)/(2*math.pi*c*dlamda)
print"minimum time required=","{:.3e}".format(delta_t),"sec"
import math
h=6.62*10**-34 #planck constant joule-sec
m=9.0*10**-31 #mass of electron kg
delta_x=.01*10**-2#uncertainty in position of a particle in meter
#(a)uncertainty in momentum of particle
delta_p=h/(2*math.pi*delta_x)#From Heisenberg uncertainty relation
print"uncertainty in momentum of particle=","{:.3e}".format(delta_p),"Kg-m/s"
#(b)uncertainty in velocity of electron
delta_x=5*10**-10 #uncertainty in position of a electron in meter
delta_p=h/(2*math.pi*delta_x)
delta_v=delta_p/m
print"uncertainty in velocity of electron=","{:.2e}".format(delta_v),"m/s"
#(c)uncertainty in velocity of alpha-particle
mp=1.67*10**-27 #mass of proton in Kg
m=4*mp #mass of alpha=particle in Kg
delta_x=5*10**-10 #uncertainty in position of alpha-particle in meter
delta_p=h/(2*math.pi*delta_x)
delta_v=delta_p/m
print"uncertainty in velocity of alpha-particle=",round(delta_v,2),"m/s"
import math
#From Heisenberg uncertainty relation for energy E and time t, (delta_E*delta_t)>=h
#Also E=h*v or delta_E=h*(delta_v)
#putting this value in uncertainty relation, delta_v>=1/(2*pi*delta_t)
delta_t=10**-8 #uncertainty in time in sec
delta_v=1/(2*math.pi*delta_t)
print"minimum uncertainty in the frequency=","{:.3e}".format(delta_v),"sec-1"
import math
#From Heisenberg uncertainty relation for energy E and time t, (delta_E*delta_t)>=h
#Also E=h*v or delta_E=h*(delta_v)
#putting this value in uncertainty relation, delta_v>=1/(2*pi*delta_t)
delta_t=10**-8 #uncertainty in time in sec
delta_v=1/(2*math.pi*delta_t)
print"minimum uncertainty in the frequency=","{:.3e}".format(delta_v),"sec-1"
import math
h=6.62*10**-34 #planck constant joule-sec
m=9.0*10**-31 #mass of electron kg
delta_x=1*10**-10#uncertainty in position of a electron in meter
delta_p=h/(2*math.pi*delta_x)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation)
E=(1*10**3)*(1.6*10**-19)#energy in joule
p=math.sqrt(2*m*E) #momentum in Kg-m/s
percentage=(delta_p/p)*100
print"Percentage of uncertainty in its momentum=",round(percentage,1),"%"
import math
h=6.63*10**-34 #planck constant joule-sec
delta_t=2.5*10**-20 #uncertainty in time in sec
delta_E=h/(2*math.pi*delta_t)#From Heisenberg uncertainty relation for energy E and time t
delta_E=delta_E/(1.6*10**-19)
print"minimum error=",round(delta_E/10**3,3),"KeV"
import math
h=1.054*10**-34 #planck constant joule-sec
delta_t=10**-12 #uncertainty in time in sec
delta_E=h/(2*delta_t)#uncertainty in energy(From Heisenberg uncertainty relation)
delta_E=delta_E/(1.6*10**-19)
print"uncertainty in energy of gamma-ray photon emitted=","{:.1e}".format(delta_E),"eV"
import math
h=6.62*10**-34 #planck constant joule-sec
m=9.1*10**-31 #mass of electron kg
e=1.6*10**-19 #charge of electron in coulomb
V=1000. #potential difference in volt
delta_V=12 #in volt
#delta_P=m*e*delta_V/sqrt(2*m*e*V)
#From Heisenberg uncertainty relation delta_x*delta_p)>=h or delta_x>=h/delta_p
delta_x=((h*math.sqrt(2.0))/math.sqrt(m*e))*(math.sqrt(V)/delta_V)
print"uncertainty in position of an electron=",round(delta_x,11),"m =",round(delta_x*1e10,1),"Angstrom"
#answer in book is wrong
import math
#According to uncertainty principle (delta_x*delta_p)>=h ......eq.1
#momentum,p=h/lamda or p*lamda=h ........eq.2
#on differentiating eq.2 and solving we get delta_p=(h*delta_lamda)/lamda**2,put this value in eq.1
#we get (delta_x*delta_lamda)>=(lamda**2)/2*pi
lamda=10**-10 #wavelength in meter
delta_lamda=lamda*10**-6#since uncertainty in wavelength is given to be in ratio 1/10**6
delta_x=lamda/(2*math.pi*10**-6)#since (delta_x)=(lamda**2)/(2*pi*delta_lamda)
print"uncertainty in position=""{:.2e}".format(delta_x),"m"
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.11*10**-31 #mass of electron in kg
L=10**-10 #width of box in meter
n=1 #minimum energy of the particle is obtained for n=1
E=(n*h)**2/(8*m*L**2) #in joule
E=round(E,20)/(1.6*10**-19)#in eV
print"energy of an electron=",round(E,2),"eV"
import math
delta_x=5*10**-10 #uncertainty in position in meter
L=25*10**-10 #width of box in meter
x=L/2 #at the center of the box x=L/2
n=1 #since the particle is in the state of least energy so n=1
def si(x): #si(x) is the wave function of particle moving in an infinite potential well
return math.sqrt(2/L)*math.sin(n*math.pi*x/L)
p=(math.fabs(si(x))**2)*delta_x
print"probability =",round(p,1)
import math
h=6.63*10**-34 #planck constant in joule-sec
m=9.1*10**-31 #mass of electron in kg
L=2.5*10**-10 #width of box in meter
#first lowest permitted energy value
n=1
E=(n*h)**2/(8*m*L**2) #in joule
E=E/(1.6*10**-19) #in eV
print"first lowest permitted energy value=",round(E,2),"eV"
#second lowest permitted energy value
n=2
E=round(E,2)*n**2 #in eV
print"second lowest permitted energy value=",round(E,2),"eV"
import math
#five antinodes signify that particle is in 5th quantum state i.e n=5
E5=5**2 #energy of the 5th quantum state
E1=230*1.6*10**-19 #energy of the 1st quantum state in joule
E1=round(E1/E5,20)
h=6.62*10**-34 #planck constant in joule-sec
L=0.2*10**-9 #width of well in meter
#for n=1
m=h**2/(8*E1*L**2) #in Kg(since En=(n*h)**2/(8*m*L**2))
print"mass of the particle=","{:.2e}".format(m),"Kg"
En=(1*10**3)*(1.6*10**-19)#in joule(given)
n=math.sqrt(En/E1)
print"since n=",round(n,2)," is not an integer. Hence,En=1KeV is not permitted value of energy."
from scipy import integrate
import math
x1=0.35 #lower limit
x2=0.45 #upper limit
#Wn=a*x is wave function
p=integrate.quad(lambda x: x**2,x1,x2)
p=round(p[0],4)
print"Probability= %s*a**2"%p
X=integrate.quad(lambda x: x**3,0,1)
X=(X[0])
print"Expectation value <x> of particle's position= %s*a**2"%X
import math
L = 1 # let unit length
x1=0.45*L #lower limit
x2=0.55*L #upper limit
n=1 #for ground state
p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))
p_per = p*100 # probability of finding particle in percentage
print("Probability of finding particle(ground state)="),round(p_per,1),"%"
n=2 #for first excited state
p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))
p_per = p*100 # probability of finding particle in percentage
print("Probability of finding particle(first excited state)="),round(p_per,2),"%"
import math
L = 1e-8 # length of box in cm
h = 6.626e-34 # Plank constant in joule-sec
m = 9.1e-31 # mass of electron in Kg
E1 = (h)**2/(8*m*(L*1e-2)**2) # Calculation of energy of ground state in Joule
E1_eV = round(E1/1.6e-19 )# Calculation of energy in eV
E2_eV =2**2*E1_eV # Calculation of energy of first excited state in eV
del_E = E2_eV - E1_eV # calculation of difference between first state and ground state
print("Energy difference between ground state and first excited state ="),int(del_E),"eV"
import math
a=1 #let
n=2 #for second energy state
x=a/2 #at the center of the box
W2=math.sqrt(2./a)*(math.sin((n*math.pi*x)/a))#wave function of particle in second energy state
print"probability of finding particle in interval del_x, p=del_x*(W2)**2= ",int(W2)
#probability of finding particle in interval del_x is, p=del_x*(W2)**2
import math
L = 2. # length of box in Angstrom
x1=1.6000 #lower limit in Angstrom
x2=1.6001 #upper limit in Angstrom
n=1 #given
p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))
print"Probability of finding particle=","{:.2e}".format(p)
import math
lamda=1.21*10**-10 #de-Broglie wavelength in meter
L=lamda/2 #length of a loop in meter
#since there are 7 loops between the walls of the box
a=7*L
print"Distance between the walls=", a,"m"
import math
L = 10**-9 # width of potential well in meter
h = 6.63e-34 # Plank constant in joule-sec
m = 9.1e-31 # mass of electron in Kg
n1=1
n2=2
n3=3
lamda1 = 2*L/n1 # Calculation of wavelength
lamda2 = 2*L/n2 # Calculation of wavelength
lamda3 = 2*L/n3 # Calculation of wavelength
E=h**2/(8*m*L**2) # Calculation of energy in Joule
E=round(E/(1.6*10**-19),2) # Calculation of energy in eV
E1_eV = n1**2*E # Calculation of energy in eV
E2_eV = n2**2*E # Calculation of energy in eV
E3_eV = n3**2*E # Calculation of energy in eV
print"For first energy state: wavelength in angstrom & Energy in eV=",int(lamda1*10**10),",",round(E1_eV,2)
print"For second energy state: wavelength in angstrom & Energy in eV=",int(lamda2*10**10),",",round(E2_eV,2)
print"For third energy state: wavelength in angstrom & Energy in eV=",round(lamda3*10**10,1),",",round(E3_eV,2)
import math
c=3*10**10 #speed of light in cm/sec
del_t=2*10**-7#uncertainty in time in sec
#x is the distance between source and reflecting object
del_x=(c/2)*del_t
print"Uncertainty in distance=",int(del_x),"cm"