summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb
blob: cea37dd013a70f018bb8ceadf00ec0b435e1f5e9 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#14: Optics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.1, Page number 14.41"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ratio of maximum intensity to minimum intensity is 19.727\n",
      "answer varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "I1=10;     #intensity(w/m**2)\n",
    "I2=25;     #intensity(w/m**2)\n",
    "\n",
    "#Calculation\n",
    "a1bya2=math.sqrt(I1/I2);    \n",
    "I=((1+a1bya2)**2)/((a1bya2-1)**2);    #ratio of maximum intensity to minimum intensity\n",
    "\n",
    "#Result\n",
    "print \"ratio of maximum intensity to minimum intensity is\",round(I,3)\n",
    "print \"answer varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.2, Page number 14.42"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "angular position of 10th maximum is 3 degrees 7 minutes 30.887 seconds\n",
      "answer varies due to rounding off errors\n",
      "angular position of 1st minimum is 0 degrees 9 minutes 23 seconds\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "lamda=5460*10**-10;    #wavelength(m)\n",
    "d=1*10**-4;     #seperation(m)\n",
    "D=2;     #distance(m)\n",
    "n=10;    #position\n",
    "\n",
    "#Calculation\n",
    "Xmax10=n*lamda*D/d;\n",
    "tan_phi=Xmax10/D;     \n",
    "phi_max10=math.atan(tan_phi);\n",
    "phi_max10=phi_max10*180/math.pi;     #angular position of 10th maximum(degrees)\n",
    "phim=60*(phi_max10-int(phi_max10));\n",
    "phis=60*(phim-int(phim));\n",
    "xmin1=lamda*D/(2*d);       \n",
    "tan_phi1=xmin1/D;\n",
    "phi_min1=math.atan(tan_phi1);\n",
    "phi_min1=phi_min1*180/math.pi;     #angular position of 1st minimum(degrees)\n",
    "phi_m=60*(phi_min1-int(phi_min1));\n",
    "phi_s=60*(phi_m-int(phi_m));\n",
    "\n",
    "#Result\n",
    "print \"angular position of 10th maximum is\",int(phi_max10),\"degrees\",int(phim),\"minutes\",round(phis,3),\"seconds\"\n",
    "print \"answer varies due to rounding off errors\"\n",
    "print \"angular position of 1st minimum is\",int(phi_min1),\"degrees\",int(phi_m),\"minutes\",int(phi_s),\"seconds\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.3, Page number 14.43"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5320.0 angstrom lies in the visible region\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "mew=1.33;      #refractive index of soap\n",
    "t=5000*10**-10;    #thickness(m)\n",
    "n0=0;\n",
    "n1=1;\n",
    "n2=2;\n",
    "n3=3;\n",
    "\n",
    "#Calculation\n",
    "x=4*mew*t;\n",
    "lamda1=x/((2*n0)+1);       #for n=0\n",
    "lamda2=x/((2*n1)+1);       #for n=1\n",
    "lamda3=x/((2*n2)+1);       #for n=2\n",
    "lamda4=x/((2*n3)+1);       #for n=3\n",
    "\n",
    "#Result\n",
    "print lamda3*10**10,\"angstrom lies in the visible region\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.4, Page number 14.43"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength of light is 5880 angstrom\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "D15=0.59*10**-2;     #diameter of 15th ring(m)\n",
    "D5=0.336*10**-2;     #diameter of 5th ring(m)\n",
    "R=1;    #radius(m)\n",
    "m=10;\n",
    "\n",
    "#Calculation\n",
    "lamda=((D15**2)-(D5**2))/(4*m*R);     #wavelength of light(m)\n",
    "\n",
    "#Result\n",
    "print \"wavelength of light is\",int(lamda*10**10),\"angstrom\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.5, Page number 14.44"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "radius of curvature is 1.059 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "D10=0.5*10**-2;     #diameter of 10th ring(m)\n",
    "lamda=5900*10**-10;    #wavelength of light(m)\n",
    "n=10;\n",
    "\n",
    "#Calculation\n",
    "R=D10**2/(4*n*lamda);     #radius of curvature(m)\n",
    "\n",
    "#Result\n",
    "print \"radius of curvature is\",round(R,3),\"m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.6, Page number 14.44"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "least distance of the point is 13 mm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "lamda1=650*10**-9;      #wavelength(m)\n",
    "lamda2=500*10**-9;      #wavelength(m)\n",
    "D=1;    #distance(m)\n",
    "d=0.5*10**-3;     #seperation(m)\n",
    "n=10;\n",
    "\n",
    "#Calculation\n",
    "x=n*lamda1*D/d;    #least distance of the point(m)\n",
    "\n",
    "#Result\n",
    "print \"least distance of the point is\",int(x*10**3),\"mm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.7, Page number 14.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "thickness is 2.5 micro m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "lamda=500*10**-9;    #wavelength(m)\n",
    "n=10;\n",
    "D10=2*10**-3;     #diameter(m)\n",
    "\n",
    "#Calculation\n",
    "r10=D10/2;    #radius(m)\n",
    "R=D10**2/(4*n*lamda);\n",
    "t=r10**2/(2*R);        #thickness(m)\n",
    "\n",
    "#Result\n",
    "print \"thickness is\",t*10**6,\"micro m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.8, Page number 14.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "fringe width is 2.75 mm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "d=0.2*10**-3;     #seperation(m)\n",
    "lamda=550*10**-9;    #wavelength(m)\n",
    "D=1;     #diameter(m)\n",
    "\n",
    "#Calculation\n",
    "beta=lamda*D/d;     #fringe width(m)\n",
    "\n",
    "#Result\n",
    "print \"fringe width is\",beta*10**3,\"mm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.9, Page number 14.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "separation between slits is 2 mm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "lamda=500*10**-9;    #wavelength(m)\n",
    "D=2;     #diameter(m)\n",
    "beta=(5/100)*10**-2;     #fringe width(m)\n",
    "\n",
    "#Calculation\n",
    "d=lamda*D/beta;      #separation between slits(m)\n",
    "\n",
    "#Result\n",
    "print \"separation between slits is\",int(d*10**3),\"mm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.10, Page number 14.46"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ratio of maximum intensity to minimum intensity is 2.0\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "a12=36;       #intensity 1\n",
    "a22=1;        #intensity 2\n",
    "\n",
    "#Calculation\n",
    "a1=math.sqrt(a12);\n",
    "a2=math.sqrt(a22);\n",
    "Imin=(a1-a2)**2;     #minimum intensity\n",
    "Imax=(a1+a2)**2;     #maximum intensity\n",
    "r=Imax/Imin;\n",
    "\n",
    "#Result\n",
    "print \"ratio of maximum intensity to minimum intensity is\",round(r)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 14.11, Page number 14.46"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "diameter of 25th ring is 0.8239 cm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "D5=0.3;      #diameter of 5th ring(cm)\n",
    "D15=0.62;    #diameter of 15th ring(cm)\n",
    "\n",
    "#Calculation\n",
    "D_25=2*(D15**2)-(D5**2);\n",
    "D25=math.sqrt(D_25);      #diameter of 25th ring(cm)\n",
    "\n",
    "#Result\n",
    "print \"diameter of 25th ring is\",round(D25,4),\"cm\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}