summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter7.ipynb
blob: b30ad5a1c7e5fb365b8b57892d862f080190bbd9 (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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
{

 "metadata": {

  "name": "",

  "signature": "sha256:43ad060be6803a5e6c90770bf46ae3612188f9380f800bb70a03161cb97405cb"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Chapter7:WAVE MECHANICS"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.1:pg-200"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate de Broglie wavelength \n",

      "v=1.5*10**7 #velocity of proton =(1/20)*velocity of light i.e.3*10**8 in m/s\n",

      "m=1.67*10**-27 #mass of the proton in kg\n",

      "h=6.6*10**-34 #plank's constant \n",

      "lamda=h/(m*v)\n",

      "print \"the de Broglie wavelength is lamda=\",\"{:.3e}\".format(lamda),\"m\" \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the de Broglie wavelength is lamda= 2.635e-14 m\n"

       ]

      }

     ],

     "prompt_number": 4

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.2:pg-200"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate de Broglie wavelength\n",

      "#mo*c**2=1.507*10**-10/1.6*10**-19=941.87 Mev\n",

      "#since 12.8 Mev is very small compared to rest mass energy hence relavistic consideration may be ignored\n",

      "m=1.67*10**-27 #mass in kg\n",

      "h=6.62*10**-34 #plank's constant\n",

      "E=12.8*10**6 #energy in Mev\n",

      "lamda=h/math.sqrt(2*m*E*1.6*10**-19)/(1e-10)\n",

      "print \"the de Broglie wavelength is lamda=\",round(lamda,5),\"angstrom\"\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the de Broglie wavelength is lamda= 8e-05 angstrom\n"

       ]

      }

     ],

     "prompt_number": 11

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.4:pg-201"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength\n",

      "h=6.6*10**-34 #plank's constant\n",

      "m=9.1*10**-31 #mass of electron in kg\n",

      "E=1.25*10**3 #pottential difference keV\n",

      "lamda=h/math.sqrt(2*m*E*1.6*10**-19)\n",

      "print \"the wavelength is lamda=\",\"{:.2e}\".format(lamda),\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the wavelength is lamda= 3.46e-11 m\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.5:pg-201"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate kinetic energy of an electron \n",

      "h=6.63*10**-34 #plank's constant\n",

      "mo=9.1*10**-31 #rest mass of an electron in kg\n",

      "lamda=5896*10**-10  #wavelength in angstrom\n",

      "K=(h**2)/(2*mo*(lamda**2)*1.6*10**-19) \n",

      "print \"kinetic energy of an electron is K=\",\"{:.2e}\".format(K),\"eV\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "kinetic energy of an electron is K= 4.34e-06 eV\n"

       ]

      }

     ],

     "prompt_number": 7

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.6:pg-202"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate the wavelength of an electron of kinetic energy\n",

      "mo=9.1*10**-31 #mass of an electron in kg\n",

      "c=3*10**8 #speed of light in m/s \n",

      "K=1*10**6#kinetic energy in eV\n",

      "h=6.62*10**-34 #planck's constant in J-s\n",

      "#E=moc**2=81.9*10**-15/1.6*10**-19 eV=0.51MeV\n",

      "E=0.51*10**6\n",

      "lamda=(h*c)/(math.sqrt(K*(K+2*E))*1.6*10**-19)\n",

      "print \"wavelength of an electron of kinetic energy is lamda=\",round(lamda,14),\"m\"\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of an electron of kinetic energy is lamda= 8.7e-13 m\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.7:pg-203"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate de Broglie wavelength\n",

      "V=100 #potential difference in volts\n",

      "lamda=12.25/math.sqrt(V)\n",

      "print \"de Broglie wavelength of any electron is lamda=\",lamda,\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "de Broglie wavelength of any electron is lamda= 1.225 angstrom\n"

       ]

      }

     ],

     "prompt_number": 7

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.9:pg-203"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate energy of the neutron\n",

      "h=6.60*10**-34 #plank's constant in J/s\n",

      "m=1.674*10**-27 #mass of the neutron in kg\n",

      "lamda=10**-10 #de Broglie wavelength in m\n",

      "E=(h**2)/(2*m*(lamda**2)*1.6*10**-19)\n",

      "print \"energy of the neutron is E=\",\"{:.2e}\".format(E),\"eV\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "energy of the neutron is E= 8.13e-02 eV\n"

       ]

      }

     ],

     "prompt_number": 8

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.10:pg-204"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength\n",

      "h=6.6*10**-34 #plank's constant in J/sec\n",

      "m=9.1*10**-31 #mass of electron in kg\n",

      "c=3*10**8 #light speed in m/s\n",

      "lamda=h/(m*c)/(1e-10) # in angstrom\n",

      "print \"wavelength of quantum of radiant energy is lamda=\",round(lamda,4),\"angstrom\"\n",

      "#to calculate number of photons \n",

      "power=12 #power emitted by the lamp =150*(8/100) in watts\n",

      "E=12.0 #energy emitted per second\n",

      "lamda=4500*10.0**-10\n",

      "energy=(h*c)/lamda #energy contained in one photon in J\n",

      "number=E/energy\n",

      "print \"number of photons emitted per sec is number=\",round(number,-16),\"unitless\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of quantum of radiant energy is lamda= 0.0242 angstrom\n",

        "number of photons emitted per sec is number= 2.727e+19 unitless\n"

       ]

      }

     ],

     "prompt_number": 22

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.11:pg-209"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in position\n",

      "#actual formula is (delx)min*(delp)max=h/2*math.pi-------------eq(1)\n",

      "#(delp)max=p(momentum of the electron)\n",

      "#mv=mov/math.sqrt(1-(v/c)**2)---------------------eq(2)\n",

      "mo=9*10**-31 #mass of an electron in m/s\n",

      "c=3*10**8 #light speed in m/s\n",

      "v=3*10**7 #velocity in m/s  \n",

      "h=6.6*10**-34 #plank's constant in J/s\n",

      "#from eq(1) and eq(2),we get\n",

      "delxmin=(h*math.sqrt(1-(v/c)**2))/(2*math.pi*mo*v)\n",

      "print \"smallest possible uncertainity in the position of an electron is delxmin=\",round(delxmin/1e-10,4),\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "smallest possible uncertainity in the position of an electron is delxmin= 0.0389 angstrom\n"

       ]

      }

     ],

     "prompt_number": 12

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.12:pg-209"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate minimum uncertainity in the velocity\n",

      "delxmax=10**-8 #maximum uncertainity in position in m\n",

      "h=6.626*10**-34 #planck's constant\n",

      "delpmin=h/(2*math.pi*delxmax) #minimum uncertainity in momentum in kg-m/s**2 \n",

      "m=9*10**-31 #mass of an electron in kg\n",

      "delvmin=delpmin/m\n",

      "print \"minimum uncertainity in the velocity is delvmin=\",\"{:.2e}\".format(delvmin),\"m/s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum uncertainity in the velocity is delvmin= 1.17e+04 m/s\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.13:pg-209"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in the momentum of the parcticle \n",

      "h=6.626*10**-34 #planck's constant J-s\n",

      "delx=0.01*10**-2 #uncertainity in position in m\n",

      "delp=h/(2*math.pi*delx)\n",

      "print \"uncertainity in the momentum of the parcticle is delp=\",\"{:.2e}\".format(delp),\"kg-m/s**2\"\n",

      "#to calculate uncertainity in the velocity of an electron\n",

      "m=9*10**-31 #mass of an electron in kg\n",

      "delx=5*10**-10 \n",

      "delv=h/(2*math.pi*m*delx)\n",

      "print \"uncertainity in the velocity of an electron is delv=\",\"{:.3e}\".format(delv),\"m/s\"\n",

      "#to calculate uncertainity in the velocity of alpha particle \n",

      "m=4*1.67*10**-27 #mass of alpha particle in kg\n",

      "delx=5*10**-10\n",

      "delv=h/(2*math.pi*m*delx)\n",

      "print \"uncertainity in the velocity of an electron is delv=\",round(delv,2),\"m/s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "uncertainity in the momentum of the parcticle is delp= 1.05e-30 kg-m/s**2\n",

        "uncertainity in the velocity of an electron is delv= 2.343e+05 m/s\n",

        "uncertainity in the velocity of an electron is delv= 31.57 m/s\n"

       ]

      }

     ],

     "prompt_number": 15

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.14:pg-210"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in position\n",

      "m=9.11*10**-31 #mass of electron in kg\n",

      "delv=40 #uncertainity in velocity in m/s\n",

      "h=6.6*10**-34 #plank's constant \n",

      "delx=h/(2*math.pi*m*delv)\n",

      "print \"uncertainity in the position of the electron is delx=\",\"{:.2e}\".format(delx),\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "uncertainity in the position of the electron is delx= 2.88e-06 m\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.15:pg-210"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in frequency\n",

      "#delE*delt=h/2*math.pi----eq(1)\n",

      "#delE=h*delv-----------eq(2)\n",

      "delt=10**-8 #uncertainity in time in s\n",

      "#from eq(1) and eq(2),we get\n",

      "delnu=1/(2*math.pi*delt)\n",

      "print \"minimum uncertainity in the frequency of the photon is delv=\",\"{:.3e}\".format(delnu),\"sec**-1\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum uncertainity in the frequency of the photon is delv= 1.592e+07 sec**-1\n"

       ]

      }

     ],

     "prompt_number": 17

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.16:pg-211"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in the energy\n",

      "h=6.63*10**-34 #plank's constant in J-s\n",

      "delt=2.5*10**-14 #uncertainity in time in s\n",

      "delE=h/(2*math.pi*delt*1.6*10**-19)\n",

      "print \"minimum error with which the energy of the state can be measured is delE=\",round(delE,3),\"ev\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum error with which the energy of the state can be measured is delE= 0.026 ev\n"

       ]

      }

     ],

     "prompt_number": 18

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.17:pg-211"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate time required for the atomic system \n",

      "#delE=h*c*dellamda/lamda**2 -----eq(1)\n",

      "#delE*delt=h/2*math.pi----------eq(2)\n",

      "dellamda=10**-14\n",

      "c=3*10**8\n",

      "lamda=6*10**-7\n",

      "#from eq(1)and eq(2),we get\n",

      "delt=(lamda**2)/(2*math.pi*c*dellamda)\n",

      "print \"time required for the atomic system to retain rotational energy is delt=\",\"{:.1e}\".format(delt),\"s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "time required for the atomic system to retain rotational energy is delt= 1.9e-08 s\n"

       ]

      }

     ],

     "prompt_number": 19

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.18:pg-211"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate minimum uncertainity in the momentum \n",

      "delxmax=5*10**-14 #uncertainity in position in m\n",

      "h=6.626*10**-34 #plank's constant in Js\n",

      "delpmin=h/(2*math.pi*delxmax)\n",

      "print \"minimum uncertainity in the momentum of the nucleon is delpmin=\",\"{:.2e}\".format(delpmin),\"kg m/s\"\n",

      "m=1.675*10**-27 #mass in kg\n",

      "Emin=(delpmin**2)/(2*m*1.6*10**-19)\n",

      "print \"minimum kinetic energy of the nucleon is Emin=\",round(Emin,2),\"eV\"\n",

      "#the answer is given wrong in the book Emin=0.039 eV\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum uncertainity in the momentum of the nucleon is delpmin= 2.11e-21 kg m/s\n",

        "minimum kinetic energy of the nucleon is Emin= 8299.24 eV\n"

       ]

      }

     ],

     "prompt_number": 9

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.19:pg-212"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in velocity\n",

      "delx=1.1*10**-8 #uncertainity in velocity in m\n",

      "h=6.626*10**-34 #plank's constant\n",

      "m=9.1*10**-31 #mass of electron in kg\n",

      "delv=h/(2*math.pi*m*delx)\n",

      "print \"minimum uncertainity in velocity is delv=\",\"{:.2e}\".format(delv),\"m/s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum uncertainity in velocity is delv= 1.05e+04 m/s\n"

       ]

      }

     ],

     "prompt_number": 14

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.20:pg-212"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate uncertainity in frequency\n",

      "delt=10**-8 #uncertainity in time\n",

      "delnu=1/(2*math.pi*delt) \n",

      "print \"minimum uncertainity in the frequency of a photon is delnu=\",\"{:.2e}\".format(delnu),\"sec**-1\"\n",

      "#to use the uncertainity principle to place a lower limit on the energy an electron must have if it is to be part of a nucleus\n",

      "delx=5*10**-15 #uncertainity in position\n",

      "delp=h/(2*2*math.pi*delx) #uncertainbity in momentum\n",

      "c=3*10**8 #/speed of light in m/s\n",

      "E=delp*c\n",

      "print \"energy of an electron is E=\",\"{:.2e}\".format(E),\"J\"\n",

      "\n",

      "# the answer is slightlty different due to approximation in textboook\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "minimum uncertainity in the frequency of a photon is delnu= 1.59e+07 sec**-1\n",

        "energy of an electron is E= 3.16e-12 J\n"

       ]

      }

     ],

     "prompt_number": 15

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.22:pg-223"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate probability of finding the particle\n",

      "a=25*10**-10#width in angstrom \n",

      "#wave function of the particle is chi(x)=math.sqrt(2/a)*math.sin(n*math.pi*x/a),for the particle in the least energy state n=1\n",

      "chix=math.sqrt(2/a)*math.sin(math.pi*(a/2)/a)\n",

      "delx=5*10**-10 #interval in angstrom\n",

      "P=delx*chix**2\n",

      "print \"probability of finding the particle is P=\",P,\"unitless\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "probability of finding the particle is P= 0.4 unitless\n"

       ]

      }

     ],

     "prompt_number": 9

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.24:pg-224"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate energy of an electron\n",

      "n=1 #least energy of the particle \n",

      "h=6.63*10**-34 #planck's constant in Js\n",

      "m=9.11*10**-31 #mass of electron in kg\n",

      "a=10**-10 #width in angstrom\n",

      "E=(n**2)*(h**2)/(8*m*(1.602*10**-19)*a**2)\n",

      "print \"energy of an electron moving in one dimension in an infinitely high potential box is E=\",round(E,2),\"eV\"\n",

      "#the answer is given wrong in the book E=5.68 eV\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "energy of an electron moving in one dimension in an infinitely high potential box is E= 37.65 eV\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.26:pg-225"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate probability\n",

      "x1=0.45 #x1=0.45*L\n",

      "x2=0.55       #x2=0.55*L\n",

      "n=1                     #for ground state \n",

      "#formula is P=integrate('(2/L)*math.sin(n*math.pi*x)**2),'x',x1,x2)\n",

      "from scipy.integrate import quad\n",

      "def integrand(x):\n",

      "    return 2*(math.sin(n*math.pi*x)**2)\n",

      "P1 ,er=quad(integrand,x1,x2)\n",

      "\n",

      "print \"P1=\",round(P1,3),\"unitless\"\n",

      "probability1=P1*100\n",

      "print \"probability for the ground states is probability1 =\",round(probability1,1),\"%\"\n",

      "n=2   #for first excited state\n",

      "P2, er=quad(integrand,x1,x2)\n",

      "print \"P2=\",round(P2,4),\"unitless\"\n",

      "probability2=P2*100 \n",

      "print \"probability for first excited states is probability2=\",round(probability2,2),\"%\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "P1= 0.198 unitless\n",

        "probability for the ground states is probability1 = 19.8 %\n",

        "P2= 0.0065 unitless\n",

        "probability for first excited states is probability2= 0.65 %\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.28:pg-226"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate energy of a neutron\n",

      "#consider nucleus as a cubical box of size 10**-14m\n",

      "#x=y=z=a=10**-14=l\n",

      "#for neutron to be in the lowest energy state nx=ny=nz=1\n",

      "#formula is E=(math.pi**2*h**2/8*math.pi**2*m)*((nx/lx)**2+(ny/ly)**2+(nz/lz)**2)\n",

      "h=6.626*10**-34  #planck's constant in Js\n",

      "m=1.6*10**-27 #mass in kg\n",

      "l=10**-14 #in m\n",

      "E=(math.pi**2)*(h**2)*3/(4*(math.pi**2)*2*m*(1.6*10**-19)*l**2)\n",

      "print \"lowest energy of a neutron is E=\",round(E/(1e6),2),\"MeV\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "lowest energy of a neutron is E= 6.43 MeV\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.29:pg-226"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate zero point energy of a linear harmonic oscillator\n",

      "h=6.63*10**-34 #planck's constant in Js\n",

      "nu=50 #frequency in Hz\n",

      "zeropointenergy=(h*nu)/2\n",

      "print \"zeropointenergy=\",\"{:.2e}\".format(zeropointenergy),\"J\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "zeropointenergy= 1.66e-32 J\n"

       ]

      }

     ],

     "prompt_number": 21

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.30:pg-226"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate zero point energy\n",

      "nu=1 #frequency in Hz\n",

      "h=6.63*10**-34 #planck's constant in Js\n",

      "zeropointenergy=(h*nu)/2\n",

      "print \"zeropointenergy=\",zeropointenergy,\"J\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "zeropointenergy= 3.315e-34 J\n"

       ]

      }

     ],

     "prompt_number": 14

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.31:pg-226"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate frequency of vibration\n",

      "En=0.1*1.6*10**-19 #energy of a linear harmonic oscillator in eV\n",

      "n=3.0 #third excited state\n",

      "h=6.63*10**-34 #planck's constant\n",

      "nu=En/((n+(1/2.0))*h)\n",

      "print \"the frequency of vibration is nu=\",round(nu,-9),\"Hz\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the frequency of vibration is nu= 6.895e+12 Hz\n"

       ]

      }

     ],

     "prompt_number": 16

    }

   ],

   "metadata": {}

  }

 ]

}