diff options
Diffstat (limited to 'Engineering_Physics_Marikani/Chapter_4.ipynb')
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_4.ipynb | 518 |
1 files changed, 470 insertions, 48 deletions
diff --git a/Engineering_Physics_Marikani/Chapter_4.ipynb b/Engineering_Physics_Marikani/Chapter_4.ipynb index 02198aef..d2b8123c 100644 --- a/Engineering_Physics_Marikani/Chapter_4.ipynb +++ b/Engineering_Physics_Marikani/Chapter_4.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 4" + "name": "", + "signature": "sha256:e581747b76e15afc0096179446c0fbd68c3566f21f4931be3d8fc722fc1225b8" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Quantum Physics" + "source": [ + "Quantum Physics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.1, Page number 133 " + "source": [ + "Example number 4.1, Page number 133 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the change in wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=135; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n\n#Result\nprint(\"change in wavelength in metres is\",delta_lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=135; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "\n", + "#Result\n", + "print(\"change in wavelength in metres is\",delta_lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + "text": [ + "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + ] } ], "prompt_number": 6 @@ -38,19 +63,65 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.2, Page number 134 " + "source": [ + "Example number 4.2, Page number 134 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength,energy and angle\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nlamda=2; #wavelength in angstrom\nlamdaA=lamda*10**-10; #converting lamda from Angstrom to m\nphi=90; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\ndelta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\nlamda_dash=delta_lamda+lamda;\nlamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n#energy E=h*new-h*new_dash\nE=h*c*((1/lamdaA)-(1/lamdaA_dash));\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nnew=c/lamda;\nnew_dash=c/lamda_dash;\ntheta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\ntheta=theta*57.2957795; #converting radians to degrees\n\n#Result\nprint(\"change in compton shift in Angstrom is\",delta_lamda);\nprint(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\nprint(\"energy of recoiling electron in J is\",E);\nprint(\"energy of recoiling electron in eV is\",EeV);\nprint(\"angle at which recoiling electron appears in degrees is\",int(theta));\n\n#answers given in the book are wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=2; #wavelength in angstrom\n", + "lamdaA=lamda*10**-10; #converting lamda from Angstrom to m\n", + "phi=90; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\n", + "lamda_dash=delta_lamda+lamda;\n", + "lamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n", + "#energy E=h*new-h*new_dash\n", + "E=h*c*((1/lamdaA)-(1/lamdaA_dash));\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "new=c/lamda;\n", + "new_dash=c/lamda_dash;\n", + "theta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\n", + "theta=theta*57.2957795; #converting radians to degrees\n", + "\n", + "#Result\n", + "print(\"change in compton shift in Angstrom is\",delta_lamda);\n", + "print(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\n", + "print(\"energy of recoiling electron in J is\",E);\n", + "print(\"energy of recoiling electron in eV is\",EeV);\n", + "print(\"angle at which recoiling electron appears in degrees is\",int(theta));\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in compton shift in Angstrom is', 0.02429)\n('wavelength of scattered photons in Angstrom is', 2.02429)\n('energy of recoiling electron in J is', 1.1933272900621974e-17)\n('energy of recoiling electron in eV is', 74.482)\n('angle at which recoiling electron appears in degrees is', 45)\n" + "text": [ + "('change in compton shift in Angstrom is', 0.02429)\n", + "('wavelength of scattered photons in Angstrom is', 2.02429)\n", + "('energy of recoiling electron in J is', 1.1933272900621974e-17)\n", + "('energy of recoiling electron in eV is', 74.482)\n", + "('angle at which recoiling electron appears in degrees is', 45)\n" + ] } ], "prompt_number": 10 @@ -59,19 +130,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.3, Page number 135" + "source": [ + "Example number 4.3, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength of the scattered photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=60; #angle of scattering in degrees\nphi=phi*0.0174532925; #converting degrees to radians\nE=10**6; #energy of photon in eV\nE=E*1.6*10**-19; #converting eV into J\n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting metre to angstrom\ndelta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\nlamda=(h*c)/E;\nlamdaA=lamda*10**10; #converting metre to angstrom\nlamda_dash=delta_lamda+lamdaA;\nlamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"compton shift in angstrom is\",delta_lamda);\nprint(\"energy of incident photon in m\",lamda);\nprint(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n\n#answer for wavelength of scattered photon given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=60; #angle of scattering in degrees\n", + "phi=phi*0.0174532925; #converting degrees to radians\n", + "E=10**6; #energy of photon in eV\n", + "E=E*1.6*10**-19; #converting eV into J\n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting metre to angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "lamda=(h*c)/E;\n", + "lamdaA=lamda*10**10; #converting metre to angstrom\n", + "lamda_dash=delta_lamda+lamdaA;\n", + "lamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"compton shift in angstrom is\",delta_lamda);\n", + "print(\"energy of incident photon in m\",lamda);\n", + "print(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n", + "\n", + "#answer for wavelength of scattered photon given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('compton shift in angstrom is', 0.0122)\n('energy of incident photon in m', 1.242375e-12)\n('wavelength of scattered photons in angstrom is', 0.025)\n" + "text": [ + "('compton shift in angstrom is', 0.0122)\n", + "('energy of incident photon in m', 1.242375e-12)\n", + "('wavelength of scattered photons in angstrom is', 0.025)\n" + ] } ], "prompt_number": 13 @@ -80,19 +187,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.4, Page number 135" + "source": [ + "Example number 4.4, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of photons emitted\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=5893; #wavelength in angstrom\nP=60; #output power in Watt\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\nN=P/E;\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in eV is\",EeV);\nprint(\"number of photons emitted per se cond is\",N);\n\n#answer for energy in eV given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=5893; #wavelength in angstrom\n", + "P=60; #output power in Watt\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\n", + "N=P/E;\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in eV is\",EeV);\n", + "print(\"number of photons emitted per se cond is\",N);\n", + "\n", + "#answer for energy in eV given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 3.373154590191753e-19)\n('energy of photon in eV is', 2.1054)\n('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + "text": [ + "('energy of photon in J is', 3.373154590191753e-19)\n", + "('energy of photon in eV is', 2.1054)\n", + "('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + ] } ], "prompt_number": 15 @@ -101,19 +239,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.5, Page number 136" + "source": [ + "Example number 4.5, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the momentum, energy and mass of a photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=10; #wavelength in angstrom\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=EeV*10**-3; #converting eV to keV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nP=h/lamda;\nM=h/(lamda*c);\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in keV is\",EeV);\nprint(\"momentum in kg m/sec is\",P);\nprint(\"mass of photon in kg is\",M);\n\n#answer for energy of photon in keV given in the book is wrong by 1 decimal", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=10; #wavelength in angstrom\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=EeV*10**-3; #converting eV to keV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "P=h/lamda;\n", + "M=h/(lamda*c);\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in keV is\",EeV);\n", + "print(\"momentum in kg m/sec is\",P);\n", + "print(\"mass of photon in kg is\",M);\n", + "\n", + "#answer for energy of photon in keV given in the book is wrong by 1 decimal" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 1.9878e-16)\n('energy of photon in keV is', 1.241)\n('momentum in kg m/sec is', 6.626e-25)\n('mass of photon in kg is', 2.2086666666666664e-33)\n" + "text": [ + "('energy of photon in J is', 1.9878e-16)\n", + "('energy of photon in keV is', 1.241)\n", + "('momentum in kg m/sec is', 6.626e-25)\n", + "('mass of photon in kg is', 2.2086666666666664e-33)\n" + ] } ], "prompt_number": 18 @@ -122,19 +294,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.6, Page number 136" + "source": [ + "Example number 4.6, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\ne=1.602*10**-19;\nV=1.25; #potential difference in kV\n\n#Calculation\nV=V*10**3; #converting kV to V\nlamda=h/math.sqrt(2*m*e*V);\nlamda=lamda*10**10; #converting metre to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.602*10**-19;\n", + "V=1.25; #potential difference in kV\n", + "\n", + "#Calculation\n", + "V=V*10**3; #converting kV to V\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "lamda=lamda*10**10; #converting metre to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.3471)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.3471)\n" + ] } ], "prompt_number": 21 @@ -143,19 +339,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.7, Page number 136" + "source": [ + "Example number 4.7, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nE=45; #energy of electron in eV\nE=E*1.6*10**-19; #energy in J\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/math.sqrt(2*m*E);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E=45; #energy of electron in eV\n", + "E=E*1.6*10**-19; #energy in J\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 1.8305)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 1.8305)\n" + ] } ], "prompt_number": 24 @@ -164,19 +381,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.8, Page number 137" + "source": [ + "Example number 4.8, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nv=10**7; #velocity of electron in m/sec\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/(m*v);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "v=10**7; #velocity of electron in m/sec\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/(m*v);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.7282)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.7282)\n" + ] } ], "prompt_number": 25 @@ -185,19 +423,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.9, Page number 137" + "source": [ + "Example number 4.9, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength of alpha particle\n\n#importing modules\nimport math\n\n#Variable declaration\nV=1000; #potential difference in V\nh=6.626*10**-34; #plancks constant in Js\nm=1.67*10**-27; #mass of proton in kg\ne=1.6*10**-19; #charge of electron in J\n\n#Calculation\nlamda=h/math.sqrt(2*m*e*V);\n\n#Result\nprint(\"de Broglie wavelength of alpha particle in metre is\",lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "V=1000; #potential difference in V\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=1.67*10**-27; #mass of proton in kg\n", + "e=1.6*10**-19; #charge of electron in J\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength of alpha particle in metre is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + "text": [ + "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + ] } ], "prompt_number": 26 @@ -206,19 +465,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.10, Page number 138" + "source": [ + "Example number 4.10, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of finding the particle\n\n#importing modules\nimport math\n\n#Variable declaration\nL=25; #width of potential in armstrong\ndelta_x=0.05; #interval in armstrong\nn=1; #particle is in its least energy\nx=L/2; #particle is at the centre\npi=180; #angle in degrees\n\n#Calculation\npi=pi*0.0174532925; #angle in radians\nL=L*10**-10; #width in m\ndelta_x=delta_x*10**-10; #interval in m\n#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n#but A=math.sqrt(2/L)\n#since the particle is in a small interval integration need not be applied\n#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\nP=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\nP=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of finding the particle is\",P);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "L=25; #width of potential in armstrong\n", + "delta_x=0.05; #interval in armstrong\n", + "n=1; #particle is in its least energy\n", + "x=L/2; #particle is at the centre\n", + "pi=180; #angle in degrees\n", + "\n", + "#Calculation\n", + "pi=pi*0.0174532925; #angle in radians\n", + "L=L*10**-10; #width in m\n", + "delta_x=delta_x*10**-10; #interval in m\n", + "#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n", + "#but A=math.sqrt(2/L)\n", + "#since the particle is in a small interval integration need not be applied\n", + "#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\n", + "P=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\n", + "P=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of finding the particle is\",P);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of finding the particle is', 0.004)\n" + "text": [ + "('probability of finding the particle is', 0.004)\n" + ] } ], "prompt_number": 27 @@ -227,19 +515,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.11, Page number 138" + "source": [ + "Example number 4.11, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of electron in eV\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=((n**2)*h**2)/(8*m*L**2);\nEeV=E/(1.6*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of electron in J is\",E);\nprint(\"lowest energy of electron in eV is\",EeV);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=((n**2)*h**2)/(8*m*L**2);\n", + "EeV=E/(1.6*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in J is\",E);\n", + "print(\"lowest energy of electron in eV is\",EeV);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in J is', 6.030752197802197e-18)\n('lowest energy of electron in eV is', 37.693)\n" + "text": [ + "('lowest energy of electron in J is', 6.030752197802197e-18)\n", + "('lowest energy of electron in eV is', 37.693)\n" + ] } ], "prompt_number": 28 @@ -248,19 +562,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.12, Page number 139" + "source": [ + "Example number 4.12, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=(2*(n**2)*h**2)/(8*m*L**2);\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=(2*(n**2)*h**2)/(8*m*L**2);\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 75.385)\n" + "text": [ + "('lowest energy of system in eV is', 75.385)\n" + ] } ], "prompt_number": 29 @@ -269,19 +607,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.13, Page number 139" + "source": [ + "Example number 4.13, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system and quantum numbers\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\n#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\nn1=1;\nn2=2;\nE=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);\nprint(\"quantum numbers are\");\nprint(\"n=1,l=0,mL=0,mS=+1/2\");\nprint(\"n=1,l=0,mL=0,mS=-1/2\");\nprint(\"n=2,l=0,mL=0,mS=+1/2\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\n", + "n1=1;\n", + "n2=2;\n", + "E=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);\n", + "print(\"quantum numbers are\");\n", + "print(\"n=1,l=0,mL=0,mS=+1/2\");\n", + "print(\"n=1,l=0,mL=0,mS=-1/2\");\n", + "print(\"n=2,l=0,mL=0,mS=+1/2\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 226.154)\nquantum numbers are\nn=1,l=0,mL=0,mS=+1/2\nn=1,l=0,mL=0,mS=-1/2\nn=2,l=0,mL=0,mS=+1/2\n" + "text": [ + "('lowest energy of system in eV is', 226.154)\n", + "quantum numbers are\n", + "n=1,l=0,mL=0,mS=+1/2\n", + "n=1,l=0,mL=0,mS=-1/2\n", + "n=2,l=0,mL=0,mS=+1/2\n" + ] } ], "prompt_number": 30 @@ -290,19 +662,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.14, Page number 140" + "source": [ + "Example number 4.14, Page number 140" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mass of the particle\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nL=100; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=0.025; #lowest energy in eV\nE=E*(1.6*10**-19); #converting eV to J\nm=((n**2)*h**2)/(8*E*L**2);\n\n#Result\nprint(\"mass of the particle in kg is\",m);", + "input": [ + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "L=100; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=0.025; #lowest energy in eV\n", + "E=E*(1.6*10**-19); #converting eV to J\n", + "m=((n**2)*h**2)/(8*E*L**2);\n", + "\n", + "#Result\n", + "print(\"mass of the particle in kg is\",m);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + "text": [ + "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + ] } ], "prompt_number": 31 @@ -311,19 +702,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.15, Page number 141" + "source": [ + "Example number 4.15, Page number 141" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy density\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nT=6000; #temperature in K\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda1=450; #wavelength in nm\nlamda2=460; #wavelength in nm\n\n#Calculation\nlamda1=lamda1*10**-9; #converting nm to metre\nlamda2=lamda2*10**-9; #converting nm to metre\nnew1=c/lamda1;\nnew2=c/lamda2;\nnew=(new1+new2)/2;\nA=math.exp((h*new)/(k*T));\nrho_v=(8*math.pi*h*new**3)/(A*c**3);\n\n#Result\nprint(\"energy density of the black body in J/m^3 is\",rho_v);\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "T=6000; #temperature in K\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda1=450; #wavelength in nm\n", + "lamda2=460; #wavelength in nm\n", + "\n", + "#Calculation\n", + "lamda1=lamda1*10**-9; #converting nm to metre\n", + "lamda2=lamda2*10**-9; #converting nm to metre\n", + "new1=c/lamda1;\n", + "new2=c/lamda2;\n", + "new=(new1+new2)/2;\n", + "A=math.exp((h*new)/(k*T));\n", + "rho_v=(8*math.pi*h*new**3)/(A*c**3);\n", + "\n", + "#Result\n", + "print(\"energy density of the black body in J/m^3 is\",rho_v);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + "text": [ + "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + ] } ], "prompt_number": 32 @@ -331,7 +753,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |