summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_PV_Naik/Chapter5.ipynb
blob: d125b3659ef278b68ce9f81fd0bfa3583f2cd03d (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:f4c05fd79d4d56cbd4b08f847aeb0bba767b388c9bbe1bea8066d97e3ac78212"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "5: Diffraction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.1, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=1;\n",
      "lamda=600*10**-9;                 #wavelength(m)\n",
      "theta=35;                          #angle at which first minimum falls(degrees)\n",
      "\n",
      "#Calculation                        \n",
      "theta=theta*math.pi/180;      #angle at which first minimum falls(radian)\n",
      "d=((n*lamda)/math.sin(theta))*10**6;      #width of the slit(micro m)\n",
      "\n",
      "#Result\n",
      "print \"The width of the slit is\",round(d,2),\"micro m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The width of the slit is 1.05 micro m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.2, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "D=0.95;                          #distance of the screen from the slit(m)\n",
      "lamda=589*10**-9;                #wavelength(m)\n",
      "d=0.5*10**-3;                     #width of the slit(m)\n",
      "\n",
      "#Calculation                        \n",
      "y=((2*D*lamda)/d)*10**3;         #width of a central band(mm)\n",
      "\n",
      "#Result\n",
      "print \"The width of the central band is\",round(y,2),\"mm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The width of the central band is 2.24 mm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.3, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "D=1.1;                        #distance of the screen from the slit(m)\n",
      "lamda=589*10**-9;             #wavelength(m)\n",
      "y=4.5*10**-3;                  #distance of first minimum on either side of central maximum(m)\n",
      "\n",
      "#Calculation                        \n",
      "d=((D*lamda)/y)*10**3         #slit width(mm)\n",
      "\n",
      "#Result\n",
      "print \"The slit width is\",round(d,3),\"mm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The slit width is 0.144 mm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.4, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=4;\n",
      "lamda=589.6*10**-9;                  #wavelength(m)\n",
      "D=0.95;                              #distance of the screen from the slit(m)\n",
      "w=0.28*10**-3;                        #width of the slit(m)\n",
      "\n",
      "#Calculation                        \n",
      "d=((n*lamda*D)/w)*10**3;     #distance between centres(mm)\n",
      "\n",
      "#Result\n",
      "print \"The distance between centres of central maximum and the fourth dark fringe is\",int(d),\"mm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The distance between centres of central maximum and the fourth dark fringe is 8 mm\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.5, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "s=5*math.pi/2;                           #secondary maximum\n",
      "\n",
      "#Calculation                        \n",
      "I=(math.sin(s)/s)**2;                      #I2/I0\n",
      "\n",
      "#Result\n",
      "print \"Ratio of intensities of central & second secondary maximum is\",round(I,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of intensities of central & second secondary maximum is 0.016\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.6, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=450*10**-9;                  #wavelength(m)\n",
      "n=2;\n",
      "dlambda=1*10**-9;                   #difference in wavelength(m)\n",
      "\n",
      "#Calculation                        \n",
      "N=lamda/(n*dlambda);               #minimum number of lines per cm \n",
      "\n",
      "#Result\n",
      "print \"The minimum number of lines per cm is\",N/2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum number of lines per cm is 112.5\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.7, Page number 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=1;\n",
      "lamda=650*10**-9;                       #wavelength(m)\n",
      "d=2*10**-6;                              #width of the slit(m)\n",
      "\n",
      "#Calculation                        \n",
      "theta=math.asin((n*lamda)/d);                #angle at which first minimum will be observed(radian)\n",
      "theta=theta*180/math.pi;      #angle at which first minimum will be observed(degrees)\n",
      "\n",
      "#Result\n",
      "print \"The angle at which first minimum will be observed is\",round(theta,3),\"degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angle at which first minimum will be observed is 18.966 degrees\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.8, Page number 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=600*10**-9;                           #wavelength(m)\n",
      "y=2*10**-3;                                 #width of the central band(m)\n",
      "D=1;                                       #distance of the screen from the slit(m)\n",
      "\n",
      "#Calculation                        \n",
      "d=((2*D*lamda)/y)*10**3;                    #slit width(mm)\n",
      "\n",
      "#Result\n",
      "print \"The slit width is\",d,\"mm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The slit width is 0.6 mm\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.9, Page number 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "y=6*10**-3;                     #first minimum is observed(m)\n",
      "d=90*10**-6;                    #slit width(m)\n",
      "D=0.98;                        #distance of the screen from the slit(m)\n",
      "\n",
      "#Calculation                        \n",
      "lamda=((y*d)/D)*10**9;           #wavelength(nm)\n",
      "\n",
      "#Result\n",
      "print \"The wavelength of light used is\",int(lamda),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength of light used is 551 nm\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.10, Page number 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=1;\n",
      "lambda1=450*10**-9;                   #wavelength of first spectral line(m)\n",
      "d=1/5000;                    #number of lines\n",
      "\n",
      "#Calculation                        \n",
      "theta1=math.asin((n*lambda1)/d);    \n",
      "theta1=round(theta1*10**2*180/math.pi);\n",
      "theta2=theta1+2.97;\n",
      "theta2=theta2*math.pi/180;\n",
      "lambda2=d*math.sin(theta2)/n;    #wavelength of second spectral line(nm)\n",
      "\n",
      "#Result\n",
      "print \"The wavelength of second spectral line is\",int(lambda2*10**7),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength of second spectral line is 550 nm\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.11, Page number 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=3;\n",
      "lamda=700*10**-9;              #wavelength(m)\n",
      "theta=90;         #angle(degrees)\n",
      "\n",
      "#Calculation                        \n",
      "theta=theta*math.pi/180;     #angle(radian)\n",
      "d=n*lamda/math.sin(theta);    #grating element(m)\n",
      "\n",
      "#Result\n",
      "print \"The minimum grating element required to observe the entire third order spectrum is\",d*10**6,\"*10**-6 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum grating element required to observe the entire third order spectrum is 2.1 *10**-6 m\n"
       ]
      }
     ],
     "prompt_number": 45
    }
   ],
   "metadata": {}
  }
 ]
}