summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Shyam_Singh_and_Rajeev_Singh/Chapter2.ipynb
blob: ef49544b4e1382069674073c2623b73c56a3abb6 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:614bd66037ed01713a261d0e06bb9f5175d6e2a9e3ef900d57af3a2e6efdf43f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "2: Interference and Diffraction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.1, Page number 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "t = 12*10**-5;         #thickness of mica sheet(cm)\n",
      "lamda = 6000;          #wavelength(Angstrom)\n",
      "n = 1;\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;       #wavelength(m)\n",
      "mew_1 = n*lamda/t;\n",
      "mew = mew_1+1;            #refractive index of mica\n",
      "\n",
      "#Result\n",
      "print \"refractive index of mica is\",mew\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "refractive index of mica is 1.005\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.2, Page number 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "D = 0.53;       #distance of fringes from slit(m)\n",
      "lamda = 5890;      #wavelength of light(angstrom)\n",
      "two_d = 0.6*10**-3;     #separation of slits(m)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;          #wavelength(m)\n",
      "beta = D*lamda/two_d;           #width of fringes(m)\n",
      "beta = beta*10**3;\n",
      "beta = math.ceil(beta*10**3)/10**3;   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"width of fringes is\",beta,\"*10**-3 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "width of fringes is 0.521 *10**-3 m\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.3, Page number 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "beta = 9*10**-4;       #width of fringes(m)\n",
      "d1 = 75;          #distance of fringes from biprism(cm)\n",
      "d2 = 5;           #distance of biprism from slit(cm)\n",
      "lamda = 5890;      #wavelength of light(angstrom)\n",
      "two_d = 0.6*10**-3;     #separation of slits(m)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;          #wavelength(m)\n",
      "d1 = d1*10**-2;                 #distance of fringes from biprism(m)\n",
      "d2 = d2*10**-2;                 #distance of biprism from slit(m)\n",
      "D = d1+d2;                   #distance of fringes from slit(m)\n",
      "two_d = D*lamda/beta;         #separation of slits(m)\n",
      "two_d = two_d*10**4;\n",
      "two_d = math.ceil(two_d*10**2)/10**2;   #rounding off to 2 decimals\n",
      "\n",
      "#Result\n",
      "print \"distance between slits is\",two_d,\"*10**-4 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "distance between slits is 5.24 *10**-4 m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.4, Page number 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 6*10**-7;       #wavelength(m)\n",
      "t = 7.2*10**-6;         #thickness(m)\n",
      "n = 6;\n",
      "\n",
      "#Calculation\n",
      "mew_1 = n*lamda/t;\n",
      "mew = mew_1+1;            #refractive index of sheet\n",
      "\n",
      "#Result\n",
      "print \"refractive index of sheet is\",mew"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "refractive index of sheet is 1.5\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.5, Page number 76"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "beta = 3;        #fringe separation(mm)\n",
      "mew = 1;         #refractive index\n",
      "lamda = 6000;      #wavelength(angstrom)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;         #wavelength(m)\n",
      "beta = beta*10**-3;         #fringe separation(m)\n",
      "theta = lamda/(2*mew*beta);       #angle between plates(sec)\n",
      "theeta = theta*180*3600/math.pi;     #angle between plates(sec \")\n",
      "theta = theta*10**4;\n",
      "theeta = math.ceil(theeta*10**3)/10**3;   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"angle between plates is\",theta,\"*10**-4 sec or\",theeta,\"'\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "angle between plates is 1.0 *10**-4 sec or 20.627 '\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.6, Page number 76"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 5900*10**-7;      #wavelength of light(m)\n",
      "mew = 1;             #refractive index\n",
      "n = 7.4;             #number of fringes\n",
      "\n",
      "#Calculation\n",
      "t2_t1 = n*lamda/(2*mew);       #difference of film thickness(m)\n",
      "t2_t1 = t2_t1*10**2;\n",
      "\n",
      "#Result\n",
      "print \"difference of film thickness is\",t2_t1,\"*10**-2 m\"\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "difference of film thickness is 0.2183 *10**-2 m\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.7, Page number 77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 5.9*10**-7;          #wavelength of light(m)\n",
      "n = 10;             #10th ring\n",
      "D10 = 0.5;     #diameter of 10th ring(cm)\n",
      "\n",
      "#Calculation\n",
      "D10 = D10*10**-2;      #diameter of 10th ring(m)\n",
      "R = D10**2/(4*n*lamda);        #radius of curvature of lens(m)\n",
      "R = math.ceil(R*10**4)/10**4;   #rounding off to 4 decimals\n",
      "t = D10**2/(8*R);           #thickness of the air film(m)\n",
      "\n",
      "#Result\n",
      "print \"radius of curvature of lens is\",R,\"m\"\n",
      "print \"thickness of the air film is\",round(t/1e-6,2),\"*10**-6 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radius of curvature of lens is 1.0594 m\n",
        "thickness of the air film is 2.95 *10**-6 m\n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.8, Page number 77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n = 20;          #number of fringes\n",
      "lamda = 5890;         #wavelength(angstrom)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-8;         #wavelength(cm)\n",
      "t = n*lamda/2;                #thickness of wire(cm)\n",
      "t = t*10**4;\n",
      "\n",
      "#Result\n",
      "print \"thickness of wire is\",t,\"*10**-4 cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "thickness of wire is 5.89 *10**-4 cm\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.9, Page number 77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 5880;        #wavelength(angstrom)\n",
      "n = 1;         #number of fringes\n",
      "mew = 1.5;      #refractive index\n",
      "r = 60;          #angle of refraction(degree)\n",
      "\n",
      "#Calculation\n",
      "r = r*math.pi/180;        #angle of refraction(radian)\n",
      "lamda = lamda*10**-10;         #wavelength(m)\n",
      "t = n*lamda/(2*mew*math.cos(r));       #smallest thickness of the plate(m)\n",
      "t = t*10**10;          #smallest thickness of the plate(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"smallest thickness of the plate is\",t,\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "smallest thickness of the plate is 3920.0 angstrom\n"
       ]
      }
     ],
     "prompt_number": 46
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.10, Page number 78"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n1 = 4;          #fourth ring\n",
      "n2 = 12;         #12th ring\n",
      "n3 = 20;         #20th ring\n",
      "D4 = 0.4;        #diameter of 4th ring(cm)\n",
      "D12 = 0.7;       #diameter of 12th ring(cm)\n",
      "\n",
      "#Calculation\n",
      "p1 = n2-n1;\n",
      "p2 = n3-n2;\n",
      "#D12**2-D4**2 = 4*p1*lamda*R and D20**2-D12**2 = 4*p2*lamda*R\n",
      "#therefore D12**2-D4**2 = D20**2-D12**2\n",
      "D20 = math.sqrt((2*D12**2)-(D4**2));       #diameter of 20th ring(cm)\n",
      "D20 = math.ceil(D20*100)/100;   #rounding off to 2 decimals\n",
      "\n",
      "#Result\n",
      "print \"diameter of 20th ring is\",D20,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "diameter of 20th ring is 0.91 cm\n"
       ]
      }
     ],
     "prompt_number": 50
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.11, Page number 78"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda1 = 6*10**-5;        #wavelength of light 1(cm)\n",
      "lamda2 = 4.5*10**-5;      #wavelength of light 2(cm)\n",
      "R = 90;          #radius of curvature(cm)\n",
      "\n",
      "#Calculation\n",
      "n = lamda2/(lamda1-lamda2);           #number of fringes\n",
      "Dn = math.sqrt(4*n*lamda1*R);         #diameter of nth ring(cm)\n",
      "Dn = math.ceil(Dn*10**4)/10**4;   #rounding off to 4 decimals\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"diameter of nth ring is\",Dn,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "diameter of nth ring is 0.2546 cm\n"
       ]
      }
     ],
     "prompt_number": 53
    }
   ],
   "metadata": {}
  }
 ]
}