summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter5_1.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commit92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch)
tree205e68d0ce598ac5caca7de839a2934d746cce86 /Modern_Physics/Chapter5_1.ipynb
parentb14c13fcc6bb6d01c468805d612acb353ec168ac (diff)
downloadPython-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip
added books
Diffstat (limited to 'Modern_Physics/Chapter5_1.ipynb')
-rwxr-xr-xModern_Physics/Chapter5_1.ipynb49
1 files changed, 49 insertions, 0 deletions
diff --git a/Modern_Physics/Chapter5_1.ipynb b/Modern_Physics/Chapter5_1.ipynb
new file mode 100755
index 00000000..9c6c1971
--- /dev/null
+++ b/Modern_Physics/Chapter5_1.ipynb
@@ -0,0 +1,49 @@
+{
+ "metadata": {
+ "name": "MP-5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "The Schrodinger Equation"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 5.2 Page 150"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#initation of variable\n#parta\nfrom math import pi, sin\nimport math\nfrom scipy import integrate\nh=1.05*10**-34;m=9.11*10**-31;L=10.0**-10; # all the values are taken in SI units\nE1=h**2*pi**2/(2*m*L**2); E2=4*E1; #Energies are calculated\ndelE=(E2-E1)/(1.6*10**-19); #Difference in energy is converted to eV\n\n#result\nprint \"Energy to be supplied in eV. is \",round(delE,3);\n\n#partb\nx1=0.09*10**-10;x2=0.11*10**-10 #limits of the given region\ndef integrand(x,L):\n return 2.0/L*(sin(pi*x/L))**2\n\nprobGnd=integrate.quad(integrand,x1,x2,args=(L))\n\n#result\nprint \"The percentage probablility of finding an electron in the ground state is \\n\",round(probGnd[0]*100,3);\n\n#partc\nk1=0.0;k2=0.25*10**-10;\ndef integrand(k,L):\n return 2.0/L*(sin(2*pi*k/L))**2\n\nprobExc=integrate.quad(integrand,k1,k2,args=(L))\n\n#result\nprint \"The probablility of finding an electron in the excited state is\",round(probExc[0],3);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Energy to be supplied in eV. is 111.978\nThe percentage probablility of finding an electron in the ground state is \n0.383\nThe probablility of finding an electron in the excited state is 0.25\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file