summaryrefslogtreecommitdiff
path: root/Concepts_Of_Modern_Physics_by_Arthur_Beiser/Chapter_1.ipynb
blob: f4a61f1b099a2def2b49d3e263e8ef3bd7c0b3ab (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1:Relativity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1,Page no:9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Varible declaration\n",
      "t0= 3600  # time interval on Earth, seconds\n",
      "t= 3601.0  #time interval for spacecraft as measured from Earth, seconds\n",
      "\n",
      "#Calculation\n",
      "c= 2.998 *(10**8)  #speed of light, m/s\n",
      "v=c*math.sqrt((1-((t0/t)**2)))  #relative velocity of spacecraft, m/s\n",
      "\n",
      "#Result\n",
      "print\"The speed of the Spacecraft relative to Earth is:%.2g \"%v,\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The speed of the Spacecraft relative to Earth is:7.1e+06  m/s\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2,Page no:13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Varible declaration\t\n",
      "fg= 5.6*(10**14)  #frequency of green color, Hz\n",
      "fr= 4.8*(10**14)  #frequency of red color, Hz\n",
      "c= 3.0*(10**8)  #velocity of light, m/s\n",
      "\n",
      "#Calculation\n",
      "v= c*((fg**2 - fr**2)/(fg**2 + fr**2))  #longitudinal speed of observer, m/s\n",
      "v= v*3.6  #convert to km/h\n",
      "R= 1.0  #rate at which fine is to be imposed per km/h, $\n",
      "l= 80.0  #speed limit upto which no fine is to be imposed, km/h\n",
      "fine= v-l  # fine to be imposed,  $\n",
      "\n",
      "#Result\n",
      "print\"The fine imposed is:\",fine,\"$\\n\"\n",
      "\n",
      "print\"NOTE:Approx value of v is taken in book as 1.65*10^8,which is very less precise.\\nTherefore,chnge in final answer\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fine imposed is: 165176390.588 $\n",
        "\n",
        "NOTE:Approx value of v is taken in book as 1.65*10^8,which is very less precise.\n",
        "Therefore,chnge in final answer\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.3,Page no:14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Varible declaration\n",
      "v= 6.12*(10**7)  #receding velocity with respect to Earth, m/s\n",
      "c= 3.0*(10**8)  #velocity of light, m/s\n",
      "L0= 500.0  #initial wavelength of spectral line, nm\n",
      "\n",
      "#Calculation\n",
      "L= L0*math.sqrt(((1+(v/c))/(1-(v/c))))  #final wavelength of spectral light, nm\n",
      "Ls= L-L0  #shift in wavelength, nm\n",
      "\n",
      "#Varible declaration\n",
      "print\"Shift in Green spectral line is: \",round(Ls),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Shift in Green spectral line is:  115.0 nm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.4,Page no:19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Varible declaration\n",
      "StartingAge= 20  #starting age for both Dick and Jane\n",
      "c= 3*(10**8)  #velocity of light, m/s\n",
      "v= 0.8*c  #rate of separation of Dick and Jane, m/s\n",
      "t0= 1  #interval for emission of signals, yr\n",
      "\n",
      "#Calculation\n",
      "t1= t0*((1+v/c)/(1-v/c))  #interval for reception of signals on outward journey, yr\n",
      "t1= t0*(math.sqrt((1+v/c)/(1-v/c)))  #interval for reception of signals on outward journey, yr\n",
      "t2= t0*(math.sqrt((1-v/c)/(1+v/c)))  #interval for reception of signals on return trip, yr\n",
      "#Dick's frame of reference\n",
      "Tout1= 15  #duration of outward trip, yr\n",
      "Tin1= 15  #duration of return trip, yr\n",
      "JaneAge= StartingAge+(Tout1/t1)+(Tin1/t2)  #Jane's age according to Dick\n",
      "#Jane's frame of reference\n",
      "Tout2= 25  #duration of outward trip, yr\n",
      "d= 20  #delay in transmission of signal to Jane, caused by distance of the star, yr\n",
      "Tin2= 5  #duration of return trip\n",
      "DickAge= StartingAge+((Tout2+d)/t1)+(Tin2/t2)  #Dick's age according to JAne\n",
      "\n",
      "#Result\n",
      "print\"According to Dick, age of Jane is:\",JaneAge,\"years\"\n",
      "print\"According to Jane, age of Dick is:\",DickAge,\"years\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "According to Dick, age of Jane is: 70.0 years\n",
        "According to Jane, age of Dick is: 50.0 years\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.6,Page no:27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Varible declaration\n",
      "mf= 1  #mass of each entity, kg\n",
      "c= 3*(10**8)  #velocity of light, m/s\n",
      "v= 0.6*c  #velocity of fragments relative to original body, m/s\n",
      "\n",
      "#Calculation\n",
      "E0= 2*((mf*(c**2))/math.sqrt(1-((v/c)**2)))  #Total energy of fragments\n",
      "m= E0/(c**2)  #mass of original body, kg\n",
      "\n",
      "#Result\n",
      "print\"The total mass of the stationary body is: \",m,\"kg\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total mass of the stationary body is:  2.5 kg\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.7,Page no:28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Varible declaration\n",
      "r=1.4  # Rate of arrival of Solar Energy at erath, kW per square meter\n",
      "R=1.5*(10**11)  #Radius of Earth, m\n",
      "\n",
      "#Calculation\n",
      "P=r*(4*math.pi*(R**2))  #Total power recieved by Earth, kW\n",
      "P= P*(10**3)  #W\n",
      "C= 3*(10**8)  #Velocity of light, m/s\n",
      "E=P  #Energy lost by Sun, J\n",
      "m= E/(C**2)  #Mass of Sun lost per second as energy, kg\n",
      "\n",
      "#Result\n",
      "print\"Mass lost by sun per second, is:%.2g\"%m,\"kg\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass lost by sun per second, is:4.4e+09 kg\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.8,Page no:32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Varible declaration\n",
      "c= 3*(10**8)  #Velocity of light, m/s\n",
      "me= 0.511/(c**2)  #mass of electron, MeV\n",
      "mp=0  #mass of proton, MeV\n",
      "p= 2.000/c  #momenta for both particles, MeV\n",
      " \n",
      "#Calculation    \n",
      "##Using Eq. 1.24 and 1.25, Page 31 \n",
      "Ee=math.sqrt(((me**2)*(c**4))+((p**2)*(c**2)))  #Total energy of electron, MeV\n",
      "Ep= p*c  #Total energy of proton, MeV\n",
      "\n",
      "#Result\n",
      "print\"Total energy of Electron is: \",round(Ee,3),\"MeV\"\n",
      "print\"Total energy of Photon is: \",Ep,\"MeV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total energy of Electron is:  2.064 MeV\n",
        "Total energy of Photon is:  2.0 MeV\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.11,Page no:44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Varible declaration \n",
      "c=3*(10**8)  #velocity of light, m/s\n",
      "VaE= 0.90*c  #velocity of spacecraft alpha w.r.t Earth, m/s\n",
      "VbA= 0.50*c  #velocity of spacecraft beta w.r.t. Alpha, m/s\n",
      "\n",
      "#Calculation\n",
      "VbE= (VaE+VbA)/(1+((VaE*VbA)/(c**2)))  #velocity of beta w.r.t Earth, m/s\n",
      "VbE=VbE/c  #Converting to percent of c\n",
      "\n",
      "#Result\n",
      "print\"The required velocity of spacecraft Beta w.r.t. Earth  is:\",round(VbE,2),\"c\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required velocity of spacecraft Beta w.r.t. Earth  is: 0.97 c\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}