summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_V_Yadav/1-Quantum_Mechanics.ipynb
blob: d0faa3a100fa005de58f8439bd06982707442601 (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
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 1: Quantum Mechanics"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.10: de_Broglie_wavelength_associated_with_moving_proton.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.10:  Page-1.8 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the proton, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"v = 1/20*c;        // Velocity of the proton, m/s\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"lambda = h/(m*v);  // de Broglie wavelength of the neutron, m\n",
"printf('\nThe de Broglie wavelength associated with moving proton = %5.3e m', lambda);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength associated with moving proton = 2.645e-14 m\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.11: Wavelength_of_matter_wave_associated_with_moving_proton.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.11: Page-1.8 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the proton, kg\n",
"v = 2e+08;        // Velocity of the proton, m/s\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"lambda = h/(m*v);  // de Broglie wavelength of the neutron, m\n",
"printf('\nThe wavelength of matter wave associated with moving proton = %5.3e m', lambda);\n",
"\n",
"// Result \n",
"// The wavelength of matter wave associated with moving proton = 1.984e-15 m \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.12: de_Broglie_wavelength_of_an_electron_accelerated_through_a_given_potential.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.12: Page-1.17 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;      // Mass of the electron, kg\n",
"q = 1.6e-019;       // Charge on an electron, C\n",
"V = 50;     // Accelearting potential, V\n",
"E = q*V;    // Energy gained by the electron, J\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"lambda = h/sqrt(2*m*E);  // de Broglie wavelength of the electron, m\n",
"printf('\nThe de Broglie wavelength of the electron accelearted through a given potential = %5.3e m', lambda);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the electron accelearted through a given potential = 1.736e-10 m \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.13: Interplanar_spacing_of_the_crystal.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.13: Page-1.17 (2009)\n",
"clc; clear;\n",
"theta = 45;     // Diffraction angle, degrees\n",
"h = 6.626e-034;     // Planck's constant\n",
"m = 1.67e-027;      // Mass of a neutron, kg\n",
"n = 1;      // Order of diffraction\n",
"k = 1.38e-023;  // Boltzmann constant, J/mol/K\n",
"T = 27+273;     // Absolute room temperature, K\n",
"E = 3/2*k*T;    // Energy of the neutron, J\n",
"lambda = h/sqrt(2*m*E); // de-Broglie wavelength of neutrons, m\n",
"// From Bragg's law, 2*d*sin(theta) = n*lambda, solving for d\n",
"d = n*lambda/(2*sind(theta));\n",
"printf('\nThe interplanar spacing of the crystal = %4.2f angstrom', d/1e-010);\n",
"\n",
"// Result \n",
"// The interplanar spacing of the crystal = 1.03 angstrom "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.14: Interplanar_spacing_using_Bragg_law.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.14: Page-1.18 (2009)\n",
"clc; clear;\n",
"theta = 70;     // Glancing angle at which reflection occurs, degrees\n",
"h = 6.626e-034;     // Planck's constant\n",
"m = 9.1e-031;      // Mass of a electron, kg\n",
"e = 1.6e-019;       // Electronic charge, C\n",
"V = 1000;   // Accelerating potential, V\n",
"n = 1;      // Order of diffraction\n",
"E = e*V;    // Energy of the electron, J\n",
"lambda = h/sqrt(2*m*E); // de-Broglie wavelength of electron, m\n",
"// From Bragg's law, 2*d*sin(theta) = n*lambda, solving for d\n",
"d = n*lambda/(2*sind(theta));   // Interplanar spacing, m\n",
"printf('\nThe interplanar spacing of the crystal = %6.4e m', d);\n",
"\n",
"// Result \n",
"// The interplanar spacing of the crystal = 2.0660e-11 m \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.15: de_Broglie_wavelength_of_electron_accelerated_at_V_volts.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.15: Page-1.18 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;     // Planck's constant\n",
"m = 9.1e-031;      // Mass of a electron, kg\n",
"e = 1.6e-019;       // Electronic charge, C\n",
"V = 1;   // For simplicity the accelerating potential is assumed to be unity, V\n",
"E = e*V;    // Energy of the electron, J\n",
"lambda = h/sqrt(2*m*E); // de-Broglie wavelength of electron, m\n",
"printf('\nde-Broglie wavelength of electron accelerated at V volts = %5.2f/sqrt(V) angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// de-Broglie wavelength of electron accelerated at V volts = 12.23/sqrt(V) angstrom "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.16: de_Broglie_wavelength_of_electron_accelerated_from_rest.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.16: Page-1.18 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;     // Planck's constant\n",
"m = 9.1e-031;      // Mass of a electron, kg\n",
"e = 1.6e-019;       // Electronic charge, C\n",
"V = 100;   // Accelerating potential for electron, V\n",
"E = e*V;    // Energy of the electron, J\n",
"lambda = h/sqrt(2*m*E); // de-Broglie wavelength of electron, m\n",
"printf('\nde-Broglie wavelength of electron accelerated at %d volts = %6.4e m', V, lambda);\n",
"\n",
"// Result \n",
"// de-Broglie wavelength of electron accelerated at 100 volts = 1.2231e-10 m "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.17: The_wavelength_associated_with_moving_mass.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.17:  Page-1.19 (2009)\n",
"clc; clear;\n",
"m = 10e-03;     // Mass of the body, kg\n",
"v = 110;    // Velocity of the mass, m/s\n",
"h = 6.6e-034;     // Planck's constant\n",
"lambda = h/(m*v); // de-Broglie wavelength of electron, m\n",
"printf('\nThe wavelength associated with mass moving with velocity %d m/s = %1.0e m', v, lambda);\n",
"\n",
"// Result \n",
"// The wavelength associated with mass moving with velocity 110 m/s = 6e-34 m "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.18: Wavelength_of_an_electron_from_its_kinetic_energy.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.18:  Page-1.19 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;     // Mass of the electron, kg\n",
"Ek = 1.27e-017;     // Kinetic energy of electron, J\n",
"h = 6.6e-034;     // Planck's constant\n",
"lambda = h/sqrt(2*m*Ek); // de-Broglie wavelength of electron, m\n",
"printf('\nThe wavelength associated with moving electron = %4.2f angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// The wavelength associated with moving electron = 1.37 angstrom "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.19: Kinetic_energy_of_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.19: Page-1.19 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;     // Mass of the electron, kg\n",
"h = 6.6e-034;     // Planck's constant\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"lambda = 9.1e-012; // de-Broglie wavelength of electron, m\n",
"// We have lambda = h/(m*v), solving for v\n",
"v = h/(m*lambda);   // Velocity of the electron, m/s\n",
"K = 1/2*m*v^2;     // Kinetic energy of electron, J\n",
"printf('\nThe kinetic energy of electron having wavelength %3.1e m = %4.2e eV', lambda, K/e);\n",
"\n",
"// Result \n",
"// The kinetic energy of electron having wavelength 9.1e-12 m = 1.81e+04 eV \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.1: Energy_of_the_particle_from_de_Broglie_wavelength.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.1:Page-1.5 (2009)\n",
"clc; clear;\n",
"lambda = 2.1e-010;  // de Broglie wavelength of the particle, m\n",
"m = 1.67e-027;      // Mass of the particle, kg\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"// From de Broglie relation, lambda = h/sqrt(2*m*E), solving for E\n",
"E = h^2/(2*m*lambda^2*e);     // Energy of the particle, eV\n",
"printf('\nThe energy of the particle from de Broglie wavelength = %5.3e eV', E);\n",
"\n",
"// Result \n",
"// The energy of the particle from de Broglie wavelength = 1.863e-002 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.20: Speed_of_proton_for_an_equivalent_wavelength_of_that_of_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.20: : Page-1.19 (2009)\n",
"clc; clear;\n",
"m_e = 9.1e-031;     // Mass of the electron, kg\n",
"m_p = 1.67e-027;    // Mass of the proton, kg\n",
"v_e = 1;    // For simplicity assume velocity of electron to be unity, m/s\n",
"// From de-Broglie relation, \n",
"// lambda_p = lambda_e = h(m*v_p), solving for v_p\n",
"v_p = m_e*v_e/m_p;  // Velocity of the proton, m/s\n",
"// As lambda_e = h/sqrt(2*m_e*K_e) and lambda_p = h/sqrt(2*m_p*K_p), solving for K_e/K_p\n",
"K_ratio = m_p/m_e;      // Ratio of kinetic energies of electron and proton\n",
"\n",
"printf('\nThe speed of proton for an equivalent wavelength of that of electron = %3.1e ve', v_p);\n",
"printf('\nRatio of kinetic energies of electron and proton = %3.1e, therefore Ke > Kp', K_ratio);\n",
"\n",
"// Result \n",
"// The speed of proton for an equivalent wavelength of that of electron = 5.4e-04 ve\n",
"// Ratio of kinetic energies of electron and proton = 1.8e+03, therefore Ke > Kp "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.21: de_Broglie_wavelength_of_the_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.21: Page-1.20 (2009)\n",
"clc; clear;\n",
"V = 50; // Potential difference, V\n",
"m = 9.1e-031;     // Mass of the electron, kg\n",
"e = 1.6e-019;     // Electronic charge, C\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"lambda = h/sqrt(2*m*e*V);    // From de-Broglie relation,\n",
"printf('\nde-Broglie wavelength of the electron = %4.2f angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// de-Broglie wavelength of the electron = 1.73 angstrom"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.23: Minimum_accuracy_to_locate_the_position_of_an_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.23:: Page-1.31 (2009)\n",
"clc; clear;\n",
"v = 740;    // Speed of the electron, m/s\n",
"m = 9.1e-031;     // Mass of the electron, kg\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"p = m*v;    // Momentum of the electron, kg-m/s\n",
"frac_v = 0.05/100;  // Correctness in the speed \n",
"delta_p = p*frac_v;    // Uncertainty in momentum, kg-m/s\n",
"delta_x = h/(4*%pi)*1/delta_p;  // Uncertainty in position, m\n",
"\n",
"printf('\nThe minimum accuracy to locate the position of an electron = %4.2e m',delta_x);\n",
"\n",
"// Result \n",
"// The minimum accuracy to locate the position of an electron = 1.56e-04 m  "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.24: Uncertainty_in_energy_of_an_emitted_photon.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.24: : Page-1.31 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"h_cross = h/(2*%pi);    // Reduced Planck's constant, Js\n",
"delta_t = 1e-010;   // Uncertainty in time, s\n",
"// From Energy-time uncertainty, \n",
"// delta_E*delta_t = h_cross/2, solving for delta_E\n",
"delta_E = h_cross/(2*delta_t);  // Uncertainty in energy of an emitted photon, J \n",
"\n",
"printf('\nThe uncertainty in energy of an emitted photon = %5.3e eV', delta_E/1.6e-019);\n",
"\n",
"// Result \n",
"// The uncertainty in energy of an emitted photon = 3.283e-06 eV"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.25: Minimum_uncertainty_in_velocity_of_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.25: : Page-1.31 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"delta_x_max = 1e-007;   // Uncertainty in length, m\n",
"m = 9.1e-031;   // Mass of an electron, kg\n",
"// From Position-momentum uncertainty, \n",
"// delta_p_min = m*delta_v_min = h/delta_x_max, solving for delta_v_min\n",
"delta_v_min = h/(delta_x_max*m);    // Minimum uncertainty in velocity of electron, m/s\n",
"\n",
"printf('\nThe minimum uncertainty in velocity of electron = %4.2e m/s', delta_v_min);\n",
"\n",
"// Result \n",
"// The minimum uncertainty in velocity of electron = 7.25e+03 m/s "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.26: Minimum_uncertainty_in_momentum_and_minimum_kinetic_energy_of_proton.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.26:  Page-1.32 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"delta_x_max = 8.5e-014;   // Uncertainty in length, m\n",
"m = 1.67e-027;  // Mass of proton, kg\n",
"// From Position-momentum uncertainty, \n",
"// delta_p_min*delta_x_max = h, solving for delta_p_min\n",
"delta_p_min = h/delta_x_max;    // Minimum uncertainty in momentum of electron, kg-m/s\n",
"p_min = delta_p_min;    // Minimum momentum of the proton, kg.m/s\n",
"delta_E = p_min^2/(2*m); \n",
"   \n",
"printf('\nThe minimum uncertainty in momemtum of proton = %4.2e kg-m/s', p_min);\n",
"printf('\nThe kinetic energy of proton = %6.3e eV', delta_E/1.6e-019);\n",
"\n",
"// Result \n",
"// The minimum uncertainty in momemtum of proton = 7.76e-21 kg-m/s\n",
"// The kinetic energy of proton = 1.128e+05 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.27: Uncertainty_in_momentum_of_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.27:: Page-1.32 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"E = 0.15*1e+03*e;   // Energy of the electron, J\n",
"m = 9.1e-031;  // Mass of electron, kg\n",
"delta_x = 0.5e-010; // Position uncertainty of electron, m\n",
"p = (2*m*E)^(1/2);  // Momentum of the electron, kg-m/s\n",
"// delta_x*delta_p = h/(4*%pi), solving for delta_p\n",
"delta_p = h/(4*%pi*delta_x);    // Uncertainty in momentum of electron, kg-m/s\n",
"frac_p = delta_p/p*100;     // Percentage uncertainty in momentum of electron, kg-m/s\n",
"\n",
"printf('\nThe percentage uncertainty in momentum of electron = %2d percent', frac_p);\n",
"\n",
"// Result \n",
"// The percentage uncertainty in momentum of electron = 15 percent   "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.28: Uncertainty_in_position_of_the_particle.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.28:: Page-1.33 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"delta_v = 7.54e-015;    // Uncertainty in velocity of the particle, m/s\n",
"m = 0.25e-06;  // Mass of particle, kg\n",
"// delta_x*delta_p = h/(4*%pi), solving for delta_x\n",
"delta_x = h/(4*%pi*m*delta_v); // Position uncertainty of particle, m\n",
"\n",
"printf('\nThe position uncertainty of particle = %4.2e m', delta_x);\n",
"\n",
"// Result \n",
"// The position uncertainty of particle = 2.79e-14 m   "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.29: Uncertainty_in_position_of_the_moving_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.29:: Page-1.33 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"v = 450;        // Velocity of the electron, m/s\n",
"delta_v = v*0.05/100;    // Uncertainty in velocity of the particle, m/s\n",
"m = 9.1e-031;  // Mass of electron, kg\n",
"// delta_x*delta_p = h/(4*%pi), solving for delta_x\n",
"delta_x = h/(4*%pi*m*delta_v); // Position uncertainty of particle, m\n",
"\n",
"printf('\nThe position uncertainty of moving electron = %4.2e m', delta_x);\n",
"\n",
"// Result \n",
"// The position uncertainty of moving electron = 2.57e-04 m "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.2: de_Broglie_wavelength_of_the_particle.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.2: Page-1.5 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the particle, kg\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"E = 1e+011*e;     // Energy of the particle, J\n",
"lambda = h/sqrt(2*m*E);     // de Broglie wavelength of the particle, m\n",
"printf('\nThe de Broglie wavelength of the particle = %4.2e m', lambda);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the particle = 9.06e-017 m "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.30: Smallest_possible_uncertainty_in_position_of_the_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.30:: Page-1.33 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"c = 3e+08;      // Speed of light, m/s\n",
"v = 3e+07;        // Velocity of the electron, m/s\n",
"m0 = 9.1e-031;  // Rest mass of electron, kg\n",
"m = m0/sqrt(1-v^2/c^2); // Mass of moving electron, kg\n",
"delta_p_max = m*v;    // Maximum uncertainty in momentum of the particle, m/s\n",
"// delta_x_min*delta_p_max = h/(4*%pi), solving for delta_x_min\n",
"delta_x_min = h/(4*%pi*delta_p_max); // Minimum position uncertainty of particle, m\n",
"\n",
"printf('\nThe smallest possible uncertainty in position of the electron = %5.3f angstrom', delta_x_min/1e-010);\n",
"\n",
"// Result \n",
"// The smallest possible uncertainty in position of the electron = 0.019 angstrom"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.31: EX1_31.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.31:  : Page-1.44 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"l = 2e-002;     // Length of the side of the cube, m\n",
"E_F = 9*e;  // Fermi energy, J\n",
"// As E_F = h^2/(8*m*l^2)*(nx^2 + ny^2 + nz^2) and nx = ny = nz for a cube, solving for nx\n",
"nx = sqrt(E_F*(8*m*l^2)/(3*h^2));   // Value of integer for a cube\n",
"E = h^2/(8*m*l^2)*3*nx^2; // Fermi energy, J\n",
"E1 = h^2/(8*m*l^2)*((nx-1)^2 + nx^2 + nx^2);    // Energy of the level just below the fermi level, J\n",
"delta_E = E - E1;   // Difference in the energy between the neighbouring levels of Na at the highest state, J\n",
"printf('\nThe energy difference between the neighbouring levels of Na at the highest state = %4.2e eV', delta_E/e);\n",
"// Result \n",
"// The energy difference between the neighbouring levels of Na at the highest state = 1.06e-07 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.32: Energy_of_the_neutron_confined_in_a_nucleus.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.32:: Page-1.45 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 1.67e-027;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"nx = 1, ny = 1, nz = 1; // Principle quantum numbers in 3D corresponding to the longest energy state\n",
"lx = 1e-014, ly = 1e-014, lz = 1e-014;    // Dimensions of the box to which the neutron is confined, m\n",
"E = h^2/(8*m)*(nx^2/lx^2+ny^2/ly^2+nz^2/lz^2);    // Energy of the neutron confined in the nucleus, J\n",
"printf('\nThe energy of the neutron confined in a nucleus = %4.2e eV', E/e);\n",
"// Result \n",
"// The energy of the neutron confined in a nucleus = 6.11e+06 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.33: Energy_of_an_electron_moving_in_one_dimensional_infinitely_high_potential_box.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.33:: Page-1.46 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"n = 1;     // For simplicity assume principle quantum number to be unity\n",
"l = 2.1e-010;   // Length of one dimensional potential box, m\n",
"E = h^2*n^2/(8*m*l^2);    // Energy of the electron, J\n",
"printf('\nThe energy of the electron moving in one dimensional infinitely high potential box = %4.2f n^2 eV', E/e);\n",
"// Result \n",
"// The energy of the electron moving in one dimensional infinitely high potential box = 8.48 n^2 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.34: Lowest_energy_of_an_electron_in_a_one_dimensional_force_free_region.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.34:: Page-1.46 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"n = 1;     // The lowest energy state of electron\n",
"l = 3.5e-010;   // Length of one dimensional potential box, m\n",
"E = h^2*n^2/(8*m*l^2);    // Energy of the electron in the lowest state, J\n",
"printf('\nThe lowest energy of the electron in a one dimensional force free region = %1d eV', E/e);\n",
"// Result \n",
"// The lowest energy of an electron in a one dimensional force free region = 3 eV"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.35: First_three_energy_levels_of_an_electron_in_one_dimensional_box.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.35:: Page-1.46 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"l = 9.5e-010;   // Length of one dimensional potential box, m\n",
"// First energy level\n",
"n = 1;     // The first energy state of electron\n",
"E1 = h^2*n^2/(8*m*l^2);    // Energy of the electron in first state, J\n",
"// Second energy level\n",
"n = 2;     // The second energy state of electron\n",
"E2 = h^2*n^2/(8*m*l^2);    // Energy of the electron in second state, J\n",
"// Third energy level\n",
"n = 3;     // The third energy state of electron\n",
"E3 = h^2*n^2/(8*m*l^2);    // Energy of the electron in third state, J\n",
"printf('\nThe energy of the electron in first state  = %4.1e J', E1);\n",
"printf('\nThe energy of the electron in second state  = %4.1e J', E2);\n",
"printf('\nThe energy of the electron in third state  = %4.1e J', E3);\n",
"// Result \n",
"// The energy of the electron in first state  = 6.6e-20 J\n",
"// The energy of the electron in second state  = 2.7e-19 J\n",
"// The energy of the electron in third state  = 6.0e-19 J "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.36: Lowest_two_permitted_energy_values_of_the_electron_in_a_1D_box.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.36:: Page-1.47 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"l = 2.5e-010;   // Length of one dimensional potential box, m\n",
"// First energy level\n",
"n = 1;     // The lowest energy state of electron\n",
"E1 = h^2*n^2/(8*m*l^2);    // Energy of the electron in first state, J\n",
"// Second energy level\n",
"n = 2;     // The second energy state of electron\n",
"E2 = h^2*n^2/(8*m*l^2);    // Energy of the electron in second state, J\n",
"printf('\nThe energy of the electron in lowest state  = %5.2f eV', E1/e);\n",
"printf('\nThe energy of the electron in second state  = %5.2f eV', E2/e);\n",
"// Result \n",
"// The energy of the electron in lowest state  =  5.98 eV\n",
"// The energy of the electron in second state  = 23.93 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.37: Lowest_energy_of_the_neutron_confined_to_the_nucleus.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.37:: Page-1.47 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m = 1.67e-027;   // Electronic mass, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"l = 2.5e-010;   // Length of one dimensional potential box, m\n",
"delta_x = 1e-014;   // Uncertainty in position of neutron, m\n",
"// From uncertainty principle, \n",
"// delta_x*delta_p = h/(4*%pi), solving for delta_p\n",
"delta_p = h/(4*%pi*delta_x);    // Uncertainty in momentum of neutron, kg-m/s\n",
"p = delta_p;    // Momemtum of neutron in the box, kg-m/s\n",
"KE = p^2/(2*m); // Kinetic energy of neutron in the box, J\n",
"printf('\nThe lowest energy of the neutron confined to the nucleus = %4.2f MeV', KE/(e*1e+06));\n",
"// Result \n",
"// The lowest energy of the neutron confined to the nucleus = 0.05 MeV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.38: X_ray_scattering.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.38: : Page-1.56 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m0 = 9.1e-031;   // Electronic mass, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"phi = 45;     // Scattering angle of X-rays, degrees\n",
"E = 75;     // Incident energy of X-rays, keV\n",
"// As from Compton shift formula\n",
"// 1/E_prime - 1/E = 1/(m0*c^2)*(1-cosd(phi))\n",
"// Solving for E_prime\n",
"E_prime = 1/((1/(m0*c^2/(e*1e+03)))*(1-cosd(phi))+1/E); // Energy of scattered photon, keV\n",
"E_recoil = E - E_prime;     // Energy of recoil electron, keV\n",
"printf('\nThe energy of scattered X-ray = %4.1f keV', E_prime);\n",
"printf('\nThe energy of recoil electron = %3.1f keV', E_recoil);\n",
"// Result \n",
"// The energy of scattered X-ray = 71.9 keV\n",
"// The energy of recoil electron = 3.1 keV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.39: Wavelength_of_scattered_Xray.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.39: : Page-1.57 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m0 = 9.1e-031;   // Electronic mass, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"phi = 60;     // Scattering angle of X-rays, degrees\n",
"E = 75;     // Incident energy of X-rays, keV\n",
"// As from Compton shift formula\n",
"delta_L = h/(m0*c)*(1-cosd(phi));   // Change in photon wavelength, m\n",
"lambda = 0.198e-010;    // Wavelength of incident photon, m\n",
"lambda_prime = (lambda+delta_L)/1e-010;  // Wavelength of scattered X-ray, angstrom \n",
"printf('\nThe wavelength of scattered X-ray = %6.4f angstrom', lambda_prime);\n",
"// Result \n",
"// The wavelength of scattered X-ray = 0.2101 angstrom"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.3: de_Broglie_wavelength_of_an_accelerated_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.3: Page-1.5 (2009)\n",
"clc; clear;\n",
"V = 20e+03;     // Accelerating voltage of electron, V\n",
"lambda = 12.25/sqrt(V);     // de Broglie wavelength of the accelerated electron, m\n",
"printf('\nThe de Broglie wavelength of the electron = %6.4f angstrom', lambda);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the electron = 0.0866 angstrom "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.40: Wavelength_of_scattered_radiation_with_changed_angle_of_view.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.40:: Page-1.57 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m0 = 9.1e-031;   // Electronic mass, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"phi = 180;     // Scattering angle of X-rays, degrees\n",
"lambda = 1.78;    // Wavelength of incident photon, m\n",
"lambda_prime = 1.798;  // Wavelength of scattered X-ray, angstrom \n",
"// As from Compton shift formula\n",
"// lambda_prime - lambda = h/(m0*c)*(1-cosd(phi)), Change in photon wavelength, m\n",
"// Or we may write, lambda_prime - lambda = k*(1-cosd(phi))\n",
"// solving for k\n",
"k = (lambda_prime - lambda)/(1-cosd(phi));  // k = h/(m0*c) value, angstrom\n",
"// For phi = 60\n",
"phi = 60;       // New angle of scattering, degrees\n",
"lambda_prime = lambda + k*(1-cosd(phi)); // Wavelength of scattered radiation at 60 degree angle, angstrom\n",
"printf('\nThe wavelength of scattered X-ray at %d degrees view = %6.4f angstrom', phi, lambda_prime);\n",
"// Recoil energy of electron\n",
"E = h*c*(1/lambda - 1/lambda_prime)*1e+010;    // Recoil energy of electron, joule\n",
"printf('\nThe recoil energy of electron scattered through %d degrees = %4.1f eV', phi, E/e);      \n",
"// Result \n",
"// The wavelength of scattered X-ray at 60 degrees view = 1.7845 angstrom\n",
"// The recoil energy of electron scattered through 60 degrees = 17.5 eV "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.41: Compton_scattering_through_aluminium_foil.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.41:: Page-1.58 (2009)\n",
"clc; clear;\n",
"h = 6.6e-034;    // Planck's constant, Js\n",
"m0 = 9.1e-031;   // Electronic mass, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"phi = 90;     // Scattering angle of X-rays, degrees\n",
"E = 510*1e+03*e;    // Energy of incident photon, J\n",
"// As E = h*c/lambda, solving for lambda\n",
"lambda = h*c/E;    // Wavelength of incident photon, m\n",
"// As from Compton shift formula\n",
"// lambda_prime - lambda = h/(m0*c)*(1-cosd(phi)), solving for lambda_prime\n",
"lambda_prime = lambda + h/(m0*c)*(1-cosd(phi));  // Wavelength of scattered X-ray, m  \n",
"printf('\nThe wavelength of scattered X-ray as viewed at %d degrees = %4.2e m', phi, lambda_prime);\n",
"// Recoil energy of electron\n",
"E = h*c*(1/lambda - 1/lambda_prime);    // Recoil energy of electron, joule\n",
"printf('\nThe recoil energy of electron scattered through %d degrees = %4.2e eV', phi, E/e);\n",
"// Direction of recoil electron\n",
"theta = atand(lambda*sind(phi)/(lambda_prime-lambda*cosd(phi)));  // Direction of recoil electron, degrees\n",
"printf('\nThe direction of emission of recoil electron = %5.2f degrees', theta);\n",
"      \n",
"// Result \n",
"// The wavelength of scattered X-ray as viewed at 90 degrees = 4.84e-12 m\n",
"// The recoil energy of electron scattered through 90 degrees = 2.55e+05 eV\n",
"// The direction of emission of recoil electron = 26.61 degrees "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.42: Energetic_electrons_in_the_Xray_tube.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.42: : Page-1.59 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;   // Electronic mass, kg\n",
"c = 3e+08;      // Speed of light, m/s\n",
"e = 1.6e-019;   // Charge on the electron, C\n",
"V = 12.4e+03;   // Potential diffeence applied across the X-ray tube, V\n",
"i = 2e-03;  // Current through the X-ray tube, A\n",
"t = 1;  // Time for which the electrons strike the target material, s\n",
"N = i*t/e;    // Number of electrons striking the target per sec, per sec\n",
"v_max = sqrt(2*e*V/m);  // Maximum speed of the electrons, m/s\n",
"printf('\nThe number of electrons striking the target per sec = %4.2e electrons/sec', N);\n",
"printf('\nThe maximum speed of the electrons when they strike = %3.1e m/s', v_max);\n",
"      \n",
"// Result \n",
"// The number of electrons striking the target per sec = 1.25e+16 electrons/sec\n",
"// The maximum speed of the electrons when they strike = 6.6e+07 m/s"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.4: Energy_of_the_electron_from_de_Broglie_wavelength.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.4:  Page-1.6 (2009)\n",
"clc; clear;\n",
"lambda = 5.2e-03;  // de Broglie wavelength of the electron, m\n",
"m = 9.1e-031;      // Mass of the electron, kg\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"// From de Broglie relation, lambda = h/sqrt(2*m*E), solving for E\n",
"E = h^2/(2*m*lambda^2*e);     // Energy of the electron, eV\n",
"printf('\nThe energy of the electron from de Broglie wavelength = %5.3e eV', E);\n",
"\n",
"// Result \n",
"// The energy of the electron from de Broglie wavelength = 5.576e-014 eV \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.5: Velocity_and_de_Broglie_wavelength_of_a_neutron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.5: Page-1.6 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the neutron, kg\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"E = 1e+04*e;    // Energy of the neutron, J\n",
"// As E = 1/2*m*v^2, solving for v\n",
"v = sqrt(2*E/m);    // Velocity of the neutron, m/s\n",
"lambda = h/(m*v);  // de Broglie wavelength of the neutron, m\n",
"printf('\nThe velocity of the neutron = %4.2e m/s', v);\n",
"printf('\nThe de Broglie wavelength of the neutron = %4.2e m', lambda);\n",
"\n",
"// Result \n",
"// The velocity of the neutron = 1.38e+006 m/s\n",
"// The de Broglie wavelength of the neutron = 2.87e-013 m \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.6: Wavelength_of_thermal_neutron_at_room_temperature.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.6: Page-1.6 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the neutron, kg\n",
"k = 1.38e-023;      // Boltzmann constant, J/mol/K\n",
"T = 27+273;         // Room temperature, K\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"v = sqrt(3*k*T/m);      // Velocity of the neutron, m/s\n",
"lambda = h/(m*v);  // de Broglie wavelength of the neutron, m\n",
"printf('\nThe de Broglie wavelength of the thermal neutrons = %4.2f angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the thermal neutrons = 1.45 angstrom \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.7: Angle_of_deviation_for_first_order_diffraction_maxima.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.7: Page-1.6 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;      // Mass of the electron, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"E = 20e+03*e;     // Energy of the electron, J\n",
"// As 1/2*m*v^2 = E, solving for v\n",
"v = sqrt(2*E/m);        // Velocity of the electron, m/s\n",
"lambda = h/(m*v);  // de Broglie wavelength of the electron, m\n",
"n = 1;  // First order diffraction\n",
"d = 9.8e-011;       // Atomic spacing for thin gold foil, m\n",
"// Using Bragg's equation, 2*d*sin(theta) = n*lambda and solving for theta\n",
"theta = asind(n*lambda/(2*d));      // Angle of deviation for first order diffraction maxima, degree\n",
"printf('\nThe angle of deviation for first order diffraction maxima = %4.2f degrees', theta);\n",
"\n",
"// Result \n",
"// The angle of deviation for first order diffraction maxima = 2.54 degrees \n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.8: de_Broglie_wavelength_of_a_moving_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.8:  Page-1.7 (2009)\n",
"clc; clear;\n",
"m = 9.1e-031;      // Mass of the electron, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"E = 5*e;     // Energy of the electron, J\n",
"// As 1/2*m*v^2 = E, solving for v\n",
"v = sqrt(2*E/m);        // Velocity of the electron, m/s\n",
"lambda = h/(m*v);  // de Broglie wavelength of the electron, m\n",
"printf('\nThe de Broglie wavelength of the electron = %3.1f angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the electron = 5.5 angstrom\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.9: de_Broglie_wavelength_of_a_neutron_of_given_kinetic_energy.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.9: Page-1.7 (2009)\n",
"clc; clear;\n",
"m = 1.67e-027;      // Mass of the neutron, kg\n",
"e = 1.6e-019;   // Energy equivalent of 1 eV, J/eV\n",
"h = 6.626e-034;     // Planck's constant, Js\n",
"E = 1*e;     // Energy of the electron, J\n",
"lambda = h/sqrt(2*m*E);  // de Broglie wavelength of the neutron, m\n",
"printf('\nThe de Broglie wavelength of the neutron = %4.2f angstrom', lambda/1e-010);\n",
"\n",
"// Result \n",
"// The de Broglie wavelength of the neutron = 0.29 angstrom \n",
""
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}