summaryrefslogtreecommitdiff
path: root/Modern_Physics_By_G.Aruldas/Chapter1_1.ipynb
blob: 483d55f386a535796cc8510a71c3a2b8d76303e8 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:467ef5c6562d2c93b60e422b9b9a8c5a34323da84f6c33e87f513c3c578db36d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "1: The special theory of relativity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.2, Page number 10"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "c=1;   #assume\n",
      "udash=0.9*c;   #speed of 2nd rocket\n",
      "v=0.6*c;   #speed of 1st rocket\n",
      "\n",
      "#Calculation\n",
      "u1=(udash+v)/(1+(udash*v/(c**2)));   #speed of 2nd rocket in same direction\n",
      "u2=(-udash+v)/(1-(udash*v/(c**2)));   #speed of 2nd rocket in opposite direction\n",
      "\n",
      "#Result\n",
      "print \"speed of 2nd rocket in same direction is\",round(u1,3),\"*c\"\n",
      "print \"speed of 2nd rocket in opposite direction is\",round(u2,3),\"*c\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of 2nd rocket in same direction is 0.974 *c\n",
        "speed of 2nd rocket in opposite direction is -0.652 *c\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.3, Page number 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#given L0-L/L0=0.01.so L=0.99*L0\n",
      "LbyL0=0.99;\n",
      "c=1;   #assume\n",
      "\n",
      "#Calculation\n",
      "v2=(c**2)*(1-(LbyL0)**2);\n",
      "v=math.sqrt(v2);    #speed\n",
      "\n",
      "#Result\n",
      "print \"speed is\",round(v,3),\"*c\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed is 0.141 *c\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.4, Page number 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "delta_tow=2.6*10**-8;   #mean lifetime at rest(s)\n",
      "d=20;   #distance(m)\n",
      "c=3*10**8;   #speed of light(m/s)\n",
      "\n",
      "#Calculation\n",
      "#delta_t=d/v\n",
      "v2=(c**2)/(1+(delta_tow*c/d)**2);\n",
      "v=math.sqrt(v2);   #speed of unstable particle(m/s)\n",
      "\n",
      "#Result\n",
      "print \"speed of unstable particle is\",round(v/10**8,1),\"*10**8 m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of unstable particle is 2.8 *10**8 m/s\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.5, Page number 13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "delta_t=5*10**-6;   #mean lifetime(s)\n",
      "c=1;   #assume\n",
      "v=0.9*c;   #speed of beam\n",
      "\n",
      "#Calculation\n",
      "delta_tow=delta_t*math.sqrt(1-(v/c)**2);   #proper lifetime of particles(s)\n",
      "\n",
      "#Result\n",
      "print \"proper lifetime of particles is\",round(delta_tow*10**6,2),\"*10**-6 s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "proper lifetime of particles is 2.18 *10**-6 s\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.6, Page number 15"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "c=1;   #assume\n",
      "m0bym=100/120;    #ratio of masses\n",
      "\n",
      "#Calculation\n",
      "v=c*math.sqrt(1-(m0bym**2));     #speed of body\n",
      "\n",
      "#Result\n",
      "print \"speed of body is\",round(v,3),\"*c\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of body is 0.553 *c\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.7, Page number 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "c=3*10**8;   #speed of light(m/s)\n",
      "deltaE=4*10**26;   #energy of sun(J/s)\n",
      "\n",
      "#Calculation\n",
      "deltam=deltaE/c**2;   #change in mass(kg)\n",
      "\n",
      "#Result\n",
      "print \"change in mass is\",round(deltam/10**9,2),\"*10**9 kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "change in mass is 4.44 *10**9 kg\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 1.8, Page number 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "c=1;   #assume\n",
      "T=10;   #kinetic energy(MeV)\n",
      "m0c2=0.512;   #rest energy of electron(MeV)\n",
      "\n",
      "#Calculation\n",
      "E=T+m0c2;   #total energy(MeV)\n",
      "p=math.sqrt((E**2)-(m0c2**2))/c;    #momentum of electron(MeV/c)\n",
      "v=c*math.sqrt(1-(m0c2/E)**2);    #velocity of electron(c)\n",
      "\n",
      "#Result\n",
      "print \"momentum of electron is\",round(p,1),\"MeV/c\"\n",
      "print \"velocity of electron is\",round(v,4),\"*c\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "momentum of electron is 10.5 MeV/c\n",
        "velocity of electron is 0.9988 *c\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}