summaryrefslogtreecommitdiff
path: root/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter6.ipynb
blob: c0b5df30a00bbfbefbd851550cca72abfc03903b (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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 6: Schroedinger Wave Equation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 1, Page number 211"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "least energy is 37.65 eV\n",
      "answer given in the book is wrong\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "h=6.63*10**-34;        #plancks constant(J sec)\n",
    "m=9.11*10**-31;        #mass(kg)\n",
    "a=10**-10;             #width of box(m)\n",
    "e=1.602*10**-19;       #charge(coulomb)\n",
    "\n",
    "#Calculations\n",
    "E1=(h**2)/(8*m*e*a**2);    #least energy(eV)\n",
    "\n",
    "#Result\n",
    "print \"least energy is\",round(E1,2),\"eV\"\n",
    "print \"answer given in the book is wrong\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 2, Page number 211"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "probability of finding the particle is 0.4\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "delta_x=5*10**-10;     #interval(m)\n",
    "a=25*10**-10;          #width(m)\n",
    "\n",
    "#Calculations\n",
    "P=2*delta_x/a;         #probability of finding the particle\n",
    "\n",
    "#Result\n",
    "print \"probability of finding the particle is\",P"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 3, Page number 212"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "probability of finding the particle is 19.84 %\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "from scipy.integrate import quad\n",
    "\n",
    "#Variable declaration    \n",
    "a=1;        #assume\n",
    "\n",
    "#Calculations\n",
    "def zintg(x):\n",
    "    return (2/a)*(1/2)*(1-math.cos(2*math.pi*x/a))\n",
    "\n",
    "P1=quad(zintg,0.45,0.55)[0]\n",
    "\n",
    "#Result\n",
    "print \"probability of finding the particle is\",round(P1*100,2),\"%\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 4, Page number 213"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " least energy is 6 eV\n",
      "energy in 2nd excited state is 24 eV\n",
      "energy in 3rd excited state is 54 eV\n",
      "difference of energy between 2nd and 1st excited states is 18 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "h=6.63*10**-34;      #planks constant(Js)\n",
    "m=9.1*10**-31;       #mass(kg)\n",
    "a=2.5*10**-10;       #width(m)\n",
    "e=1.6*10**-19;       #charge(coulomb)\n",
    "n1=1;                      \n",
    "n2=2;\n",
    "n3=3;                #energy states\n",
    "\n",
    "#Calculations\n",
    "E1=n1**2*(h**2)/(8*m*e*a**2);    #least energy(eV)\n",
    "E2=n2**2*E1;                     #energy in 2nd excited state(eV)\n",
    "E3=n3**2*E1;                     #energy in 3rd excited state(eV)\n",
    "delta_E=E2-E1;                   #difference of energy between 2nd and 1st excited states(eV)\n",
    "\n",
    "#Result\n",
    "print \"least energy is\",int(E1),\"eV\"\n",
    "print \"energy in 2nd excited state is\",int(E2),\"eV\"\n",
    "print \"energy in 3rd excited state is\",int(E3),\"eV\"\n",
    "print \"difference of energy between 2nd and 1st excited states is\",int(delta_E),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 5, Page number 213"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "de-Broglie wavelength of first three energy states are 20 angstrom 10 angstrom 6.67 angstrom\n",
      "energies of first three energy states are 0.38 eV 1.5095 eV 3.396 eV\n",
      "answer in the book varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "h=6.63*10**-34;      #planks constant(Js)\n",
    "m=9.1*10**-31;       #mass(kg)\n",
    "a=10;                #width(angstrom)\n",
    "e=1.6*10**-19;       #charge(coulomb)\n",
    "n1=1;                      \n",
    "n2=2;\n",
    "n3=3;                #energy states\n",
    "\n",
    "#Calculations\n",
    "lamda1=2*a/n1;       #de-Broglie wavelength of first energy state(angstrom)\n",
    "lamda2=2*a/n2;       #de-Broglie wavelength of second energy state(angstrom)\n",
    "lamda3=2*a/n3;       #de-Broglie wavelength of third energy state(angstrom)\n",
    "E1=n1**2*(h**2)/(8*m*e*(a*10**-10)**2);    #energy in 1st excited state(eV)\n",
    "E2=n2**2*E1;                     #energy in 2nd excited state(eV)\n",
    "E3=n3**2*E1;                     #energy in 3rd excited state(eV)\n",
    "\n",
    "#Result\n",
    "print \"de-Broglie wavelength of first three energy states are\",int(lamda1),\"angstrom\",int(lamda2),\"angstrom\",round(lamda3,2),\"angstrom\"\n",
    "print \"energies of first three energy states are\",round(E1,2),\"eV\",round(E2,4),\"eV\",round(E3,3),\"eV\"\n",
    "print \"answer in the book varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 6, Page number 214"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy in 1st excited state is 14.7 *10**-19 J\n",
      "mass is 9.3 *10**-31 kg\n",
      "quantum state is 10.4\n",
      "as n is not an integer, En is not permitted value of energy\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "h=6.63*10**-34;      #planks constant(Js)\n",
    "a=0.2*10**-9;        #width(m)\n",
    "e=1.602*10**-19;     #charge(coulomb)\n",
    "n5=5;                #energy state\n",
    "E5=230*e;            #energy 0f 5th state(J)\n",
    "En=10**3*e;          #energy(eV)\n",
    "\n",
    "#Calculations\n",
    "E1=E5/n5**2;         #energy in 1st excited state(eV)\n",
    "m=h**2/(8*E1*a**2);    #mass(kg)\n",
    "n=math.sqrt(En/E1);    #quantum state\n",
    "\n",
    "#Result\n",
    "print \"energy in 1st excited state is\",round(E1*10**19,1),\"*10**-19 J\"\n",
    "print \"mass is\",round(m*10**31,1),\"*10**-31 kg\"\n",
    "print \"quantum state is\",round(n,1)\n",
    "print \"as n is not an integer, En is not permitted value of energy\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 7, Page number 225"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "reflection coefficient in 1st case is 0.05\n",
      "answer given in the book is wrong\n",
      "transmission coefficient in 1st case is 0.95\n",
      "for E=0.025, E<V. so transmission coefficient is 0 and reflection coefficient is 1\n",
      "reflection coefficient in 3rd case is 1\n",
      "transmission coefficient in 3rd case is 0\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration \n",
    "e=1.6*10**-19;     #charge(coulomb)\n",
    "E1=0.04*e;         #energy(J)\n",
    "V=0.03*e;          #energy barrier(J) \n",
    "E2=0.025*e;        #energy(J)\n",
    "E3=0.03*e;         #energy(J)\n",
    "m=1;               #assume \n",
    "k1=1;              #assume\n",
    "\n",
    "#Calculations\n",
    "x=math.sqrt(E1-V);\n",
    "y=math.sqrt(E1+V);\n",
    "R1=((math.sqrt(E1)-x)/(math.sqrt(E1)+y))**2;     #reflection coefficient\n",
    "T1=1-R;                                          #transmission coefficient\n",
    "k2=math.sqrt(2*m*(E3-V));                       \n",
    "R2=((k1-k2)/(k1+k2))**2;                         #reflection coefficient\n",
    "T2=4*k1*k2/(k1+k2)**2;                           #transmission coefficient \n",
    "\n",
    "#Result\n",
    "print \"reflection coefficient in 1st case is\",round(R1,2)\n",
    "print \"answer given in the book is wrong\"\n",
    "print \"transmission coefficient in 1st case is\",round(T1,2)\n",
    "print \"for E=0.025, E<V. so transmission coefficient is 0 and reflection coefficient is 1\"\n",
    "print \"reflection coefficient in 3rd case is\",int(R2)\n",
    "print \"transmission coefficient in 3rd case is\",int(T2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 8, Page number 226"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "value of E/V is 1.03\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "T=0.5;            #transmission coefficient \n",
    "a=1;\n",
    "b=6;\n",
    "c=1;\n",
    "\n",
    "#Calculations\n",
    "k1byk2=(b+math.sqrt((b**2)-(4*a*c)))/(2*a);  \n",
    "x=k1byk2**2;\n",
    "EbyV=x/(x-1);        #value of E/V\n",
    "\n",
    "#Result\n",
    "print \"value of E/V is\",round(EbyV,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 9, Page number 226"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transmission probabilities in 1st case are 4.5 *10**-5 and 1.4 *10**-4\n",
      "transmission probabilities in 2nd case are 2.1 *10**-9 and 1.25 *10**-9\n",
      "answer for transmission probability in 2nd case given in the book is wrong\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "m=9.1*10**-31;       #mass(kg)\n",
    "a1=5*10**-10;         #width(m)\n",
    "a2=10*10**-10;         #width(m)\n",
    "e=1.6*10**-19;       #charge(coulomb)\n",
    "V0=5;                #energy barrier(eV)\n",
    "E1=1;                #energy of electron(eV)\n",
    "E2=2;\n",
    "chi=1.054*10**-34;   #plancks constant(Js)\n",
    "\n",
    "#Calculations\n",
    "beta1=math.sqrt(2*m*(V0-E1)*e/chi**2);      #value of beta(m-1)\n",
    "x1=int(-2*a1*beta1);\n",
    "beta2=math.sqrt(2*m*(V0-E2)*e/chi**2);      #value of beta(m-1)\n",
    "x2=round(-2*a1*beta2,1);\n",
    "T1=math.exp(x1);               #transmission probability in 1st case\n",
    "T2=math.exp(x2);               #transmission probability in 1st case\n",
    "x3=int(-2*a2*beta1);\n",
    "x4=round(-2*a2*beta1,1);\n",
    "T1dash=math.exp(x3);               #transmission probability in 2nd case\n",
    "T2dash=math.exp(x4);               #transmission probability in 1st case\n",
    "\n",
    "#Result\n",
    "print \"transmission probabilities in 1st case are\",round(T1*10**5,1),\"*10**-5 and\",round(T2*10**4,1),\"*10**-4\"\n",
    "print \"transmission probabilities in 2nd case are\",round(T1dash*10**9,1),\"*10**-9 and\",round(T2dash*10**9,2),\"*10**-9\"\n",
    "print \"answer for transmission probability in 2nd case given in the book is wrong\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 10, Page number 227"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transmission coefficient is 4 math.exp ( -1.625 )\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "m=9.1*10**-31;       #mass(kg)\n",
    "a=10**-10;           #width(m)\n",
    "e=1.6*10**-19;       #charge(coulomb)\n",
    "V0=5;                #energy barrier(eV)\n",
    "E=2.5;               #energy of electron(eV)\n",
    "chi=1.05*10**-34;    #plancks constant(Js)\n",
    "\n",
    "#Calculations\n",
    "x=16*E*(V0-E)/V0**2;\n",
    "y=-2*a*math.sqrt(2*m*(V0-E)*e/chi**2);\n",
    "#T=x*math.exp(y);     #transmission coefficient\n",
    "\n",
    "#Result\n",
    "print \"transmission coefficient is\",int(x),\"math.exp (\",round(y,3),\")\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 11, Page number 227"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "average lifetime of nucleus is 3.7 *10**17 years\n",
      "answer given in the book is wrong\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration    \n",
    "P=10**21;        #probability(T per sec)\n",
    "m=4*1.6*10**-27;       #mass(kg)\n",
    "a=2*10**-14;           #width(m)\n",
    "e=1.67*10**-19;        #charge(coulomb)\n",
    "V0=30;                 #energy barrier(eV)\n",
    "E=4.2;                 #energy of electron(eV)\n",
    "chi=1.05*10**-34;      #plancks constant(Js)\n",
    "\n",
    "#Calculations\n",
    "x=P*16*E*(V0-E)/V0**2;\n",
    "y=-2*a*math.sqrt(2*m*(V0-E)*10**6*e/chi**2);\n",
    "T=x*math.exp(y);     #transmission coefficient\n",
    "tow=1/T;             #average lifetime of nucleus(years) \n",
    "\n",
    "#Result\n",
    "print \"average lifetime of nucleus is\",round(tow/10**17,1),\"*10**17 years\"\n",
    "print \"answer given in the book is wrong\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}