# chapter2 :Uncertainty principle and schrodinger wave equations¶

## example 2.1;page no:77¶

In [1]:
#cal of Uncertainty in momentum of particle
#intiation of all variables
#given that
import math
del_x = 0.2 # Uncertainty in position in angstrom
h = 6.63e-34 # Plank constant
print("Example 2.1,page no:77")
h_bar = h / (2*math.pi) # constant
del_p = h_bar/(2*del_x*1e-10) # Calculation of uncertainty in momentum
print("Uncertainty in momentum of particle in kgm/sec:"),round(del_p,26)

Example 2.1,page no:77
Uncertainty in momentum of particle in kgm/sec: 2.64e-24


## example 2.2;page no:77¶

In [2]:
#cal of Uncertainty in momentum of particle
#intiation of all variables
#given that
import math
del_x = 4e-10 # Uncertainty in position in m
h = 6.63e-34 # Plank constant
print("Example 2.2,page no:77")
h_bar = h / (2*math.pi) # constant
del_p = h_bar/(2*del_x) # Calculation of uncertainty in momentum
print("Uncertainty in momentum of particle in kgm/sec:"),round(del_p,27)
# Answer in book is given as 1.32e-23 kgm/sec

Example 2.2,page no:77
Uncertainty in momentum of particle in kgm/sec: 1.32e-25


## example 2.3;page no:78¶

In [3]:
#cal of Uncertainty in position of particle
#intiation of all variables
#given that
import math
v = 3e7 # Velocity of moving electron in m/s
m = 9.1e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
c = 3e8 # speed of light in m/s
print("Example 2.3,page no:78")
h_bar = h / (2*math.pi) # constant
del_p = m*v/(math.sqrt(1-(v/c)**2)) # calculation of uncertainty in momentum
del_x = h_bar/(2*del_p) # Calculation of uncertainty in position
print("Uncertainty in position of particle in angstrom:"),round(del_x*1e10,4)
#Answer in book is 0.0194 angstrom which is due to using approximate values at intermediate steps

Example 2.3,page no:78
Uncertainty in position of particle in angstrom: 0.0192


## example 2.5;page no:79¶

In [4]:
#cal of Uncertainty in position of particle
#intiation of all variables
#given that
import math
v = 1.05e4 # Velocity of moving electron in m/s
v_error = 0.02 #Percentage error in measurement of velocity
m = 9e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.5,page no:79")
h_bar = h / (2*math.pi) # constant
p = m*v
del_p = v_error*p/100 # calculation of uncertainty in momentum
del_x = h_bar/del_p
print("Uncertainty in position of particle in m:"),round(del_x,7)
# Answer in book is given as 5.58e-3 m

Example 2.5,page no:79
Uncertainty in position of particle in m: 5.58e-05


## example 2.6;page no:80¶

In [5]:
#cal of Uncertainty in position of particle
#intiation of all variables
#given that
import math
v = 600 # Velocity of moving electron in m/s
v_error = 0.005 #Percentage error in measurement of velocity
m = 9.1e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.6,page no:80")
h_bar = h / (2*math.pi) # constant
p = m*v
del_p = v_error*p/100 # calculation of uncertainty in momentum
del_x = h_bar/(del_p) # Calculation of uncertainty in position
print("Uncertainty in position of particle in m:"),round(del_x,4)
# Answer in book is 0.39e-2 m

Example 2.6,page no:80
Uncertainty in position of particle in m: 0.0039


## example 2.7;page no:80¶

In [6]:
#cal of Ratio of uncertainties in the velocity of electron to proton
#intiation of all variables
#given that
import math
del_x = 1 # let uncertainty in position is unity
m_e = 9.1e-31 # mass of electron in kg
m_p = 1.67e-27 # mass of proton in kg
h = 6.63e-34 # Plank constant
print("Example 2.7,page no:80")
h_bar = h / (2*math.pi) # constant
del_v_ratio = m_p/m_e # calculation in uncertainties in the velocity of electron and proton
print("Ratio of uncertainties in the velocity of electron to proton is:"),round(del_v_ratio,0)

Example 2.7,page no:80
Ratio of uncertainties in the velocity of electron to proton is: 1835.0


## example 2.8;page no:81¶

In [17]:
#cal of Kinetic energy needed by an electron
#intiation of all variables
#given that
import math
r = 0.5 # radius of hydrogen atom in angstrom
m_e = 9.1e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.8,page no:81")
h_bar = h / (2*math.pi) # constant
del_x = 2*r # calculation of uncertainty in position
del_p = h_bar/(2*del_x*1e-10) # calculation of uncertainty in momentum
p = del_p
E = p**2/(2*m_e*1.6e-19)# Calculation of energy in eV
print("Kinetic energy needed by an electron to be confined in electron in eV:"),round(E,2)

Example 2.8,page no:81
Kinetic energy needed by an electron to be confined in electron in eV: 0.96


## example 2.9;page no:82¶

In [8]:
#cal of Uncertainty in position of particle
#intiation of all variables
#given that
import math
v = 5e3 # Velocity of moving electron in m/s
v_error = 0.003 #Percentage error in measurement of velocity
m = 9.1e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.9,page no:82")
h_bar = h / (2*math.pi) # constant
p = m*v
del_p = v_error*p/100 # calculation of uncertainty in momentum
del_x = h_bar/(2*del_p) # Calculation of uncertainty in position
print("Uncertainty in position of particle in m:"),round(del_x,7)

Example 2.9,page no:82
Uncertainty in position of particle in m: 0.0003865


## example 2.10;page no:83¶

In [9]:
#cal of Kinetic energy needed by an electron to be confined in electron
#intiation of all variables
#given that
import math
r = 0.53 # radius of hydrogen atom in angstrom
m_e = 9.1e-31 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.10,page no:83")
h_bar = h / (2*math.pi) # constant
del_x = 2*r # calculation of uncertainty in position
del_p = h_bar/(2*del_x*1e-10) # calculation of uncertainty in momentum
p = del_p
E = p**2/(2*m_e*1.6e-19)# Calculation of energy in eV
print("Kinetic energy needed by an electron to be confined in electron in eV:"),round(E,3)
# When problem is solved by del_x*del_p = h_bar, then minimum value of kinetic energy will become 13.6eV

Example 2.10,page no:83
Kinetic energy needed by an electron to be confined in electron in eV: 0.851


## example 2.11;page no:84¶

In [10]:
#cal of Minimum error in measurement of energy
#intiation of all variables
#given that
import math
del_t = 2.5e-14 # lifetime in exited state in micro sec
h = 6.63e-34 # Plank constant
print("Example 2.11,page no:84")
h_bar = h / (2*math.pi) # constant
del_E = h_bar/(1.6e-19*del_t*1e-6) # calculation of uncertainty in momentum
print("Minimum error in measurement of energy of this state in eV:"),round(del_E,4)

Example 2.11,page no:84
Minimum error in measurement of energy of this state in eV: 26379.9318


## example 2.12;page no:84¶

In [11]:
#cal of Percentage error in momentum
#intiation of all variables
#given that
import math
E_eV = 0.5# kinetic energy of electron in KeV
del_x = 0.4 # Uncertainty in position in nm
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in kg
print("Example 2.12,page no:84")
h_bar = h / (2*math.pi) # constant
E_J = E_eV*1e3*1.6e-19
p = math.sqrt(2*m*E_J) # Calculation of momentum in kgm/s
del_p = h_bar/(2*del_x*1e-9) # Calculation of uncertainty in momentum
per_error = del_p*100 / p # calculation of percentage error in momentum
print("Percentage error in momentum in percent:"),round(per_error,2)
# Answer in book is 1.08 percentage

Example 2.12,page no:84
Percentage error in momentum in percent: 1.09


## example 2.13;page no:85¶

In [12]:
#cal of Uncertainty in velocity of particle
#intiation of all variables
#given that
import math
del_x = 2e-9 # Uncertainty in position in m
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in Kg
print("Example 2.13,page no:85")
h_bar = h / (2*math.pi) # constant
del_p = h_bar/(2*del_x) # Calculation of uncertainty in momentum
del_v = del_p/m
print("Uncertainty in velocity of particle in m/s:"),round(del_v,1)

Example 2.13,page no:85
Uncertainty in velocity of particle in m/s: 28988.9


## example 2.15;page no:87¶

In [18]:
#cal of Uncertainty in momentum of ball and Percentage error in calculation of momentum
#intiation of all variables
#given that
import math
del_x = 5000. # Uncertainty in position in angstrom
h = 6.63e-34 # Plank constant
m = 200. # mass of ball in gram
v = 6. # velocity of moving ball in m/s
print("Example 2.15,page no:87")
h_bar = h / (2.*math.pi) # constant
del_p = h_bar/(2.*del_x*1e-10) # Calculation of uncertainty in momentum
p = m*v # Calculation of momentum
per_error = del_p*1000./p # Calculation of percentage error in calculation of momentum
print("Uncertainty in momentum of ball in kgm/s:"),round(del_p,31)
print("Percentage error in calculation of momentum is:"),round(per_error,29)

Example 2.15,page no:87
Uncertainty in momentum of ball in kgm/s: 1.055e-28
Percentage error in calculation of momentum is: 9e-29


## example 2.16;page no:87¶

In [14]:
#cal of Uncertainty in position of particle
#intiation of all variables
#given that
import math
c = 3e8 # speed of light in m/s
v = c/10 # Velocity of moving proton in m/s
v_error = 1 # Percentage error in measurement of velocity
m = 1.67e-27 # mass of electron in kg
h = 6.63e-34 # Plank constant
print("Example 2.16,page no:87")
h_bar = h / (2*math.pi) # constant
del_v = v*v_error/100# calculation of uncertainty in position
del_x = h_bar/(2*m*del_v) # calculation of uncertainty in momentum
print("Uncertainty in position of particle in m:"),round(del_x,15)
# Answer in book is 1.04e-13 m

Example 2.16,page no:87
Uncertainty in position of particle in m: 1.05e-13


## example 2.17;page no:88¶

In [15]:
#cal of Uncertainty in velocity of ball
#intiation of all variables
#given that
import math
del_x = 1e-9 # Uncertainty in position in m
h = 6.63e-34 # Plank constant
m = 200 # mass of ball in gram
print("Example 2.17,page no:88")
h_bar = h / (2*math.pi) # constant
del_v = h_bar/(2*del_x*m/1000) # Calculation of uncertainty in momentum
print("Uncertainty in velocity of ball in m/s:"),round(del_v,27)
# Answer in book is 2.64e-25 m/s

Example 2.17,page no:88
Uncertainty in velocity of ball in m/s: 2.64e-25


## example 2.18;page no:89¶

In [16]:
#cal of Minimum error in measurement of energy
#intiation of all variables
#given that
import math
del_t = 2e-12 # lifetime of exited state in  sec
h = 6.63e-34 # Plank constant
print("Example 2.18,page no:89")
h_bar = h / (2*math.pi) # constant
del_E = h_bar/(1.6e-19*2*del_t) # calculation of uncertainty in momentum
print("Minimum error in measurement of energy of this state in eV:"),round(del_E,6)
# Answer in book is 1.65e-4 eV

Example 2.18,page no:89
Minimum error in measurement of energy of this state in eV: 0.000165


## example 2.19;page no:89¶

In [19]:
#cal of Minimum error in measurement of frequency of photon
#intiation of all variables
#given that
import math
del_t = 1e-8 # lifetime of exited state in  sec
h = 6.63e-34 # Plank constant
print("Example 2.19,page no:89")
h_bar = h / (2*math.pi) # constant
del_nu = h_bar/(2*del_t*h) # calculation of uncertainty in frequency
print("Minimum error in measurement of frequency of photon in per second:"),round(del_nu,1)
# Answer in book is 8e6 per second

Example 2.19,page no:89
Minimum error in measurement of frequency of photon in per second: 7957747.2


## example 2.20;page no:90¶

In [20]:
#cal of Uncertainty in position of ball
#intiation of all variables
#given that
import math
del_v = 5.5e-20 # Uncertainty in velocity in m/s
h = 6.63e-34 # Plank constant
m = 1 # mass of dust particle in mg
print("Example 2.20,page no:90")
h_bar = h / (2*math.pi) # constant
del_x = h_bar/(2*del_v*m*1e-6) # Calculation of uncertainty in momentum
print("Uncertainty in position of ball in angstrom:"),round(del_x*1e10,1)
# Answer in book is 9.6 angstrom

Example 2.20,page no:90
Uncertainty in position of ball in angstrom: 9.6


## example 2.21;page no:101¶

In [21]:
#cal of Energy of electron
#intiation of all variables
#given that
l = 1 # width of potential well in angstrom
n = 1 # order corresponding to ground state
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in Kg
print("Example 2.21,page no:101")
E = n**2*h**2/(8*m*(l*1e-10)**2) # Calculation of energy in Joule
E_eV = E/1.6e-19 # Calculation of energy in eV
print("Energy of electron in eV:"),round(E_eV,2)
# Answer in book is 37.74 eV angstrom

Example 2.21,page no:101
Energy of electron in eV: 37.74


## example 2.24;page no:103¶

In [22]:
#cal of Energy of electron for state
#intiation of all variables
#given that
l = 2.5e-10 # width of potential well in m
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in Kg
n1=1
n2=2
print("Example 2.24,page no:103")
E1 =n1**2*h**2/(8*m*l**2) # Calculation of energy in Joule
E2 =n2**2*h**2/(8*m*l**2) # Calculation of energy in Joule
E1_eV = E1/1.6e-19 # Calculation of energy in eV
E2_eV = E2/1.6e-19 # Calculation of energy in eV
print("Energy of electron for state in eV:"),round(E1_eV,2),round(E2_eV,2)

Example 2.24,page no:103
Energy of electron for state in eV: 6.04 24.15


## example 2.26;page no:105¶

In [23]:
#cal of Probability of finding electron
#intiation of all variables
#given that
import math
L = 1# let unit length
l1 = 0.45*L # initial point
l2 = 0.55*L # Final point
print("Example 2.26,page no:105")
p = (1/L)*((l2-(L/(2*math.pi) *math.sin(2*l2*math.pi/L)))- (l1-(L/(2*math.pi) *math.sin(2*l1*math.pi/L)))) # Calculation of probability of finding particle
p_per = p*100 # probability of finding particle in percentage
print("Probability of finding electron between L and L in percent:"),round(p_per,2)

Example 2.26,page no:105
Probability of finding electron between L and L in percent: 19.84


## example 2.27;page no:107¶

In [24]:
#cal of Difference between first state and ground state energies
#intiation of all variables
#given that
l = 1e-8 # width of potential well in cm
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in Kg
print("Example 2.27,page no:107")
E_1 = (h)**2/(8*m*(l*1e-2)**2) # Calculation of energy of ground state in Joule
E_1_eV = E_1/1.6e-19 # Calculation of energy in eV
E_2 = (2)**2*h**2/(8*m*(l*1e-2)**2) # Calculation of energy of first state in Joule
E_2_eV = E_2/1.6e-19 # Calculation of energy in eV
del_E = E_2_eV - E_1_eV # calculation of difference between first state and ground state
print("Difference between first state and ground state energies in eV:"),round(del_E,2)
# Answer in book is 113.04 eV

Example 2.27,page no:107
Difference between first state and ground state energies in eV: 113.21


## example 2.28;page no:107¶

In [25]:
#cal of de-broglie wave length and energy of electron
#intiation of all variables
#given that
l = 1 # width of potential well in angstrom
h = 6.63e-34 # Plank constant
m = 9.1e-31 # mass of electron in Kg
print("Example 2.28,page no:107")
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
E1 = n1**2*h**2/(8*m*(l*1e-10)**2) # Calculation of energy in Joule
E2 = n2**2*h**2/(8*m*(l*1e-10)**2) # Calculation of energy in Joule
E3 = n3**2*h**2/(8*m*(l*1e-10)**2) # Calculation of energy in Joule
E1_eV = E1/1.6e-19 # Calculation of energy in eV
E2_eV = E2/1.6e-19 # Calculation of energy in eV
E3_eV = E3/1.6e-19 # Calculation of energy in eV
print("For state: Energy in eV & wavelength in angstrom:"),lamda1,lamda2,lamda3,round(E1_eV,1),round(E2_eV,1),round(E3_eV,1)

Example 2.28,page no:107
For state: Energy in eV & wavelength in angstrom: 2 1 0.666666666667 37.7 151.0 339.6


## example 2.29;page no:108¶

In [26]:
#cal of Energy state  E of ball
#intiation of all variables
#given that
#import math
m = 1000. #mass of ball in gram
l = 1. # length of box in m
h = 6.63e-34 # Plank constant
n1=1
n2=2
n3=3
print("Example 2.29;page no:108")
#for n in range(1,3):
E1 = (n1**2*h**2)/(8*m*1e-3*l**2*1.6e-19)
E2 = (n2**2*h**2)/(8*m*1e-3*l**2*1.6e-19)
E3 = (n3**2*h**2)/(8*m*1e-3*l**2*1.6e-19)
print("Energy state  E of ball in eV:"),E1,E2,E3
print("As energy difference is very small so we cannot see energy states:")

Example 2.29;page no:108
Energy state  E of ball in eV: 3.4341328125e-49 1.373653125e-48 3.09071953125e-48
As energy difference is very small so we cannot see energy states:


# example 2.30;page no:109¶

In [27]:
#cal of Probability of finding particle at centre
#intiation of all variables
#given that
import math
l = 30. # width of potential well in angstrom
x = l/2.
del_x = 2. # interval of length at centre in angstrom
h = 6.63e-34 # Plank constant
n = 1. # ground state
print("Example 2.30,page no:109")
phi_x = ((math.sqrt(2/l))*math.sin(n*math.pi*x/l))**2
p = phi_x*del_x # Calculation of probability at centre
print("Probability of finding particle at centre in percent:"),round(p*100,1)
# Answer given in book is 16 percent. It is due to wrong calculation

Example 2.30,page no:109
Probability of finding particle at centre in percent: 13.3