import scipy
import math
from scipy.integrate import quad
#Variable declaration
alpha = 1; # For simplicity assume alpha to be unity
#Calculations&Results
p = lambda x: math.sqrt(alpha)*math.exp(-2*alpha*x) # Probability that the particle lies between 0 and 1/alpha
integ, err = scipy.integrate.quad(p,0,1/alpha)
print "The probability that the particle lies between 0 and 1/alpha = %5.3f"%integ
p = lambda x: math.sqrt(alpha)*math.exp(-2*alpha*x)
integ, err = scipy.integrate.quad(p,1/alpha,2/alpha) # Probability that the particle lies between 1/alpha and 2/alpha
print "The probability that the particle lies between 1/alpha and 2/alpha = %5.3f"%integ
import math
#Variable declaration
h = 6.62e-034; # Planck's constant, Js
h_bar = h/(2*math.pi); # Reduced Planck's constant, Js
c = 3.00e+008; # Speed of light, m/s
e = 1.602e-019; # Energy equivalent of 1 eV, J
m = 938.3e+006; # Energy equivalent of proton mass, eV
L = 1e-005; # Diameter of the nucleus, nm
#Calculations
E1 = math.pi**2*(h_bar*c/(e*1e-009))**2/(2*L**2*m*1e+006); # Energy of the ground state of proton, MeV
E2 = 4*E1; # Energy of first excited state of proton, MeV
delta_E = E2 -E1; # Transition energy of the proton inside the nucleus, MeV
#Result
print "The transition energy of the proton inside the nucleus = %1d MeV"%delta_E
import math
#Variable declaration
h = 6.62e-034; # Planck's constant, Js
h_bar = h/(2*math.pi); # Reduced Planck's constant, Js
c = 3.00e+008; # Speed of light, m/s
e = 1.602e-019; # Energy equivalent of 1 eV, J
m = 0.511e+006; # Energy equivalent of electron rest mass, eV
V0 = 10; # Height of potential barrier, eV
E = 5; # Energy of the incident electrons, eV
L = 0.8e-009; # Width of the potential barrier, m
#Calculations
k = math.sqrt(2*m*(V0 - E))*e/(h_bar*c); # Schrodinger's constant, per m
T = (1 + V0**2*math.sinh(k*L)**2/(4*E*(V0 - E)))**(-1); # Transmission electron probability
#Result
print "The fraction of electrons tunnelled through the barrier = %3.1e"%T
import math
#Variable declaration
h = 6.62e-034; # Planck's constant, Js
h_bar = h/(2*math.pi); # Reduced Planck's constant, Js
c = 3.00e+008; # Speed of light, m/s
e = 1.602e-019; # Energy equivalent of 1 eV, J
m = 0.511e+006; # Energy equivalent of electron rest mass, eV
V0 = 10; # Height of potential barrier, eV
#Calculations
Sum_M = 0;
i = 1;
for E in range(1,5): # Range of energies of the incident electrons, eV
M = 16*E/V0*(1-E/V0); # All the factors multiplying the exponential term
Sum_M = Sum_M + M; # Accumulator
i = i + 1;
E = 5; # Given energy of the incident electrons, eV
M = int(Sum_M/i); # Average value of M
L = 0.8e-009; # Width of the potential barrier, m
k = math.sqrt(2*m*(V0 - E))*e/(h_bar*c); # Schrodinger's constant, per m
T = M*math.exp(-2*k*L); # Transmission electron probability
#Result
print "The fraction of electrons tunnelled through the barrier = %3.1e"%T
import math
#Variable declaration
h = 6.62e-034; # Planck's constant, Js
h_bar = h/(2*math.pi); # Reduced Planck's constant, Js
c = 3.00e+008; # Speed of light, m/s
e = 1.602e-019; # Energy equivalent of 1 eV, J
m = 0.511e+006; # Energy equivalent of electron rest mass, eV
V0 = 10; # Height of potential barrier, eV
E = 5; # Given energy of the incident electrons, eV
#Calculations
l = h_bar*c/(2*math.sqrt(2*m*(V0 - E))*1e-009*e); # Penetration distance into the barrier when the probability of the particle penetration drops to 1/e, nm
#Result
print "The penetration distance for a %d eV electron approaching a step barrier of %d eV = %5.3f nm"%(E, V0, l)
import math
#Variable declaration
h = 6.62e-034; # Planck's constant, Js
h_bar = h/(2*math.pi); # Reduced Planck's constant, Js
c = 3.00e+008; # Speed of light, m/s
e = 1.602e-019; # Charge on an electron, C
k = 9e+009; # Coulomb constant, N-Sq.m./C^2
m = 3727; # Energy equivalent of alpha particle rest mass, MeV
E = 5; # Given energy of the incident electrons, eV
Z1 = 2; # Atomic number of an alpha particle
Z2 = 92; # Atomic number of the U-238 nucleus
r_N = 7e-015; # Nuclear radius, m
K = 4.2; # Kinetic energy of alpha particle, MeV
#Calculations
V_C = Z1*Z2*e**2*k/(r_N*e*1e+006); # Coulomb Potential, MeV
r_prime = V_C*r_N/(K*1e-015); # Distance through which the alpha particle must tunnel, fm
kapa = math.sqrt(2*m*(V_C-E))*e/(h_bar*c*1e-006); # Schronginger's Constant, per m
L = r_prime - r_N/1e-015; # Barrier width, fm
T = 16*(K/V_C)*(1-K/V_C)*math.exp(-2*kapa*L*1e-015); # Tunnelling probability of alpha particle
V_C_new = V_C/2; # Potential equal to half the Coulomb potential, MeV
L = L/2; # Width equal to half the barrier width, fm
kapa = math.sqrt(2*m*(V_C_new-E))*e/(h_bar*c*1e-006); # Schronginger's Constant, per m
T_a = 16*(K/V_C_new)*(1-K/V_C_new)*math.exp(-2*kapa*L*1e-015); # Approximated tunnelling probability of alpha particle
v = math.sqrt(2*K/m)*c; # Speed of the alpha particle, m/s
t = r_N/v; # Time taken by alpha particle to cross the U-238 nucleus, s
#Results
print "The barrier height = %2d MeV"%(math.ceil(V_C))
print "The distance that alpha particle must tunnel = %2d fm"%r_prime
print "The tunnelling potential assuming square-top potential = %1.0e"%T
print "The approximated tunnelling potential = %3.1e"%T_a
print "The speed of the alpha particle = %3.1e m/s"%v
print "The time taken by alpha particle to cross the U-238 nucleus = %1.0e s"%t
# Some answers are given wrong in the textbook for this problem