summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
diff options
context:
space:
mode:
authordebashisdeb2014-06-20 15:42:42 +0530
committerdebashisdeb2014-06-20 15:42:42 +0530
commit83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch)
treef54eab21dd3d725d64a495fcd47c00d37abed004 /Engineering_Physics_Aruldhas/Chapter8_1.ipynb
parenta78126bbe4443e9526a64df9d8245c4af8843044 (diff)
downloadPython-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip
removing problem statements
Diffstat (limited to 'Engineering_Physics_Aruldhas/Chapter8_1.ipynb')
-rw-r--r--Engineering_Physics_Aruldhas/Chapter8_1.ipynb439
1 files changed, 395 insertions, 44 deletions
diff --git a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
index 8ec25fcf..af1e48b4 100644
--- a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb
@@ -1,6 +1,7 @@
{
"metadata": {
- "name": "Chapter8"
+ "name": "",
+ "signature": "sha256:1888e774039c89bc21625752ef2171fa6b8e8f5f67497ebbdba82729676e8946"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -11,25 +12,50 @@
"cell_type": "heading",
"level": 1,
"metadata": {},
- "source": "8: Special Theory of Relativity"
+ "source": [
+ "8: Special Theory of Relativity"
+ ]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.1, Page number 171"
+ "source": [
+ "Example number 8.1, Page number 171"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nL_0 = 1; #For simplicity, we assume classical length to be unity(m)\nc = 1; #For simplicity assume speed of light to be unity(m/s)\n\n#Calculation\nL = (1-1/100)*L_0; #Relativistic length(m)\n#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\nv = math.sqrt(1-(L/L_0)**2)*c; #Speed at which relativistic length is 1 percent of the classical length(m/s)\nv = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The speed at which relativistic length is 1 percent of the classical length is\",v, \"c\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L_0 = 1; #For simplicity, we assume classical length to be unity(m)\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "L = (1-1/100)*L_0; #Relativistic length(m)\n",
+ "#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\n",
+ "v = math.sqrt(1-(L/L_0)**2)*c; #Speed at which relativistic length is 1 percent of the classical length(m/s)\n",
+ "v = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The speed at which relativistic length is 1 percent of the classical length is\",v, \"c\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed at which relativistic length is 1 percent of the classical length is 0.1411 c\n"
+ "text": [
+ "The speed at which relativistic length is 1 percent of the classical length is 0.1411 c\n"
+ ]
}
],
"prompt_number": 1
@@ -38,19 +64,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.2, Page number 171"
+ "source": [
+ "Example number 8.2, Page number 171"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the proper lifetime of particle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\ndelta_t = 5*10**-6; #Mean lifetime of particles as observed in the lab frame(s)\n\n#Calculation\nv = 0.9*c; #Speed at which beam of particles travel(m/s)\ndelta_tau = delta_t*math.sqrt(1-(v/c)**2); #Proper lifetime of particle as per Time Dilation rule(s)\n\n#Result\nprint \"The proper lifetime of particle is\",delta_tau, \"s\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "delta_t = 5*10**-6; #Mean lifetime of particles as observed in the lab frame(s)\n",
+ "\n",
+ "#Calculation\n",
+ "v = 0.9*c; #Speed at which beam of particles travel(m/s)\n",
+ "delta_tau = delta_t*math.sqrt(1-(v/c)**2); #Proper lifetime of particle as per Time Dilation rule(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"The proper lifetime of particle is\",delta_tau, \"s\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The proper lifetime of particle is 2.17944947177e-06 s\n"
+ "text": [
+ "The proper lifetime of particle is 2.17944947177e-06 s\n"
+ ]
}
],
"prompt_number": 2
@@ -59,25 +106,53 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.3, Page number 171. theoritical proof"
+ "source": [
+ "Example number 8.3, Page number 171. theoritical proof"
+ ]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.4, Page number 172"
+ "source": [
+ "Example number 8.4, Page number 172"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed of second rocket for same and opposite direction\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\n\n#Calculation\nv = 0.6*c; #Speed with which the rocket leaves the earth(m/s)\nu_prime = 0.9*c; #Relative speed of second rocket w.r.t. the first rocket(m/s)\nu1 = (u_prime+v)/(1+(u_prime*v)/c**2); #Speed of second rocket for same direction of firing as per Velocity Addition Rule(m/s)\nu1 = math.ceil(u1*10**4)/10**4; #rounding off the value of u1 to 4 decimals\nu2 = (-u_prime+v)/(1-(u_prime*v)/c**2); #Speed of second rocket for opposite direction of firing as per Velocity Addition Rule(m/s)\nu2 = math.ceil(u2*10**4)/10**4; #rounding off the value of u2 to 4 decimals\n\n#Result\nprint \"The speed of second rocket for same direction of firing is\",u1,\"c\"\nprint \"The speed of second rocket for opposite direction of firing is\",u2,\"c\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "v = 0.6*c; #Speed with which the rocket leaves the earth(m/s)\n",
+ "u_prime = 0.9*c; #Relative speed of second rocket w.r.t. the first rocket(m/s)\n",
+ "u1 = (u_prime+v)/(1+(u_prime*v)/c**2); #Speed of second rocket for same direction of firing as per Velocity Addition Rule(m/s)\n",
+ "u1 = math.ceil(u1*10**4)/10**4; #rounding off the value of u1 to 4 decimals\n",
+ "u2 = (-u_prime+v)/(1-(u_prime*v)/c**2); #Speed of second rocket for opposite direction of firing as per Velocity Addition Rule(m/s)\n",
+ "u2 = math.ceil(u2*10**4)/10**4; #rounding off the value of u2 to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The speed of second rocket for same direction of firing is\",u1,\"c\"\n",
+ "print \"The speed of second rocket for opposite direction of firing is\",u2,\"c\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed of second rocket for same direction of firing is 0.9741 c\nThe speed of second rocket for opposite direction of firing is -0.6521 c\n"
+ "text": [
+ "The speed of second rocket for same direction of firing is 0.9741 c\n",
+ "The speed of second rocket for opposite direction of firing is -0.6521 c\n"
+ ]
}
],
"prompt_number": 4
@@ -86,19 +161,46 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.5, Page number 172"
+ "source": [
+ "Example number 8.5, Page number 172"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed and time dilation of spaceship\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nL0 = 1; #For simplicity assume length in spaceship's frame to be unity(m)\ntau = 1; #Unit time in the spaceship's frame(s)\n\n#Calculation\nL = 1/2*L0; #Length as observed on earth(m)\n#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\nv = math.sqrt(1-(L/L0)**2)*c; #Speed at which length of spaceship is observed as half from the earth frame(m/s)\nt = tau/math.sqrt(1-(v/c)**2); #Time dilation of the spaceship's unit time(s)\nv = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The speed at which length of spaceship is observed as half from the earth frame is\",v, \"c\"\nprint \"The time dilation of the spaceship unit time is\",t,\"delta_tau\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "L0 = 1; #For simplicity assume length in spaceship's frame to be unity(m)\n",
+ "tau = 1; #Unit time in the spaceship's frame(s)\n",
+ "\n",
+ "#Calculation\n",
+ "L = 1/2*L0; #Length as observed on earth(m)\n",
+ "#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\n",
+ "v = math.sqrt(1-(L/L0)**2)*c; #Speed at which length of spaceship is observed as half from the earth frame(m/s)\n",
+ "t = tau/math.sqrt(1-(v/c)**2); #Time dilation of the spaceship's unit time(s)\n",
+ "v = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The speed at which length of spaceship is observed as half from the earth frame is\",v, \"c\"\n",
+ "print \"The time dilation of the spaceship unit time is\",t,\"delta_tau\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed at which length of spaceship is observed as half from the earth frame is 0.8661 c\nThe time dilation of the spaceship unit time is 2.0 delta_tau\n"
+ "text": [
+ "The speed at which length of spaceship is observed as half from the earth frame is 0.8661 c\n",
+ "The time dilation of the spaceship unit time is 2.0 delta_tau\n"
+ ]
}
],
"prompt_number": 5
@@ -107,19 +209,47 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.6, Page number 172"
+ "source": [
+ "Example number 8.6, Page number 172"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the time difference and distance between the events\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nt1 = 2*10**-7; #Time for which first event occurs(s)\nt2 = 3*10**-7; #Time for which second event occurs(s)\nx1 = 10; #Position at which first event occurs(m)\nx2 = 40; #Position at which second event occurs(m)\n\n#Calculation\nv = 0.6*c; #Velocity with which S2 frame moves relative to S1 frame(m/s)\nL_factor = 1/math.sqrt(1-(v/c)**2); #Lorentz factor\ndelta_t = L_factor*(t2 - t1)+L_factor*v/c**2*(x1 - x2); #Time difference between the events(s)\ndelta_x = L_factor*(x2 - x1)-L_factor*v*(t2 - t1); #Distance between the events(m)\n\n#Result\nprint \"The time difference between the events is\",delta_t, \"s\" \nprint \"The distance between the events is\",delta_x, \"m\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "t1 = 2*10**-7; #Time for which first event occurs(s)\n",
+ "t2 = 3*10**-7; #Time for which second event occurs(s)\n",
+ "x1 = 10; #Position at which first event occurs(m)\n",
+ "x2 = 40; #Position at which second event occurs(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v = 0.6*c; #Velocity with which S2 frame moves relative to S1 frame(m/s)\n",
+ "L_factor = 1/math.sqrt(1-(v/c)**2); #Lorentz factor\n",
+ "delta_t = L_factor*(t2 - t1)+L_factor*v/c**2*(x1 - x2); #Time difference between the events(s)\n",
+ "delta_x = L_factor*(x2 - x1)-L_factor*v*(t2 - t1); #Distance between the events(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"The time difference between the events is\",delta_t, \"s\" \n",
+ "print \"The distance between the events is\",delta_x, \"m\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The time difference between the events is 5e-08 s\nThe distance between the events is 15.0 m\n"
+ "text": [
+ "The time difference between the events is 5e-08 s\n",
+ "The distance between the events is 15.0 m\n"
+ ]
}
],
"prompt_number": 6
@@ -128,19 +258,44 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.7, Page number 173"
+ "source": [
+ "Example number 8.7, Page number 173"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed of the unstable particle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\ntau = 2.6*10**-8; #Mean lifetime the particle in its own frame(s)\nd = 20; #Distance which the unstable particle travels before decaying(m)\n\n#Calculation\n#As t = d/v and also t = tau/sqrt(1-(v/c)^2), so that\n#d/v = tau/sqrt(1-(v/c)^2), solving for v\nv = math.sqrt(d**2/(tau**2+(d/c)**2)); #Speed of the unstable particle in lab frame(m/s)\nv = v/10**8;\nv = math.ceil(v*10)/10; #rounding off the value of v to 1 decimal\n\n#Result\nprint \"The speed of the unstable particle in lab frame is\",v,\"*10**8 m/s\"\n",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "tau = 2.6*10**-8; #Mean lifetime the particle in its own frame(s)\n",
+ "d = 20; #Distance which the unstable particle travels before decaying(m)\n",
+ "\n",
+ "#Calculation\n",
+ "#As t = d/v and also t = tau/sqrt(1-(v/c)^2), so that\n",
+ "#d/v = tau/sqrt(1-(v/c)^2), solving for v\n",
+ "v = math.sqrt(d**2/(tau**2+(d/c)**2)); #Speed of the unstable particle in lab frame(m/s)\n",
+ "v = v/10**8;\n",
+ "v = math.ceil(v*10)/10; #rounding off the value of v to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"The speed of the unstable particle in lab frame is\",v,\"*10**8 m/s\"\n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed of the unstable particle in lab frame is 2.8 *10**8 m/s\n"
+ "text": [
+ "The speed of the unstable particle in lab frame is 2.8 *10**8 m/s\n"
+ ]
}
],
"prompt_number": 9
@@ -149,19 +304,55 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.8, Page number 174"
+ "source": [
+ "Example number 8.8, Page number 174"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed, effective mass and kinetic energy of mu-meson\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nme = 1; #For simplicity assume mass of electron to be unity(kg)\ntau = 2.3*10**-6; #Average lifetime of mu-meson in rest frame(s)\nt = 6.9*10**-6; #Average lifetime of mu-meson in laboratory frame(s)\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nC = 3*10**8; #Speed of light in vacuum(m/s)\nm_e = 9.1*10**-31; #Mass of an electron(kg)\n\n#Calculation\n#Fromm Time Dilation Rule, tau = t*sqrt(1-(v/c)^2), solving for v\nv = c*math.sqrt(1-(tau/t)**2); #Speed of mu-meson in the laboratory frame(m/s)\nv = math.ceil(v*10**5)/10**5; #rounding off the value of v to 5 decimals\nm0 = 207*me; #Rest mass of mu-meson(kg)\nm = m0/math.sqrt(1-(v/c)**2); #Relativistic variation of mass with velocity(kg)\nm = math.ceil(m*10)/10; #rounding off the value of m to 1 decimal\nT = (m*m_e*C**2 - m0*m_e*C**2)/e; #Kinetic energy of mu-meson(eV)\nT = T*10**-6; #Kinetic energy of mu-meson(MeV)\nT = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n \n#Result\nprint \"The speed of mu-meson in the laboratory frame is\",v, \"c\"\nprint \"The effective mass of mu-meson is\",m, \"me\"\nprint \"The kinetic energy of mu-meson is\",T, \"MeV\"\n",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "me = 1; #For simplicity assume mass of electron to be unity(kg)\n",
+ "tau = 2.3*10**-6; #Average lifetime of mu-meson in rest frame(s)\n",
+ "t = 6.9*10**-6; #Average lifetime of mu-meson in laboratory frame(s)\n",
+ "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n",
+ "C = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "m_e = 9.1*10**-31; #Mass of an electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "#Fromm Time Dilation Rule, tau = t*sqrt(1-(v/c)^2), solving for v\n",
+ "v = c*math.sqrt(1-(tau/t)**2); #Speed of mu-meson in the laboratory frame(m/s)\n",
+ "v = math.ceil(v*10**5)/10**5; #rounding off the value of v to 5 decimals\n",
+ "m0 = 207*me; #Rest mass of mu-meson(kg)\n",
+ "m = m0/math.sqrt(1-(v/c)**2); #Relativistic variation of mass with velocity(kg)\n",
+ "m = math.ceil(m*10)/10; #rounding off the value of m to 1 decimal\n",
+ "T = (m*m_e*C**2 - m0*m_e*C**2)/e; #Kinetic energy of mu-meson(eV)\n",
+ "T = T*10**-6; #Kinetic energy of mu-meson(MeV)\n",
+ "T = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n",
+ " \n",
+ "#Result\n",
+ "print \"The speed of mu-meson in the laboratory frame is\",v, \"c\"\n",
+ "print \"The effective mass of mu-meson is\",m, \"me\"\n",
+ "print \"The kinetic energy of mu-meson is\",T, \"MeV\"\n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed of mu-meson in the laboratory frame is 0.94281 c\nThe effective mass of mu-meson is 621.1 me\nThe kinetic energy of mu-meson is 211.97 MeV\n"
+ "text": [
+ "The speed of mu-meson in the laboratory frame is 0.94281 c\n",
+ "The effective mass of mu-meson is 621.1 me\n",
+ "The kinetic energy of mu-meson is 211.97 MeV\n"
+ ]
}
],
"prompt_number": 13
@@ -170,19 +361,42 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.9, Page number 174"
+ "source": [
+ "Example number 8.9, Page number 174"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the speed of moving body\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nm0 = 1; #For simplicity assume rest mass to be unity(kg)\n\n#Calculation\nm = (20/100+1)*m0; #Mass in motion(kg)\n#As m = m0/sqrt(1-(u/c)^2), solving for u\nu = math.sqrt(1-(m0/m)**2)*c; #Speed of moving mass(m/s) \nu = math.ceil(u*10**3)/10**3; #rounding off the value of u to 3 decimals\n\n#Result\nprint \"The speed of moving body is\",u, \"c\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "m0 = 1; #For simplicity assume rest mass to be unity(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "m = (20/100+1)*m0; #Mass in motion(kg)\n",
+ "#As m = m0/sqrt(1-(u/c)^2), solving for u\n",
+ "u = math.sqrt(1-(m0/m)**2)*c; #Speed of moving mass(m/s) \n",
+ "u = math.ceil(u*10**3)/10**3; #rounding off the value of u to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The speed of moving body is\",u, \"c\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The speed of moving body is 0.553 c\n"
+ "text": [
+ "The speed of moving body is 0.553 c\n"
+ ]
}
],
"prompt_number": 14
@@ -191,19 +405,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.10, Page number 175"
+ "source": [
+ "Example number 8.10, Page number 175"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the rate of decrease of mass\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\ndE = 4*10**26; #Energy radiated per second my the sun(J/s)\n\n#Calculation\ndm = dE/c**2; #Rate of decrease of mass of sun(kg/s)\ndm = dm/10**9;\ndm = math.ceil(dm*10**3)/10**3; #rounding off the value of dm to 3 decimals\n\n#Result\nprint \"The rate of decrease of mass of sun is\",dm,\"*10**9 kg/s\"",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "dE = 4*10**26; #Energy radiated per second my the sun(J/s)\n",
+ "\n",
+ "#Calculation\n",
+ "dm = dE/c**2; #Rate of decrease of mass of sun(kg/s)\n",
+ "dm = dm/10**9;\n",
+ "dm = math.ceil(dm*10**3)/10**3; #rounding off the value of dm to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The rate of decrease of mass of sun is\",dm,\"*10**9 kg/s\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The rate of decrease of mass of sun is 4.445 *10**9 kg/s\n"
+ "text": [
+ "The rate of decrease of mass of sun is 4.445 *10**9 kg/s\n"
+ ]
}
],
"prompt_number": 18
@@ -212,19 +447,50 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.11, Page number 175"
+ "source": [
+ "Example number 8.11, Page number 175"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the momentum and velocity of the electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nm0 = 9.1*10**-31; #Mass of the electron(kg)\nE0 = 0.512; #Rest energy of electron(MeV)\nT = 10; #Kinetic energy of electron(MeV)\n\n#Calculation\nE = T + E0; #Total energy of electron(MeV)\n# From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for p\np = math.sqrt(E**2-m0**2*c**4)/c; #Momentum of the electron(MeV)\np = math.ceil(p*100)/100; #rounding off the value of p to 2 decimals\n#As E = E0/sqrt(1-(u/c)^2), solving for u\nu = math.sqrt(1-(E0/E)**2)*c; #Velocity of the electron(m/s)\nu = math.ceil(u*10**4)/10**4; #rounding off the value of u to 4 decimals\n\n#Result\nprint \"The momentum of the electron is\",p,\"/c MeV\"\nprint \"The velocity of the electron is\",u, \"c\"\n\n#answer for velocity given in the book is wrong",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #For simplicity assume speed of light to be unity(m/s)\n",
+ "m0 = 9.1*10**-31; #Mass of the electron(kg)\n",
+ "E0 = 0.512; #Rest energy of electron(MeV)\n",
+ "T = 10; #Kinetic energy of electron(MeV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = T + E0; #Total energy of electron(MeV)\n",
+ "# From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for p\n",
+ "p = math.sqrt(E**2-m0**2*c**4)/c; #Momentum of the electron(MeV)\n",
+ "p = math.ceil(p*100)/100; #rounding off the value of p to 2 decimals\n",
+ "#As E = E0/sqrt(1-(u/c)^2), solving for u\n",
+ "u = math.sqrt(1-(E0/E)**2)*c; #Velocity of the electron(m/s)\n",
+ "u = math.ceil(u*10**4)/10**4; #rounding off the value of u to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The momentum of the electron is\",p,\"/c MeV\"\n",
+ "print \"The velocity of the electron is\",u, \"c\"\n",
+ "\n",
+ "#answer for velocity given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The momentum of the electron is 10.52 /c MeV\nThe velocity of the electron is 0.9989 c\n"
+ "text": [
+ "The momentum of the electron is 10.52 /c MeV\n",
+ "The velocity of the electron is 0.9989 c\n"
+ ]
}
],
"prompt_number": 19
@@ -233,25 +499,52 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.12, Page number 175. theoritical proof"
+ "source": [
+ "Example number 8.12, Page number 175. theoritical proof"
+ ]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.13, Page number 176"
+ "source": [
+ "Example number 8.13, Page number 176"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the rest mass of the body\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nE = 4.5*10**17; #Total energy of object(J)\npx = 3.8*10**8; #X-component of momentum(kg-m/s)\npy = 3*10**8; #Y-component of momentum(kg-m/s)\npz = 3*10**8; #Z-component of momentum(kg-m/s)\n\n#Calculation\np = math.sqrt(px**2+py**2+pz**2); #Total momentum of the object(kg-m/s)\n#From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for m0\nm0 = math.sqrt(E**2/c**4 - p**2/c**2); #Rest mass of the body(kg)\nm0 = math.ceil(m0*100)/100; #rounding off the value of m0 to 2 decimals\n\n#Result\nprint \"The rest mass of the body is\",m0, \"kg\"",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "E = 4.5*10**17; #Total energy of object(J)\n",
+ "px = 3.8*10**8; #X-component of momentum(kg-m/s)\n",
+ "py = 3*10**8; #Y-component of momentum(kg-m/s)\n",
+ "pz = 3*10**8; #Z-component of momentum(kg-m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "p = math.sqrt(px**2+py**2+pz**2); #Total momentum of the object(kg-m/s)\n",
+ "#From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for m0\n",
+ "m0 = math.sqrt(E**2/c**4 - p**2/c**2); #Rest mass of the body(kg)\n",
+ "m0 = math.ceil(m0*100)/100; #rounding off the value of m0 to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The rest mass of the body is\",m0, \"kg\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The rest mass of the body is 4.63 kg\n"
+ "text": [
+ "The rest mass of the body is 4.63 kg\n"
+ ]
}
],
"prompt_number": 20
@@ -260,19 +553,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.14, Page number 176"
+ "source": [
+ "Example number 8.14, Page number 176"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the momentum of the high speed probe\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nm = 50000; #Mass of high speed probe(kg)\n\n#Calculation\nu = 0.8*c; #Speed of the probe(m/s)\np = m*u/math.sqrt(1-(u/c)**2); #Momentum of the probe(kg-m/s)\n\n#Result\nprint \"The momentum of the high speed probe is\",p, \"kg-m/s\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "m = 50000; #Mass of high speed probe(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "u = 0.8*c; #Speed of the probe(m/s)\n",
+ "p = m*u/math.sqrt(1-(u/c)**2); #Momentum of the probe(kg-m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"The momentum of the high speed probe is\",p, \"kg-m/s\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The momentum of the high speed probe is 2e+13 kg-m/s\n"
+ "text": [
+ "The momentum of the high speed probe is 2e+13 kg-m/s\n"
+ ]
}
],
"prompt_number": 21
@@ -281,19 +595,56 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 8.15, Page number 177"
+ "source": [
+ "Example number 8.15, Page number 177"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the change in mass, work done and accelerating potential\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Electronic charge, C = Energy equivalent of 1 eV(J/eV)\nm0 = 9.11*10**-31; #Rest mass of electron(kg)\nc = 3*10**8; #Speed of light in vacuum(m/s)\n\n#Calculation\nu1 = 0.98*c; #Inital speed of electron(m/s)\nu2 = 0.99*c; #Final speed of electron(m/s)\nm1 = m0/math.sqrt(1-(u1/c)**2); #Initial relativistic mass of electron(kg)\nm2 = m0/math.sqrt(1-(u2/c)**2); #Final relativistic mass of electron(kg)\ndm = m2 - m1; #Change in relativistic mass of the electron(kg)\nW = dm*c**2/e; #Work done on the electron to change its velocity(eV)\nW = W*10**-6; #Work done on the electron to change its velocity(MeV)\nW = math.ceil(W*100)/100; #rounding off the value of W to 2 decimals\n#As W = eV, V = accelerating potential, solving for V\nV = W*10**6; #Accelerating potential(volt)\nV = V/10**6;\n\n#Result\nprint \"The change in relativistic mass of the electron is\",dm, \"kg\"\nprint \"The work done on the electron to change its velocity is\",W, \"MeV\"\nprint \"The accelerating potential is\",V, \"*10**6 volt\"\n\n#answers given in the book are wrong",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.6*10**-19; #Electronic charge, C = Energy equivalent of 1 eV(J/eV)\n",
+ "m0 = 9.11*10**-31; #Rest mass of electron(kg)\n",
+ "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "u1 = 0.98*c; #Inital speed of electron(m/s)\n",
+ "u2 = 0.99*c; #Final speed of electron(m/s)\n",
+ "m1 = m0/math.sqrt(1-(u1/c)**2); #Initial relativistic mass of electron(kg)\n",
+ "m2 = m0/math.sqrt(1-(u2/c)**2); #Final relativistic mass of electron(kg)\n",
+ "dm = m2 - m1; #Change in relativistic mass of the electron(kg)\n",
+ "W = dm*c**2/e; #Work done on the electron to change its velocity(eV)\n",
+ "W = W*10**-6; #Work done on the electron to change its velocity(MeV)\n",
+ "W = math.ceil(W*100)/100; #rounding off the value of W to 2 decimals\n",
+ "#As W = eV, V = accelerating potential, solving for V\n",
+ "V = W*10**6; #Accelerating potential(volt)\n",
+ "V = V/10**6;\n",
+ "\n",
+ "#Result\n",
+ "print \"The change in relativistic mass of the electron is\",dm, \"kg\"\n",
+ "print \"The work done on the electron to change its velocity is\",W, \"MeV\"\n",
+ "print \"The accelerating potential is\",V, \"*10**6 volt\"\n",
+ "\n",
+ "#answers given in the book are wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The change in relativistic mass of the electron is 1.87996052912e-30 kg\nThe work done on the electron to change its velocity is 1.06 MeV\nThe accelerating potential is 1.06 *10**6 volt\n"
+ "text": [
+ "The change in relativistic mass of the electron is 1.87996052912e-30 kg\n",
+ "The work done on the electron to change its velocity is 1.06 MeV\n",
+ "The accelerating potential is 1.06 *10**6 volt\n"
+ ]
}
],
"prompt_number": 24
@@ -301,7 +652,7 @@
{
"cell_type": "code",
"collapsed": false,
- "input": "",
+ "input": [],
"language": "python",
"metadata": {},
"outputs": []