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
|
{
"metadata": {
"name": "Chapter2",
"signature": "sha256:be87f6a340484dd1a4e5b8f9343e232694681e2bed2590e22d8288691c17dddf"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 2:The Special Theory of Relativity"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.1, Page 22"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of varible\n",
"v1=60.0; v2=40.0 #Velocities of cars wrt to observer in km/hr\n",
"\n",
"#calculation\n",
"vr=v1-v2; #relative velocity\n",
"\n",
"#result\n",
"print\"The value of relative velocity in km/h. is\",round(vr,3);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of relative velocity in km/h. is 20.0\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.2, Page 22"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import atan, pi\n",
"import numpy as np\n",
"Va_w=[320.0,0.0]; Vw_g=[0.0, 65.0]; #Vp/q=[X Y]=>velocity of object p wrt q along X(east) and Y(north) directions.\n",
"\n",
"#calculation\n",
"Va_g=Va_w + Vw_g; #net velocity\n",
"k=np.linalg.norm(Va_g) #magnitude\n",
"s=atan(Va_g[3]/Va_g[0])*180.0/pi; #angle in rad*180/pi for conversion to degrees\n",
"\n",
"#result\n",
"print \"the velocity in x direction in Km/h is\", Va_w[0],\"in y direction in km/h is\",Vw_g[1]\n",
"print\"The magnitude of velocity Va/g(airplane wrt ground) in Km/h is\",round(k,3),\" at \",round(s,3),\" degrees north of east.\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The magnitude of velocity Va/g(airplane wrt ground) in Km/h is 326.535 at 11.482 degrees north of east.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.4, Page 28"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"Lo=100.0*(10**3);c=3.0*(10**8); #Given values//all the quantities are converted to SI units \n",
"d=2.2*(10**-6); #time between its birth and decay\n",
"\n",
"#calculation\n",
"t=Lo/c #where Lo is the distance from top of atmosphere to the Earth. c is the velocity of light. t is the time taken\n",
"u=sqrt(1-((d/t)**2)); # using time dilation fromula for finding u where u is the minimum velocity in terms of c;\n",
"\n",
"#result\n",
"print\"Hence the minimum speed required in c is\",round(u,6);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Hence the minimum speed required in c is 0.999978\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.5, Page 30"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#intiation of variable\n",
"from math import sqrt\n",
"Lo=100.0*(10**3); #Lo is converted to Km\n",
"u=0.999978; #//u/c is taken as u since u is represented in terms of c. \n",
"\n",
"#calculation\n",
"L=Lo*(sqrt(1-u**2)); # from the length contraction formula\n",
"\n",
"#result\n",
"print\"Hence the apparent thickness of the Earth's surface in metres. is\",round(L,3)\n",
"print\"answer is slightly different in the book\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Hence the apparent thickness of the Earth's surface in metres. is 663.321\n",
"answer is slightly different in the book\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.6, Page 32"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"L=65.0; c=3*10**8;u=0.8*c; \n",
"\n",
"#calculation\n",
"t=L/u ; #The value of time taken as measured by the observer\n",
"\n",
"#result\n",
"print\"The time for rocket to pass a point as measured by O in musec is \",round(t*10**6,3); #The value of time taken as measured by the observer\n",
"\n",
"#partb\n",
"Do=65.0; #given length\n",
"Lo= L/sqrt(1-(u/c)**2); #contracted length of rocket\n",
"\n",
"#result\n",
"print\"Actual length according to O is \",round(Lo,3);\n",
"\n",
"#partc\n",
"D=Do*(sqrt(1-(u/c)**2)); #contracted length of platform.\n",
"\n",
"#result\n",
"print\"Contracted length according to O'' is\",round(D,3);\n",
"\n",
"#partd\n",
"t1=Lo/u; #time needed to pass according to O'.\n",
"print \"Time taken according to O is \",t1\n",
"\n",
"#part 3\n",
"t2=(Lo-D)/u; #time intervals between the two instances\n",
"print\"Time taken according to O'' is \",t2;\n",
"print'The value of t1 and t2 does not match with textbook exactly';"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The time for rocket to pass a point as measured by O in musec is 0.271\n",
"Actual length according to O is 108.333\n",
"Contracted length according to O'' is 39.0\n",
"Time taken according to O is 4.51388888889e-07\n",
"Time taken according to O'' is 2.88888888889e-07\n",
"The value of t1 and t2 did not match\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.7, Page 35"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"v1=0.6; u=0.8; c=1.0; # all the values are measured in terms of c hence c=1\n",
"\n",
"#calculation\n",
"v= (v1+u)/(1+(v1*u/c**2));\n",
"\n",
"#result\n",
"print \"The speed of missile as measured by an observer on earth in c is\",round(v,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The speed of missile as measured by an observer on earth in c is 0.946\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.8, Page 37"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"w1=600.0;w2=434.0; # w1=recorded wavelength;w2=actual wavelength\n",
" # c/w1 = c/w2 *(sqrt(1-u/c)/(1+u/c))\n",
" \n",
"#calculation\n",
"k=w2/w1;\n",
"x=(1-k**2)/(1+k**2); #solving for u/c\n",
"\n",
"#result\n",
"print\"The speed of galaxy wrt earth in c is\",round(x,3);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The speed of galaxy wrt earth in c is 0.313\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.9, Page 39"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"v1x=0.6;v1y=0.0;v2x=0.0;v2y=.8;c=1.0; # all the velocities are taken wrt c\n",
"v21x=(v2x-v1x)/(1-(v1x*v2x/c**2)); #using lorentz velocity transformation\n",
"v21y=(v2y*(sqrt(1-(v1x*c)**2)/c**2))/(1-v1y*v2y/c**2) \n",
"\n",
"#result\n",
"print\"The velocity of rocket 2 wrt rocket 1 along x and y directions is\",round(v21x,3),\" c &\", round(v21y,3),\"c respectively\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The velocity of rocket 2 wrt rocket 1 along x and y directions is -0.6 c & 0.64 c respectively\n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.10, Page 40"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"u=0.8*c;L=65.0;c=3.0*10**8; #all values are in terms of c\n",
"t=u*L/(c**2*(sqrt(1-((u/c)**2)))); #from the equation 2.31 \n",
"\n",
"#result\n",
"print\"The time interval between the events is\",t, \"sec which equals\",round(t*10**6,3),\"musec.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The time interval between the events is 2.88888888889e-07 sec which equals 0.289 musec.\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.11, Page 41"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"m=1.67*10**-27;c= 3*10**8;v=0.86*c; #all the given values and constants\n",
"\n",
"#calculation\n",
"p=m*v/(sqrt(1-((v/c)**2))); # in terms of Kgm/sec\n",
"\n",
"#result\n",
"print\"The value of momentum was found out to be in Kg-m/sec.\\n\",p;\n",
"\n",
"#part 2\n",
"c=938.0;v=0.86*c;mc2=938.0 # all the energies in MeV where mc2= value of m*c^2\n",
"pc=(mc2*(v/c))/(sqrt(1-((v/c)**2))); #expressing in terms of Mev\n",
"\n",
"#result\n",
"print\"The value of momentum was found out to be in Mev.\",round(pc,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of momentum was found out to be in Kg-m/sec.\n",
"8.44336739668e-19\n",
"The value of momentum was found out to be in Mev. 1580.814\n"
]
}
],
"prompt_number": 34
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.12, Page 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"pc=1580.0; mc2=938.0;E0=938.0; # all the energies in MeV mc2=m*c^2 and pc=p*c\n",
"\n",
"#result\n",
"E=sqrt(pc**2+mc2**2); \n",
"K=E-E0; #value of possible kinetic energy\n",
"\n",
"#result\n",
"print\"The relativistic total energy in MeV. is\",round(E,3); #value of Energy E\n",
"print\"The kinetic energy of the proton in MeV.\",round(K,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The relativistic total energy in MeV. is 1837.456\n",
"The kinetic energy of the proton in MeV. 899.456\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.13, Page 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"E=10.51; mc2=0.511; #all the values are in MeV\n",
"\n",
"#calculation\n",
"p=sqrt(E**2-mc2**2); #momentum of the electron\n",
"v=sqrt(1-(mc2/E)**2); #velocity in terms of c\n",
"\n",
"#result\n",
"print\"The momentum of electron in MeV/c is\",round(p,3); \n",
"print\"The velocity of electron in c is\",round(v,5);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The momentum of electron in MeV/c is 10.498\n",
"The velocity of electron in c is 0.99882\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.14, Page 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"k=50;mc2=0.511*10**-3;c=3.0*10**8; # all the values of energy are in GeV and c is in SI units\n",
"\n",
"#calculation\n",
"v=sqrt(1-(1/(1+(k/mc2))**2)); #speed of the electron in terms of c\n",
"k=c-(v*c); #difference in velocities\n",
"\n",
"#result\n",
"print\"Speed of the electron as a fraction of c*10^-12 is.\",round(v*10**12,3); # v=(v*10^12)*10^-12; so as to obtain desired accuracy in the result\n",
"print\"The difference in velocities in cm/s.\",round(k*10**2,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Speed of the electron as a fraction of c*10^-12 is. 9.99999999948e+11\n",
"The difference in velocities in cm/s. 1.567\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.15, Page 48"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt, pi\n",
"r=1.5*10**11; I=1.4*10**3; #radius and intensity of sun\n",
"\n",
"#calculation\n",
"s=4*pi*r**2 #surface area of the sun\n",
"Pr=s*I # Power radiated in J/sec\n",
"c=3.0*10**8; #velocity of light\n",
"m=Pr/c**2 #rate of decrease of mass\n",
"m=round(m,2)\n",
"\n",
"#result\n",
"print\"The rate of decrease in mass of the sun in kg/sec. is %.1e\" %m;"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The rate of decrease in mass of the sun in kg/sec. is 4.4e+09\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.16, Page 48"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import pi, sqrt\n",
"K=325; mkc2=498; #kinetic energy and rest mass energy of kaons\n",
"mpic=140.0; #given value\n",
"\n",
"#calculation\n",
"Ek=K+mkc2; \n",
"pkc=sqrt(Ek**2-mkc2**2); \n",
"#consider the law of conservation of energy which yields Ek=sqrt(p1c^2+mpic^2)+sqrt(p2c^2+mpic^2)\n",
"#The above equations (4th degree,hence no direct methods)can be solved by assuming the value of p2c=0.\n",
"p1c=sqrt(Ek**2-(2*mpic*Ek));\n",
"#consider the law of conservation of momentum. which gives p1c+p2c=pkc implies\n",
"p2c=pkc-p1c;\n",
"k1=(sqrt(p1c**2+(mpic**2))-mpic); #corresponding kinetic energies\n",
"k2=(sqrt((p2c**2)+(mpic**2))-mpic);\n",
"\n",
"#result\n",
"print\"The corresponding kinetic energies of the pions are\", k1,\" MeV and\",round(k2,3),\" MeV.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The corresponding kinetic energies of the pions are 543.0 MeV and 0.627 MeV.\n"
]
}
],
"prompt_number": 49
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.17, Page 49"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initiation of variable\n",
"from math import sqrt\n",
"mpc2=938.0;c=3.0*10**8; #mpc2=mp*c^2,mp=mass of proton\n",
"\n",
"#calculation\n",
"Et=4*mpc2; #final total energy\n",
"E1=Et/2;E2=E1; #applying conservation of momentum and energy\n",
"v2=c*sqrt(1-(mpc2/E1)**2); #lorentz transformation\n",
"u=v2;v=(v2+u)/(1+(u*v2/c**2)); \n",
"E=mpc2/(sqrt(1-(v/c)**2));\n",
"K=E-mpc2;\n",
"\n",
"#result\n",
"print\"The threshold kinetic energy in Gev\",round(K/10**3,3);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The threshold kinetic energy in Gev 5.628\n"
]
}
],
"prompt_number": 50
}
],
"metadata": {}
}
]
}
|