summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_G._Aruldhas/Chapter9_1.ipynb
blob: af5adbcc1c3cb528b22e3619948ab0a2c64be796 (plain)
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
{
 "metadata": {
  "name": "",
  "signature": "sha256:d58e11c98e937b7ff914fc9567035f99fc6ab344053f332f140829887d0ef6cc"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "9: Quantum Mechanics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.1, Page number 202"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V = 100;     #Accelerating potential for electron(volt)\n",
      "\n",
      "#Calculation\n",
      "lamda = math.sqrt(150/V)*10**-10;     #de-Broglie wavelength of electron(m)\n",
      "\n",
      "#Result\n",
      "print \"The De-Broglie wavelength of electron is\",lamda, \"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The De-Broglie wavelength of electron is 1.22474487139e-10 m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.2, Page number 203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "e = 1.6*10**-19;     #Energy equivalent of 1 eV(J/eV)\n",
      "h = 6.626*10**-34;    #Planck's constant(Js)\n",
      "m = 9.11*10**-31;     #Mass of the electron(kg)\n",
      "Ek = 10;     #Kinetic energy of electron(eV)\n",
      "\n",
      "#Calculation\n",
      "p = math.sqrt(2*m*Ek*e);     #Momentum of the electron(kg-m/s)\n",
      "lamda = h/p ;     #de-Broglie wavelength of electron from De-Broglie relation(m)\n",
      "lamda = lamda*10**9;     #de-Broglie wavelength of electron from De-Broglie relation(nm)\n",
      "lamda = math.ceil(lamda*10**2)/10**2;     #rounding off the value of lamda to 2 decimals\n",
      "\n",
      "#Result\n",
      "print \"The de-Broglie wavelength of electron is\",lamda, \"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The de-Broglie wavelength of electron is 0.39 nm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.3, Page number 203. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.4, Page number 203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h = 6.626*10**-34;      #Planck's constant(Js)\n",
      "m = 9.11*10**-31;       #Mass of the electron(kg)\n",
      "v = 1.1*10**6;     #Speed of the electron(m/s)\n",
      "pr = 0.1;        #precision in percent\n",
      "\n",
      "#Calculation\n",
      "p = m*v;     #Momentum of the electron(kg-m/s)\n",
      "dp = pr/100*p;    #Uncertainty in momentum(kg-m/s)\n",
      "h_bar = h/(2*math.pi);     #Reduced Planck's constant(Js)\n",
      "dx = h_bar/(2*dp);         #Uncertainty in position(m)\n",
      "\n",
      "#Result\n",
      "print \"The uncertainty in position of electron is\",dx, \"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The uncertainty in position of electron is 5.26175358211e-08 m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.5, Page number 203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "e = 1.6*10**-19;     #Energy equivalent of 1 eV(J/eV)\n",
      "h = 6.626*10**-34;    #Planck's constant(Js)\n",
      "dt = 10**-8;      #Uncertainty in time(s)\n",
      "\n",
      "#Calculation\n",
      "h_bar = h/(2*math.pi);    #Reduced Planck's constant(Js)\n",
      "dE = h_bar/(2*dt*e);       #Uncertainty in energy of the excited state(m)\n",
      "\n",
      "#Result\n",
      "print \"The uncertainty in energy of the excited state is\",dE, \"eV\"\n",
      "\n",
      "#answer given in the book is wrong"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The uncertainty in energy of the excited state is 3.2955020404e-08 eV\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.6, Page number 204"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "c = 3*10**8;      #Speed of light(m/s)\n",
      "dt = 10**-8;      #Average lifetime(s)\n",
      "lamda = 400;    #Wavelength of spectral line(nm)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-9;      #Wavelength of spectral line(m)\n",
      "#From Heisenberg uncertainty principle,\n",
      "#dE = h_bar/(2*dt) and also dE = h*c/lambda^2*d_lambda, which give\n",
      "#h_bar/(2*dt) = h*c/lambda^2*d_lambda, solving for d_lambda\n",
      "d_lamda = (lamda**2)/(4*math.pi*c*dt);     #Width of spectral line(m)\n",
      "\n",
      "#Result\n",
      "print \"The width of spectral line is\",d_lamda, \"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The width of spectral line is 4.24413181578e-15 m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.7, Page number 204. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.8, Page number 204. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.9, Page number 205. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.10, Page number 205. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.11, Page number 205. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.12, Page number 206. theoritical proof"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.13, Page number 206. theoritical proof "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 9.14, Page number 207"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "from scipy.integrate import quad\n",
      "\n",
      "#Variable declaration\n",
      "a = 2*10**-10;    # Width of 1D box(m)\n",
      "x1=0;    # Position of first extreme of the box(m)\n",
      "x2=1*10**-10;   # Position of second extreme of the box(m)\n",
      "\n",
      "#Calculation\n",
      "def intg(x):\n",
      "    return ((2/a)*(math.sin(2*math.pi*x/a))**2)\n",
      "S=quad(intg,x1,x2)[0]\n",
      "\n",
      "#Result\n",
      "print \"The probability of finding the electron between x = 0 and x = 10**-10 is\",S"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The probability of finding the electron between x = 0 and x = 10**-10 is 0.5\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}