1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
{
"metadata": {
"name": "Chapter7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 7:The Hydrogen Atom in Wave Mechanics"
]
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Example 7.2 Page 213"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import exp\n",
"import math\n",
"from scipy import integrate\n",
"# calculating radial probability P= (4/ao^3)*integral(r^2 * e^(-2r/ao)) between the limits 0 and ao for r\n",
"\n",
"#calculation\n",
"def integrand(x):\n",
" return ((x**2)*exp(-x))/2.0\n",
"Pr=integrate.quad(integrand,0,2,args=());#simplifying where as x=2*r/a0; hence the limits change between 0 to 2\n",
"\n",
"#result\n",
"print \"Hence the probability of finding the electron nearer to nucleus is\",round(Pr[0],3);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Hence the probability of finding the electron nearer to nucleus is 0.323\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.3 Page 213"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import exp\n",
"import math\n",
"from scipy import integrate\n",
"# employing the formula for probability distribution similarly as done in Exa-7.2 \n",
"#calculation\n",
"def integrand(x):\n",
" return (1.0/8)*((4.0*x**2)-(4.0*x**3)+(x**4))*exp(-x)\n",
"Pr1= integrate.quad(integrand,0,1,args=()) #x=r/ao; similrly limits between 0 and 1.\n",
"\n",
"#result\n",
"print\"The probability for l=0 electron is\",round(Pr1[0],5)\n",
"\n",
"#part2\n",
"def integrand(x):\n",
" return (1.0/24)*(x**4)*(exp(-x))\n",
"Pr2=integrate.quad(integrand,0,1); #x=r/ao; similarly limits between 0 and 1.\n",
"\n",
"#result\n",
"print\"The probability for l=1 electron is\",round(Pr2[0],5)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The probability for l=0 electron is 0.03432\n",
"The probability for l=1 electron is 0.00366\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.4 Page 215"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import exp, sqrt\n",
"import math\n",
"from scipy import integrate\n",
"l=1.0; #given value of l\n",
"\n",
"#calculation\n",
"am1=sqrt(l*(l+1)); #angular momentum==sqrt(l(l+1)) h\n",
"l=2.0 #given l\n",
"am2=sqrt(l*(l+1));\n",
"\n",
"#result\n",
"print\"The angular momenta are found out to be\", round(am1,3),\" h and\",round(am2,3),\" h respectively for l=1 and l=2.\";\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The angular momenta are found out to be 1.414 h and 2.449 h respectively for l=1 and l=2.\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.5 Page 216"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"print \"The possible values for m are [+2,-2] and hence any of the 5 components [-2h,2h] are possible for the L vector.\";\n",
"print \"Length of the vector as found out previously is %.2f*h.\",round(sqrt(6),4);#angular momentum==sqrt(l(l+1)) h"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The possible values for m are [+2,-2] and hence any of the 5 components [-2h,2h] are possible for the L vector.\n",
"Length of the vector as found out previously is %.2f*h. 2.4495\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.6 Page 223"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"uz=9.27*10**-24; t=1.4*10**3; x=3.5*10**-2; #various constants and given values\n",
"m=1.8*10**-25;v=750; # mass and velocity of the particle\n",
"\n",
"#calculation\n",
"d=(uz*t*(x**2))/(m*(v**2)); #net separtion \n",
"\n",
"#result\n",
"print\"The distance of separation in mm is\",round(d*10**3,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The distance of separation in mm is 0.157\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 7.7 Page 227"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"n1=1.0;n2=2.0;hc=1240.0; #hc=1240 eV.nm\n",
"E=(-13.6)*((1/n2**2)-(1/n1**2)); #Energy calculation\n",
"\n",
"#calculation\n",
"w=hc/E; #wavelength\n",
"u=9.27*10**-24; B=2; #constants\n",
"delE= u*B/(1.6*10**-19); #change in energy\n",
"delw=((w**2/hc))*delE; #change in wavelength\n",
"\n",
"#result\n",
"print\"The change in wavelength in nm. is\",round(delw,4);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The change in wavelength in nm. is 0.0014\n"
]
}
],
"prompt_number": 12
}
],
"metadata": {}
}
]
}
|