6: Principles of Quantum Mechanics

Example number 6.1, Page number 157

In [11]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.625*10**-34;        #planck's constant(J-sec)
m=0.05;         #mass(kg)
v=20;           #velocity(m/sec)
mp=1.67*10**-27;    #mass of proton(kg)
vp=2200;      #velocity of proton(m/sec)
me=9.11*10**-31;     #mass of electron(kg)
E=10*1.602*10**-19;      #kinetic energy(J)

#Calculations
lamda_ball=h/(m*v);        #de-broglie wavelength of ball(m)
lamda_p=h*10**10/(mp*vp);        #de-broglie wavelength of proton(angstrom)
lamda_e=h/(2*me*E);        #de-broglie wavelength of electron(m)

#Result
print "de-broglie wavelength of ball is",lamda_ball,"m"
print "de-broglie wavelength of proton is",round(lamda_p,2),"angstrom"
print "de-broglie wavelength of electron is",round(lamda_e/10**14,2),"*10**14 m"
print "answer for de-broglie wavelength of electron in the book is wrong"
de-broglie wavelength of ball is 6.625e-34 m
de-broglie wavelength of proton is 1.8 angstrom
de-broglie wavelength of electron is 2.27 *10**14 m
answer for de-broglie wavelength of electron in the book is wrong

Example number 6.2, Page number 158

In [6]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
m=1.673*10**-27;    #mass of proton(kg)
v=10**4;      #velocity of proton(m/sec)
V1=100;       #potential difference in 1st case(V)
V2=10000;       #potential difference in 2nd case(V)
V3=6400;       #potential difference in 3rd case(V)


#Calculations
lamda1=12.25/math.sqrt(V1)        #de-broglie wavelength in 1st case(angstrom)
lamda2=12.25/math.sqrt(V2)        #de-broglie wavelength in 2nd case(angstrom)
lamda3=12.25/math.sqrt(V3)        #de-broglie wavelength in 3rd case(angstrom)
lamda4=12.25/math.sqrt(V2)        #de-broglie wavelength in 4th case(angstrom)
lamda5=h/(m*v);        #de-broglie wavelength of proton(m)

#Result
print "de-broglie wavelength in 1st case is",lamda1,"angstrom"
print "de-broglie wavelength in 2nd case is",lamda2,"angstrom"
print "de-broglie wavelength in 3rd case is",round(lamda3,3),"angstrom"
print "de-broglie wavelength in 4th case is",lamda4,"angstrom"
print "de-broglie wavelength of proton is",round(lamda5*10**10,4),"angstrom"
de-broglie wavelength in 1st case is 1.225 angstrom
de-broglie wavelength in 2nd case is 0.1225 angstrom
de-broglie wavelength in 3rd case is 0.153 angstrom
de-broglie wavelength in 4th case is 0.1225 angstrom
de-broglie wavelength in 5th case is 0.3963 angstrom

Example number 6.3, Page number 158

In [9]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m=1.67*10**-27;    #mass of proton(kg)
vc=3*10**8;      #velocity of light(m/sec)

#Calculations
v=vc/20;         #velocity of proton(m/sec)
lamda=h/(m*v);        #de-broglie wavelength of proton(m)

#Result
print "de-broglie wavelength of proton is",round(lamda*10**14,2),"*10**-14 m"
de-broglie wavelength of proton is 2.64 *10**-14 m

Example number 6.4, Page number 159

In [13]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.60*10**-34;        #planck's constant(J-sec)
m=1.674*10**-27;    #mass of proton(kg)
lamda=10**-10;        #de-broglie wavelength(m)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
E=h**2/(2*m*lamda**2);      #energy of neutron(J)
E=E/e;               #energy of neutron(eV)

#Result
print "energy of neutron is",round(E*10**2,2),"*10**-2 eV"
energy of neutron is 8.13 *10**-2 eV

Example number 6.5, Page number 159

In [20]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
lamda=3*10**-12;        #de-broglie wavelength(m)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
E=h**2/(2*m*lamda**2);      #energy of electron(J)
E=E/e;               #energy of electron(eV)

#Result
print "energy of electron is",round(E,1),"eV"
print "answer in the book is wrong"
energy of electron is 167217.6 eV
answer in the book is wrong

Example number 6.6, Page number 159

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
lamda=5896*10**-10;        #de-broglie wavelength(m)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
K=h**2/(2*m*lamda**2);      #energy of electron(J)
K=K/e;               #kinetic energy of electron(eV)

#Result
print "kinetic energy of electron is",round(K*10**6,2),"*10**-6 eV"
kinetic energy of electron is 4.34 *10**-6 eV

Example number 6.7, Page number 160

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
lamda=0.4*10**-10;        #de-broglie wavelength(m)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
V=h**2/(2*m*e*lamda**2);      #voltage(V)

#Result
print "voltage is",round(V,1),"V"
print "answer in the book is wrong"
voltage is 934.9 V
answer in the book is wrong

Example number 6.8, Page number 160

In [11]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
m=1.67*10**-27;    #mass of neutron(kg)
lamda=10**-10;        #de-broglie wavelength(m)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
v=h/(m*lamda);          #velocity of neutron(m/sec)
E=m*v**2/(2*e);      #kinetic energy of neutron(eV)

#Result
print "velocity of neutron is",round(v/10**3,2),"*10**3 m/sec"
print "kinetic energy of neutron is",round(E,5),"eV"
print "answer for kinetic energy in the book is wrong"
velocity of neutron is 3.97 *10**3 m/sec
kinetic energy of neutron is 0.08225 eV
answer for kinetic energy in the book is wrong

Example number 6.9, Page number 161

In [15]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
c=3*10**8;      #velocity of light(m/sec)
e=1.6*10**-19;        #charge of electron(c)
E=1000;      #energy of electron(eV)

#Calculations
lamda_p=h*c*10**10/(E*e);      #wavelength of photon(angstrom)
lamda_e=h*10**10/math.sqrt(2*m*E*e);     #wavelength of electron(angstrom)

#Result
print "wavelength of photon is",round(lamda_p,1),"angstrom"
print "wavelength of electron is",round(lamda_e,2),"angstrom"
wavelength of photon is 12.4 angstrom
wavelength of electron is 0.39 angstrom

Example number 6.10, Page number 161

In [20]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
c=3*10**8;      #velocity of light(m/sec)
lamda=0.82*10**-10;    #wavelength(m)

#Calculations
E=h*c/lamda;          #energy(J)
lamda=h*10**10/math.sqrt(2*m*E);     #wavelength of photo-electron(angstrom)

#Result
print "wavelength of photo-electron is",round(lamda,1),"angstrom"
wavelength of photo-electron is 0.1 angstrom

Example number 6.11, Page number 162

In [24]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
c=3*10**8;      #velocity of light(m/sec)

#Calculations
lamda=h*10**10/(m*c);        #wavelength of electron(angstrom)

#Result
print "wavelength of electron is",round(lamda,4),"angstrom"
print "answer in the book varies due to rounding off errors"
wavelength of electron is 0.0242 angstrom
answer in the book varies due to rounding off errors

Example number 6.12, Page number 162

In [27]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.625*10**-34;        #planck's constant(J-sec)
m=1.675*10**-27;    #mass of neutron(kg)
e=1.6*10**-19;        #charge of electron(c)
E=10**14;      #energy of neutron(eV)

#Calculations
v=math.sqrt(2*E*e/m);      #velocity(m/sec)
lamda=h/(m*v);        #de-broglie wavelength of neutron(m)

#Result
print "de-broglie wavelength of neutron is",round(lamda*10**18,2),"*10**-18 m"
de-broglie wavelength of neutron is 2.86 *10**-18 m

Example number 6.13, Page number 162

In [33]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.625*10**-34;        #planck's constant(J-sec)
m=1.675*10**-27;    #mass of neutron(kg)
e=1.6*10**-19;        #charge of electron(c)
E=12.8*10**6;      #energy of neutron(eV)

#Calculations
v=math.sqrt(2*E*e/m);      #velocity(m/sec)
lamda=h/(m*v);        #de-broglie wavelength of neutron(m)

#Result
print "de-broglie wavelength of neutron is",round(lamda*10**15,3),"*10**-15 m"
print "answer in the book is wrong"
de-broglie wavelength of neutron is 7.998 *10**-15 m
answer in the book is wrong

Example number 6.14, Page number 163

In [39]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
mp=1836*m;       #mass of photon(kg)
c=3*10**8;       #velocity of light(m/sec)
e=1.6*10**-19;        #charge of electron(c)

#Calculations
E=m*c**2;      #energy(J)
v=math.sqrt(2*E/mp);      #velocity(m/sec)
lamda=h*10**10/(mp*v);        #de-broglie wavelength of proton(angstrom)

#Result
print "de-broglie wavelength of proton is",round(lamda,4),"angstrom"
print "answer in the book is wrong"
de-broglie wavelength of proton is 0.0004 angstrom
answer in the book is wrong

Example number 6.15, Page number 163

In [41]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.60*10**-34;        #planck's constant(J-sec)
m=1.67*10**-27;    #mass of neutron(kg)
k=8.6*10**-5;      #boltzmann constant(eV/deg)
e=1.6*10**-19;        #charge of electron(c)
T=300;      #temperature(K)

#Calculations
lamda=h*10**10/math.sqrt(2*m*k*e*T);     #wavelength of thermal neutron(angstrom)

#Result
print "wavelength of thermal neutron is",round(lamda,3),"angstrom"
wavelength of thermal neutron is 1.777 angstrom

Example number 6.16, Page number 164

In [43]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
mn=1.67*10**-27;    #mass of neutron(kg)
k=1.38*10**-23;      #boltzmann constant(eV/deg)
T=300;      #temperature(K)

#Calculations
E=k*T;         #energy(J)
p=math.sqrt(2*mn*E);      #momentum
d=h*10**10/p;         #interplanar spacing(angstrom)

#Result
print "interplanar spacing is",round(d,2),"angstrom"
interplanar spacing is 1.78 angstrom

Example number 6.17, Page number 164

In [47]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m=9*10**-31;    #mass of neutron(kg)
e=1.6*10**-19;        #charge of electron(c)
V=344;       #potential difference(V)
theta=60*math.pi/180;         #angle(radian)

#Calculations
d=h*10**10/(2*math.sin(theta)*math.sqrt(2*m*e*V));         #interplanar spacing(angstrom)

#Result
print "interplanar spacing is",round(d,2),"angstrom"
print "answer in the book is wrong"
interplanar spacing is 0.38 angstrom
answer in the book is wrong

Example number 6.18, Page number 171

In [50]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
deltax=4*10**-10;       #uncertainity in position of electron(m)

#Calculations
delta_px=h/deltax;       #uncertainity in momentum(kg m/sec)

#Result
print "uncertainity in momentum is",delta_px,"kg m/sec"
uncertainity in momentum is 1.65e-24 kg m/sec

Example number 6.19, Page number 171

In [55]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
v=600;     #speed(m/sec)
a=0.005/100;     #accuracy(%)

#Calculations
deltav=v*a;       #uncertainity in speed(kg m/sec)
delta_px=m*deltav;       #uncertainity in momentum(kg m/sec)
deltax=h/delta_px;       #uncertainity in position of electron(m)

#Result
print "uncertainity in position of electron is",round(deltax,5),"m"
print "answer in the book is wrong"
uncertainity in position of electron is 0.02418 m
answer in the book is wrong

Example number 6.20, Page number 172 Theoritical

Example number 6.21, Page number 172

In [59]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
m0=9.1*10**-31;    #mass of electron(kg)
deltax=0.1*10**-10;       #uncertainity in position of electron(m)

#Calculations
delta_p=h/deltax;       #uncertainity in momentum(kg m/sec)
delta_v=delta_p/m0;      #uncertainity in velocity(m/sec)

#Result
print "uncertainity in momentum is",delta_p,"kg m/sec"
print "uncertainity in velocity is",round(delta_v/10**7,3),"*10**7 m/sec"
uncertainity in momentum is 6.63e-23 kg m/sec
uncertainity in velocity is 7.286 *10**7 m/sec

Example number 6.22, Page number 172

In [15]:
#importing modules
import math
from __future__ import division

#Variable declaration    
me=9.10*10**-31;    #mass of electron(kg)
mp=1.67*10**-27;    #mass of electron(kg)

#Calculations
uv=mp/me;      #uncertainity in velocity

#Result
print "uncertainity in velocity is",int(uv)
uncertainity in velocity is 1835

Example number 6.23, Page number 172

In [16]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m0=9*10**-31;    #mass of electron(kg)
v=3*10**7;     #velocity of electron(m/sec)
c=3*10**8;     #velocity of light(m/sec)

#Calculations
deltax_min=h*10**10*math.sqrt(1-(v**2/c**2))/(4*math.pi*m0*v);       #smallest possible uncertainity in position of electron(angstrom)

#Result
print "smallest possible uncertainity in position of electron is",round(deltax_min,3),"angstrom"
smallest possible uncertainity in position of electron is 0.019 angstrom

Example number 6.24, Page number 173

In [17]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
m=9*10**-31;    #mass of electron(kg)
deltax_max=10*10**-10;     #length of box(m)

#Calculations
deltavx_min=h/(deltax_max*m);       #minimum uncertainity in velocity of electron(m/s)

#Result
print "minimum uncertainity in velocity of electron is",round(deltavx_min/10**5,1),"*10**5 m/s"
minimum uncertainity in velocity of electron is 7.3 *10**5 m/s

Example number 6.25 Page number 173

In [1]:
#importing modules
import math
from __future__ import division

#Variable declaration    
dlamda=10**-4*10**-10;      #width(m)
lamda=6000*10**-10;      #wavelength(m)
c=3*10**8;         #velocity of light(m/sec)

#Calculations
delta_t=lamda**2/(2*math.pi*c*dlamda);       #time required(second)

#Result
print "time required is",round(delta_t*10**8,1),"*10**-8 second"
time required is 1.9 *10**-8 second

Example number 6.26 Page number 174

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
m=9.1*10**-31;    #mass of electron(kg)
v=3.5*10**7;     #speed(cm/sec)
a=0.0098/100;     #accuracy(%)

#Calculations
deltav=v*a;       #uncertainity in speed(kg m/sec)
delta_p=m*deltav;       #uncertainity in momentum(kg m/sec)
deltax=h/(4*math.pi*delta_p);       #uncertainity in position of electron(m)

#Result
print "uncertainity in position of electron is",round(deltax*10**8,4),"*10**-8 m"
print "answer in the book is wrong"
uncertainity in position of electron is 1.6903 *10**-8 m
answer in the book is wrong

Example number 6.27 Page number 174

In [20]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.62*10**-34;        #planck's constant(J-sec)
m=10**-6;    #mass of electron(kg)
deltav=5.5*10**-20;     #speed(m/sec)

#Calculations
delta_p=m*deltav;       #uncertainity in momentum(kg m/sec)
deltax=h/(4*math.pi*delta_p);       #uncertainity in position of dust particle(m)

#Result
print "uncertainity in position of dust particle is",round(deltax*10**10,2),"*10**-10 m"
uncertainity in position of dust particle is 9.58 *10**-10 m

Example number 6.28 Page number 175

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration    
delta_t=10**-12;       #life time(s)
hby2pi=1.054*10**-34;     
e=1.6*10**-19;        #charge of electron(c)

#Calculations
deltaE=hby2pi/(2*e*delta_t);       #uncertainity in energy(eV)

#Result
print "uncertainity in energy is",round(deltaE*10**4,1),"*10**-4 eV"
uncertainity in energy is 3.3 *10**-4 eV

Example number 6.29 Page number 175

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration    
delta_t=10**-8;       #life time(s)

#Calculations
deltav=1/(4*math.pi*delta_t);       #minimum uncertainity in frequency(s-1)

#Result
print "minimum uncertainity in frequency is",round(deltav/10**6),"*10**6 s-1"
minimum uncertainity in frequency is 8.0 *10**6 s-1

Example number 6.30 Page number 175

In [6]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
e=1.6*10**-19;        #charge of electron(c)
delta_t=2.5*10**-14*10**-6;       #life time(s)

#Calculations
deltaE=h*10**-3/(4*math.pi*delta_t*e);       #minimum energy(keV)

#Result
print "minimum energy is",round(deltaE,5),"keV"
print "answer in the book varies due to rounding off errors"
minimum energy is 13.18997 keV
answer in the book varies due to rounding off errors

Example number 6.31 Page number 183

In [24]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
e=1.602*10**-19;        #charge of electron(c)
L=10**-10;        #width(m)
m=9.11*10**-31;    #mass of electron(kg)


#Calculations
E1=h**2/(8*m*e*L**2);     #least energy(eV)

#Result
print "least energy is",round(E1,3),"eV"
print "answer in the book is wrong"
least energy is 37.649 eV
answer in the book is wrong

Example number 6.32 Page number 184

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
e=1.6*10**-19;        #charge of electron(c)
L=2.5*10**-10;        #width(m)
m=9.1*10**-31;    #mass of electron(kg)
n1=1;
n2=2;
n3=3;

#Calculations
E=h**2/(8*m*e*L**2);     #energy(eV)
E1=n1**2*h**2/(8*m*e*L**2);     #1st least energy(eV)
E2=n2**2*h**2/(8*m*e*L**2);     #2nd least energy(eV)
E3=n3**2*h**2/(8*m*e*L**2);     #3rd least energy(eV)

#Result
print "1st least energy is",int(E1),"eV"
print "2nd least energy is",int(E2),"eV"
print "3rd least energy is",int(E3),"eV"
1st least energy is 6 eV
2nd least energy is 24 eV
3rd least energy is 54 eV

Example number 6.33 Page number 184

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
e=1.6*10**-19;        #charge of electron(c)
L=10**-9;        #width(m)
m=9.1*10**-31;    #mass of electron(kg)
n1=1;
n2=2;
n3=3;

#Calculations
lamda1=2*L*10**10/n1;        #wavelength in 1st energy state(angstrom)
lamda2=2*L*10**10/n2;        #wavelength in 2nd energy state(angstrom)
lamda3=2*L*10**10/n3;        #wavelength in 3rd energy state(angstrom)
E=h**2/(8*m*e*L**2);     #energy(eV)
E1=n1**2*h**2/(8*m*e*L**2);     #1st least energy(eV)
E2=n2**2*h**2/(8*m*e*L**2);     #2nd least energy(eV)
E3=n3**2*h**2/(8*m*e*L**2);     #3rd least energy(eV)

#Result
print "wavelength in 1st energy state is",int(lamda1),"angstrom"
print "wavelength in 2nd energy state is",int(lamda2),"angstrom"
print "wavelength in 3rd energy state is",round(lamda3,2),"angstrom"
print "1st least energy is",round(E1,2),"eV"
print "2nd least energy is",round(E2,4),"eV"
print "3rd least energy is",round(E3,3),"eV"
print "answers for 2nd and 3rd least energies varies due to rounding off errors"
wavelength in 1st energy state is 20 angstrom
wavelength in 2nd energy state is 10 angstrom
wavelength in 3rd energy state is 6.67 angstrom
1st least energy is 0.38 eV
2nd least energy is 1.5095 eV
3rd least energy is 3.396 eV
answers for 2nd and 3rd least energies varies due to rounding off errors

Example number 6.34 Page number 185

In [27]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.626*10**-34;        #planck's constant(J-sec)
e=1.60*10**-19;        #charge of electron(c)
L=10**-10;        #width(m)
m=9.1*10**-31;    #mass of electron(kg)
n1=1;
n2=2;

#Calculations
E=h**2/(8*m*e*L**2);     #energy(eV)
E1=n1**2*h**2/(8*m*e*L**2);     #1st least energy(eV)
E2=n2**2*h**2/(8*m*e*L**2);     #2nd least energy(eV)
Ed=E2-E1;         #energy difference between ground state and 1st excited state(eV)

#Result
print "1st least energy is",round(E1,2),"eV"
print "2nd least energy is",int(E2),"eV"
print "energy difference between ground state and 1st excited state is",round(Ed,2),"eV"
print "answer in the book varies due to rounding off errors"
1st least energy is 37.69 eV
2nd least energy is 150 eV
energy difference between ground state and 1st excited state is 113.08 eV
answer in the book varies due to rounding off errors

Example number 6.35 Page number 185

In [28]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.6*10**-34;        #planck's constant(J-sec)
e=1.6*10**-19;        #charge of electron(c)
L=10**-1;        #width(m)
m=10**-2;    #mass of electron(kg)
n1=1;
n2=2;
n3=3;

#Calculations
E=h**2/(8*m*e*L**2);     #energy(eV)
E1=n1**2*h**2/(8*m*e*L**2);     #1st least energy(eV)
E2=n2**2*h**2/(8*m*e*L**2);     #2nd least energy(eV)
E3=n3**2*h**2/(8*m*e*L**2);     #3rd least energy(eV)

#Result
print "1st least energy is",round(E1*10**45,1),"*10**-45 eV"
print "2nd least energy is",round(E2*10**45,1),"*10**-45 eV"
print "3rd least energy is",round(E3*10**45,1),"*10**-45 eV"
print "energy levels are so close to each other that the energy states cannot be observed"
1st least energy is 3.4 *10**-45 eV
2nd least energy is 13.6 *10**-45 eV
3rd least energy is 30.6 *10**-45 eV
energy levels are so close to each other that the energy states cannot be observed

Example number 6.36 Page number 186

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration    
h=6.63*10**-34;        #planck's constant(J-sec)
e=1.602*10**-19;        #charge of electron(c)
L=0.2*10**-9;        #width(m)
n5=5;
En=10**3;          #energy(eV)
E5=230;     #energy of particle(eV)

#Calculations2
E5=230*e;        #energy(J)
E1=E5/n5**2;       #energy in 1st state(J)
m=h**2/(8*E1*L**2);     #mass of particle(kg)
n=math.sqrt(En*e/E1);      #quantum state

#Result
print "mass of particle is",round(m*10**31,1),"*10**-31 kg"
print "quantum state is",round(n,1)
mass of particle is 9.3 *10**-31 kg
quantum state is 10.4

Example number 6.37 Page number 186

In [29]:
#importing modules
import math
from __future__ import division

#Variable declaration    
L=25*10**-10;        #width(m)
deltax=5*10**-10;        #interval(m)

#Calculations2
P=2*deltax/L;         #probability of finding the particle

#Result
print "probability of finding the particle is",P
probability of finding the particle is 0.4

Example number 6.38 Page number 187

In [35]:
#importing modules
import math
from __future__ import division
from scipy.integrate import quad

#Variable declaration    
a=1;        #assume

#Calculations2
def zintg(x):
    return (a*x)**2  

P=quad(zintg,0.35,0.45)[0]       #probability of finding the particle

def zintg(x):
    return x*(a*x)**2  

X=quad(zintg,0,1)[0]       #expectation value of position of particle

#Result
print "probability of finding the particle is",round(P,4),"a**2"
print "expectation value of position of particle is",X,"a**2"
probability of finding the particle is 0.0161 a**2
expectation value of position of particle is 0.25 a**2