summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter7.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics/chapter7.ipynb')
-rwxr-xr-xEngineering_Physics/chapter7.ipynb912
1 files changed, 912 insertions, 0 deletions
diff --git a/Engineering_Physics/chapter7.ipynb b/Engineering_Physics/chapter7.ipynb
new file mode 100755
index 00000000..b30ad5a1
--- /dev/null
+++ b/Engineering_Physics/chapter7.ipynb
@@ -0,0 +1,912 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:43ad060be6803a5e6c90770bf46ae3612188f9380f800bb70a03161cb97405cb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter7:WAVE MECHANICS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.1:pg-200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate de Broglie wavelength \n",
+ "v=1.5*10**7 #velocity of proton =(1/20)*velocity of light i.e.3*10**8 in m/s\n",
+ "m=1.67*10**-27 #mass of the proton in kg\n",
+ "h=6.6*10**-34 #plank's constant \n",
+ "lamda=h/(m*v)\n",
+ "print \"the de Broglie wavelength is lamda=\",\"{:.3e}\".format(lamda),\"m\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the de Broglie wavelength is lamda= 2.635e-14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.2:pg-200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate de Broglie wavelength\n",
+ "#mo*c**2=1.507*10**-10/1.6*10**-19=941.87 Mev\n",
+ "#since 12.8 Mev is very small compared to rest mass energy hence relavistic consideration may be ignored\n",
+ "m=1.67*10**-27 #mass in kg\n",
+ "h=6.62*10**-34 #plank's constant\n",
+ "E=12.8*10**6 #energy in Mev\n",
+ "lamda=h/math.sqrt(2*m*E*1.6*10**-19)/(1e-10)\n",
+ "print \"the de Broglie wavelength is lamda=\",round(lamda,5),\"angstrom\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the de Broglie wavelength is lamda= 8e-05 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.4:pg-201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength\n",
+ "h=6.6*10**-34 #plank's constant\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "E=1.25*10**3 #pottential difference keV\n",
+ "lamda=h/math.sqrt(2*m*E*1.6*10**-19)\n",
+ "print \"the wavelength is lamda=\",\"{:.2e}\".format(lamda),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the wavelength is lamda= 3.46e-11 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.5:pg-201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate kinetic energy of an electron \n",
+ "h=6.63*10**-34 #plank's constant\n",
+ "mo=9.1*10**-31 #rest mass of an electron in kg\n",
+ "lamda=5896*10**-10 #wavelength in angstrom\n",
+ "K=(h**2)/(2*mo*(lamda**2)*1.6*10**-19) \n",
+ "print \"kinetic energy of an electron is K=\",\"{:.2e}\".format(K),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "kinetic energy of an electron is K= 4.34e-06 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.6:pg-202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate the wavelength of an electron of kinetic energy\n",
+ "mo=9.1*10**-31 #mass of an electron in kg\n",
+ "c=3*10**8 #speed of light in m/s \n",
+ "K=1*10**6#kinetic energy in eV\n",
+ "h=6.62*10**-34 #planck's constant in J-s\n",
+ "#E=moc**2=81.9*10**-15/1.6*10**-19 eV=0.51MeV\n",
+ "E=0.51*10**6\n",
+ "lamda=(h*c)/(math.sqrt(K*(K+2*E))*1.6*10**-19)\n",
+ "print \"wavelength of an electron of kinetic energy is lamda=\",round(lamda,14),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of an electron of kinetic energy is lamda= 8.7e-13 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.7:pg-203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate de Broglie wavelength\n",
+ "V=100 #potential difference in volts\n",
+ "lamda=12.25/math.sqrt(V)\n",
+ "print \"de Broglie wavelength of any electron is lamda=\",lamda,\"angstrom\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of any electron is lamda= 1.225 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.9:pg-203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate energy of the neutron\n",
+ "h=6.60*10**-34 #plank's constant in J/s\n",
+ "m=1.674*10**-27 #mass of the neutron in kg\n",
+ "lamda=10**-10 #de Broglie wavelength in m\n",
+ "E=(h**2)/(2*m*(lamda**2)*1.6*10**-19)\n",
+ "print \"energy of the neutron is E=\",\"{:.2e}\".format(E),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of the neutron is E= 8.13e-02 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.10:pg-204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength\n",
+ "h=6.6*10**-34 #plank's constant in J/sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "c=3*10**8 #light speed in m/s\n",
+ "lamda=h/(m*c)/(1e-10) # in angstrom\n",
+ "print \"wavelength of quantum of radiant energy is lamda=\",round(lamda,4),\"angstrom\"\n",
+ "#to calculate number of photons \n",
+ "power=12 #power emitted by the lamp =150*(8/100) in watts\n",
+ "E=12.0 #energy emitted per second\n",
+ "lamda=4500*10.0**-10\n",
+ "energy=(h*c)/lamda #energy contained in one photon in J\n",
+ "number=E/energy\n",
+ "print \"number of photons emitted per sec is number=\",round(number,-16),\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of quantum of radiant energy is lamda= 0.0242 angstrom\n",
+ "number of photons emitted per sec is number= 2.727e+19 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.11:pg-209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in position\n",
+ "#actual formula is (delx)min*(delp)max=h/2*math.pi-------------eq(1)\n",
+ "#(delp)max=p(momentum of the electron)\n",
+ "#mv=mov/math.sqrt(1-(v/c)**2)---------------------eq(2)\n",
+ "mo=9*10**-31 #mass of an electron in m/s\n",
+ "c=3*10**8 #light speed in m/s\n",
+ "v=3*10**7 #velocity in m/s \n",
+ "h=6.6*10**-34 #plank's constant in J/s\n",
+ "#from eq(1) and eq(2),we get\n",
+ "delxmin=(h*math.sqrt(1-(v/c)**2))/(2*math.pi*mo*v)\n",
+ "print \"smallest possible uncertainity in the position of an electron is delxmin=\",round(delxmin/1e-10,4),\"angstrom\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "smallest possible uncertainity in the position of an electron is delxmin= 0.0389 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.12:pg-209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate minimum uncertainity in the velocity\n",
+ "delxmax=10**-8 #maximum uncertainity in position in m\n",
+ "h=6.626*10**-34 #planck's constant\n",
+ "delpmin=h/(2*math.pi*delxmax) #minimum uncertainity in momentum in kg-m/s**2 \n",
+ "m=9*10**-31 #mass of an electron in kg\n",
+ "delvmin=delpmin/m\n",
+ "print \"minimum uncertainity in the velocity is delvmin=\",\"{:.2e}\".format(delvmin),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainity in the velocity is delvmin= 1.17e+04 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.13:pg-209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in the momentum of the parcticle \n",
+ "h=6.626*10**-34 #planck's constant J-s\n",
+ "delx=0.01*10**-2 #uncertainity in position in m\n",
+ "delp=h/(2*math.pi*delx)\n",
+ "print \"uncertainity in the momentum of the parcticle is delp=\",\"{:.2e}\".format(delp),\"kg-m/s**2\"\n",
+ "#to calculate uncertainity in the velocity of an electron\n",
+ "m=9*10**-31 #mass of an electron in kg\n",
+ "delx=5*10**-10 \n",
+ "delv=h/(2*math.pi*m*delx)\n",
+ "print \"uncertainity in the velocity of an electron is delv=\",\"{:.3e}\".format(delv),\"m/s\"\n",
+ "#to calculate uncertainity in the velocity of alpha particle \n",
+ "m=4*1.67*10**-27 #mass of alpha particle in kg\n",
+ "delx=5*10**-10\n",
+ "delv=h/(2*math.pi*m*delx)\n",
+ "print \"uncertainity in the velocity of an electron is delv=\",round(delv,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainity in the momentum of the parcticle is delp= 1.05e-30 kg-m/s**2\n",
+ "uncertainity in the velocity of an electron is delv= 2.343e+05 m/s\n",
+ "uncertainity in the velocity of an electron is delv= 31.57 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.14:pg-210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in position\n",
+ "m=9.11*10**-31 #mass of electron in kg\n",
+ "delv=40 #uncertainity in velocity in m/s\n",
+ "h=6.6*10**-34 #plank's constant \n",
+ "delx=h/(2*math.pi*m*delv)\n",
+ "print \"uncertainity in the position of the electron is delx=\",\"{:.2e}\".format(delx),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainity in the position of the electron is delx= 2.88e-06 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.15:pg-210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in frequency\n",
+ "#delE*delt=h/2*math.pi----eq(1)\n",
+ "#delE=h*delv-----------eq(2)\n",
+ "delt=10**-8 #uncertainity in time in s\n",
+ "#from eq(1) and eq(2),we get\n",
+ "delnu=1/(2*math.pi*delt)\n",
+ "print \"minimum uncertainity in the frequency of the photon is delv=\",\"{:.3e}\".format(delnu),\"sec**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainity in the frequency of the photon is delv= 1.592e+07 sec**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.16:pg-211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in the energy\n",
+ "h=6.63*10**-34 #plank's constant in J-s\n",
+ "delt=2.5*10**-14 #uncertainity in time in s\n",
+ "delE=h/(2*math.pi*delt*1.6*10**-19)\n",
+ "print \"minimum error with which the energy of the state can be measured is delE=\",round(delE,3),\"ev\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum error with which the energy of the state can be measured is delE= 0.026 ev\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.17:pg-211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate time required for the atomic system \n",
+ "#delE=h*c*dellamda/lamda**2 -----eq(1)\n",
+ "#delE*delt=h/2*math.pi----------eq(2)\n",
+ "dellamda=10**-14\n",
+ "c=3*10**8\n",
+ "lamda=6*10**-7\n",
+ "#from eq(1)and eq(2),we get\n",
+ "delt=(lamda**2)/(2*math.pi*c*dellamda)\n",
+ "print \"time required for the atomic system to retain rotational energy is delt=\",\"{:.1e}\".format(delt),\"s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time required for the atomic system to retain rotational energy is delt= 1.9e-08 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.18:pg-211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate minimum uncertainity in the momentum \n",
+ "delxmax=5*10**-14 #uncertainity in position in m\n",
+ "h=6.626*10**-34 #plank's constant in Js\n",
+ "delpmin=h/(2*math.pi*delxmax)\n",
+ "print \"minimum uncertainity in the momentum of the nucleon is delpmin=\",\"{:.2e}\".format(delpmin),\"kg m/s\"\n",
+ "m=1.675*10**-27 #mass in kg\n",
+ "Emin=(delpmin**2)/(2*m*1.6*10**-19)\n",
+ "print \"minimum kinetic energy of the nucleon is Emin=\",round(Emin,2),\"eV\"\n",
+ "#the answer is given wrong in the book Emin=0.039 eV\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainity in the momentum of the nucleon is delpmin= 2.11e-21 kg m/s\n",
+ "minimum kinetic energy of the nucleon is Emin= 8299.24 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.19:pg-212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in velocity\n",
+ "delx=1.1*10**-8 #uncertainity in velocity in m\n",
+ "h=6.626*10**-34 #plank's constant\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "delv=h/(2*math.pi*m*delx)\n",
+ "print \"minimum uncertainity in velocity is delv=\",\"{:.2e}\".format(delv),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainity in velocity is delv= 1.05e+04 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.20:pg-212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate uncertainity in frequency\n",
+ "delt=10**-8 #uncertainity in time\n",
+ "delnu=1/(2*math.pi*delt) \n",
+ "print \"minimum uncertainity in the frequency of a photon is delnu=\",\"{:.2e}\".format(delnu),\"sec**-1\"\n",
+ "#to use the uncertainity principle to place a lower limit on the energy an electron must have if it is to be part of a nucleus\n",
+ "delx=5*10**-15 #uncertainity in position\n",
+ "delp=h/(2*2*math.pi*delx) #uncertainbity in momentum\n",
+ "c=3*10**8 #/speed of light in m/s\n",
+ "E=delp*c\n",
+ "print \"energy of an electron is E=\",\"{:.2e}\".format(E),\"J\"\n",
+ "\n",
+ "# the answer is slightlty different due to approximation in textboook\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainity in the frequency of a photon is delnu= 1.59e+07 sec**-1\n",
+ "energy of an electron is E= 3.16e-12 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.22:pg-223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate probability of finding the particle\n",
+ "a=25*10**-10#width in angstrom \n",
+ "#wave function of the particle is chi(x)=math.sqrt(2/a)*math.sin(n*math.pi*x/a),for the particle in the least energy state n=1\n",
+ "chix=math.sqrt(2/a)*math.sin(math.pi*(a/2)/a)\n",
+ "delx=5*10**-10 #interval in angstrom\n",
+ "P=delx*chix**2\n",
+ "print \"probability of finding the particle is P=\",P,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability of finding the particle is P= 0.4 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.24:pg-224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate energy of an electron\n",
+ "n=1 #least energy of the particle \n",
+ "h=6.63*10**-34 #planck's constant in Js\n",
+ "m=9.11*10**-31 #mass of electron in kg\n",
+ "a=10**-10 #width in angstrom\n",
+ "E=(n**2)*(h**2)/(8*m*(1.602*10**-19)*a**2)\n",
+ "print \"energy of an electron moving in one dimension in an infinitely high potential box is E=\",round(E,2),\"eV\"\n",
+ "#the answer is given wrong in the book E=5.68 eV\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of an electron moving in one dimension in an infinitely high potential box is E= 37.65 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.26:pg-225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate probability\n",
+ "x1=0.45 #x1=0.45*L\n",
+ "x2=0.55 #x2=0.55*L\n",
+ "n=1 #for ground state \n",
+ "#formula is P=integrate('(2/L)*math.sin(n*math.pi*x)**2),'x',x1,x2)\n",
+ "from scipy.integrate import quad\n",
+ "def integrand(x):\n",
+ " return 2*(math.sin(n*math.pi*x)**2)\n",
+ "P1 ,er=quad(integrand,x1,x2)\n",
+ "\n",
+ "print \"P1=\",round(P1,3),\"unitless\"\n",
+ "probability1=P1*100\n",
+ "print \"probability for the ground states is probability1 =\",round(probability1,1),\"%\"\n",
+ "n=2 #for first excited state\n",
+ "P2, er=quad(integrand,x1,x2)\n",
+ "print \"P2=\",round(P2,4),\"unitless\"\n",
+ "probability2=P2*100 \n",
+ "print \"probability for first excited states is probability2=\",round(probability2,2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P1= 0.198 unitless\n",
+ "probability for the ground states is probability1 = 19.8 %\n",
+ "P2= 0.0065 unitless\n",
+ "probability for first excited states is probability2= 0.65 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.28:pg-226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate energy of a neutron\n",
+ "#consider nucleus as a cubical box of size 10**-14m\n",
+ "#x=y=z=a=10**-14=l\n",
+ "#for neutron to be in the lowest energy state nx=ny=nz=1\n",
+ "#formula is E=(math.pi**2*h**2/8*math.pi**2*m)*((nx/lx)**2+(ny/ly)**2+(nz/lz)**2)\n",
+ "h=6.626*10**-34 #planck's constant in Js\n",
+ "m=1.6*10**-27 #mass in kg\n",
+ "l=10**-14 #in m\n",
+ "E=(math.pi**2)*(h**2)*3/(4*(math.pi**2)*2*m*(1.6*10**-19)*l**2)\n",
+ "print \"lowest energy of a neutron is E=\",round(E/(1e6),2),\"MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest energy of a neutron is E= 6.43 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.29:pg-226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate zero point energy of a linear harmonic oscillator\n",
+ "h=6.63*10**-34 #planck's constant in Js\n",
+ "nu=50 #frequency in Hz\n",
+ "zeropointenergy=(h*nu)/2\n",
+ "print \"zeropointenergy=\",\"{:.2e}\".format(zeropointenergy),\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "zeropointenergy= 1.66e-32 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.30:pg-226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate zero point energy\n",
+ "nu=1 #frequency in Hz\n",
+ "h=6.63*10**-34 #planck's constant in Js\n",
+ "zeropointenergy=(h*nu)/2\n",
+ "print \"zeropointenergy=\",zeropointenergy,\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "zeropointenergy= 3.315e-34 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.31:pg-226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate frequency of vibration\n",
+ "En=0.1*1.6*10**-19 #energy of a linear harmonic oscillator in eV\n",
+ "n=3.0 #third excited state\n",
+ "h=6.63*10**-34 #planck's constant\n",
+ "nu=En/((n+(1/2.0))*h)\n",
+ "print \"the frequency of vibration is nu=\",round(nu,-9),\"Hz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the frequency of vibration is nu= 6.895e+12 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file