diff options
Diffstat (limited to 'Modern_Physics/Chapter2.ipynb')
-rwxr-xr-x | Modern_Physics/Chapter2.ipynb | 593 |
1 files changed, 413 insertions, 180 deletions
diff --git a/Modern_Physics/Chapter2.ipynb b/Modern_Physics/Chapter2.ipynb index b0fca27c..0d0fc247 100755 --- a/Modern_Physics/Chapter2.ipynb +++ b/Modern_Physics/Chapter2.ipynb @@ -1,7 +1,7 @@ { "metadata": { - "name": "", - "signature": "sha256:eb498fc54ec9607231510853c13ca78b6bdacd256b3a6b8f272ed771d86d795c" + "name": "Chapter2", + "signature": "sha256:be87f6a340484dd1a4e5b8f9343e232694681e2bed2590e22d8288691c17dddf" }, "nbformat": 3, "nbformat_minor": 0, @@ -13,7 +13,7 @@ "level": 1, "metadata": {}, "source": [ - "Chapter 2: Relativity II" + "Chapter 2:The Special Theory of Relativity" ] }, { @@ -21,32 +21,21 @@ "level": 2, "metadata": {}, "source": [ - "Example 2.1, page no. 44" + "Example 2.1, Page 22" ] }, { "cell_type": "code", "collapsed": false, "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "\n", - "m = 9.11 * 10 **-31 #mass of electron(kg)\n", - "c = 3.0 * 10**8 #speed of light(m/s)\n", - "u = 0.750 * c #speed of electron(m/s)\n", + "#initiation of varible\n", + "v1=60.0; v2=40.0 #Velocities of cars wrt to observer in km/hr\n", "\n", "#calculation\n", - "\n", - "p = m*u/(math.sqrt(1-(u**2/c**2))) \n", - "momentum = m * u\n", + "vr=v1-v2; #relative velocity\n", "\n", "#result\n", - "\n", - "print \"The correct relativistic momentum is\",round(p/10**-22,2),\"X 10^-22 kg m/s\"\n", - "print \"The incorrect classical expression results in momentum equal to\",round(momentum/10**-22,2),\"X 10^-22 kg m/s\"\n" + "print\"The value of relative velocity in km/h. is\",round(vr,3);\n" ], "language": "python", "metadata": {}, @@ -55,43 +44,37 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The correct relativistic momentum is 3.1 X 10^-22 kg m/s\n", - "The incorrect classical expression results in momentum equal to 2.05 X 10^-22 kg m/s\n" + "The value of relative velocity in km/h. is 20.0\n" ] } ], - "prompt_number": 3 + "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 2.3, page no. 47" + "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", - "import math\n", - "\n", - "#Variable declaration\n", - "\n", - "me = 9.11 * 10 **-31 #mass of electron(kg)\n", - "c = 3* 10** 8 #speed of light(m/s)\n", - "u = 0.850 * c #speed of electron (m/s)\n", - "e = 1.6 *10 **-19 #charge of electron(C)\n", - "\n", - "#Calculation\n", - "\n", - "E = me*c**2/(e*math.sqrt(1-(u**2/c**2)))\n", - "K = E - (me*c**2/e)\n", - "\n", - "#results\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", - "print \"The Total energy is\",round(E/10**6,2),\"Mev and the kinetic energy is \",round(K/10**6,3),\"Mev.\"\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": {}, @@ -100,74 +83,130 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The Total energy is 0.97 Mev and the kinetic energy is 0.46 Mev.\n" + "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": 7 + "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 2.4, page no. 47" + "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", - "\n", - "import math\n", - "\n", - "\n", - "#Variable Declaration\n", - "\n", - "mp = 1.67 * 10 ** -27 #mass of proton (kg)\n", - "c = 3.0 * 10 ** 8 #speed of light(m/s)\n", - "e = 1.602 * 10 ** -19 #charge of electron (C)\n", - "\n", - "#Calculation\n", - "\n", - "restenergy = mp * c**2/ e \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", - "print \"The rest energy of proton is \",round(restenergy/10**6),\"Mev\"\n", - "\n", - "\n", - "\n", - "#Variable declaration\n", - "\n", - "E = 3.0 * restenergy\n", - "\n", - "#Calculation\n", - "\n", - "u = (math.sqrt(1-(1/(E/restenergy)**2))*c)\n", + "#calculation\n", + "L=Lo*(sqrt(1-u**2)); # from the length contraction formula\n", "\n", "#result\n", - "\n", - "print \"The speed of proton is\",round(u/10**8,2),\"X 10^8 m/s. \"\n", - "\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", - "\n", - "K = E - restenergy\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", - "print \"The kinetic energy of proton is\",round(K/10**6),\"Mev\"\n", - "\n", + "#partb\n", + "Do=65.0; #given length\n", + "Lo= L/sqrt(1-(u/c)**2); #contracted length of rocket\n", "\n", - "#calculation\n", + "#result\n", + "print\"Actual length according to O is \",round(Lo,3);\n", "\n", - "p=math.sqrt(round(E)**2 - round(restenergy)**2)/c\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", - "print \"The proton's momentum is \",round(p * c/10**6),\"Mev/c\"" + "#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": {}, @@ -176,10 +215,12 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The rest energy of proton is 938.0 Mev\n", - "The speed of proton is 2.83 X 10^8 m/s. \n", - "The kinetic energy of proton is 1876.0 Mev\n", - "The proton's momentum is 2654.0 Mev/c\n" + "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" ] } ], @@ -190,27 +231,21 @@ "level": 2, "metadata": {}, "source": [ - "Example 2.5, page no. 49" + "Example 2.7, Page 35" ] }, { "cell_type": "code", "collapsed": false, "input": [ - " \n", - "#Variable Declaration\n", - "\n", - "u = 450.0 #speed of the balls(m/s)\n", - "c = 3.0 * 10 ** 8 #speed of light(m/s)\n", - "m = 5.0 #mass of the ball (kg)\n", + "#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", - "\n", - "dM = 2* m *(1+(u**2/(2*c**2))-1) #because u^2/c^2 << 1\n", + "v= (v1+u)/(1+(v1*u/c**2));\n", "\n", "#result\n", - "\n", - "print \"The mass increment is\",round(dM/10**-11,1),\"X10^-11 kg\"" + "print \"The speed of missile as measured by an observer on earth in c is\",round(v,3);" ], "language": "python", "metadata": {}, @@ -219,71 +254,220 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The mass increment is 1.1 X10^-11 kg\n" + "The speed of missile as measured by an observer on earth in c is 0.946\n" ] } ], - "prompt_number": 11 + "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 2.7, page no. 50" + "Example 2.8, Page 37" ] }, { "cell_type": "code", "collapsed": false, "input": [ - "\n", - "\n", - "#Variable declaration\n", - "\n", - "u = 931.5 #atomic mass unit (MeV/c^2)\n", - "Mu = 236.045563 #mass of uranuim (u)\n", - "MRb = 89.914811 #mass of Rb (u)\n", - "MCs = 142.927220 #mass of cs(u)\n", - "mn = 1.008665 #mass of neutron (u)\n", - "\n", - "#Calculation\n", - "\n", - "dm = Mu - (MRb + MCs + 3 * mn)\n", + "#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", - "print \"The reaction products have \",dm,\"u less than the initial uranium mass\"\n", - "\n", - "\n", - "#Variable declaration\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", - "c = 3.0 * 10 ** 8 #speed of light (m/s)\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", - "\n", - "dm = dm * u\n", - "Q = dm\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", - "print \"the energy given off per fission event is\",-round(Q,1),\"MeV\"\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", - "#Variable declaration\n", + "#result\n", + "E=sqrt(pc**2+mc2**2); \n", + "K=E-E0; #value of possible kinetic energy\n", "\n", - "A = 6.02 * 10 ** 23 #Avagadro number\n", - "N = A * 1000/ Mu #number of nuclei\n", - "efficiency = 0.4\n", - "kWh = 4.435 * 10 **-20 #conversion (kWh/MeV)\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", - "\n", - "E = efficiency * N * Q *kWh\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", - "\n", - "print \"The total energy produced is \" ,round(E/10 **6,2),\"X 10^6 kWh\"\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": {}, @@ -292,68 +476,120 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The reaction products have 0.177537 u less than the initial uranium mass\n", - "the energy given off per fission event is -165.4 MeV\n", - "The total energy produced is 7.48 X 10^6 kWh\n" + "The momentum of electron in MeV/c is 10.498\n", + "The velocity of electron in c is 0.99882\n" ] } ], - "prompt_number": 13 + "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 2.8, page no. 52" + "Example 2.14, Page 47" ] }, { "cell_type": "code", "collapsed": false, "input": [ - " \n", - "\n", - "#Variable Declaration\n", - "\n", - "e = 1.6 * 10 **-19 #charge of electron(C)\n", - "BE = 3 #binding energy of water(eV)\n", - "c = 3.0 * 10**8 #speed of light (m/s)\n", - "\n", - "#Calculation\n", + "#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", - "dm = BE * e / c**2\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", - "print \"The mass difference is\",round(dm/10 **-36,1),\"X 10^-36 kg\"\n", - "\n", - "\n", - "\n", - "#Variable declaration\n", - "\n", - "MH2O = 3.0 * 10 **-26 #mass of water molecule (kg)\n", - "\n", - "#Calculation\n", - "\n", - "fractional_loss= dm / MH2O\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", - "\n", - "print \"The fractional loss of mass per gram of water formed is\",round(fractional_loss/10 ** -10,1),\"X 10^-10 \"\n", - "\n", - "\n", - "#Variable declaration\n", - "\n", - "dm = 1.8 * 10 ** -13 #change in mass when 1 gram of water is formed (kg)\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", - "\n", - "E = dm * c**2\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", - "\n", - "print \"The energy released when 1 gram of H2O is formed is\",round(E/10**3),\"kJ\"" + "print\"The corresponding kinetic energies of the pions are\", k1,\" MeV and\",round(k2,3),\" MeV.\"" ], "language": "python", "metadata": {}, @@ -362,41 +598,38 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The mass difference is 5.3 X 10^-36 kg\n", - "The fractional loss of mass per gram of water formed is 1.8 X 10^-10 \n", - "The energy released when 1 gram of H2O is formed is 16.0 kJ\n" + "The corresponding kinetic energies of the pions are 543.0 MeV and 0.627 MeV.\n" ] } ], - "prompt_number": 15 + "prompt_number": 49 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ - "Example 2.9, page no. 52" + "Example 2.17, Page 49" ] }, { "cell_type": "code", "collapsed": false, "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "\n", - "muCsq = 106 #energy of muon (Mev)\n", - "Ku = 4.6 #kinetic energy of muon (Mev)\n", + "#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", - "\n", - "mpiCsq = math.sqrt(muCsq**2 + Ku**2 + 2*Ku *muCsq)+math.sqrt(Ku**2 + 2*Ku*muCsq)\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", - "\n", - "print \"The mass of the pion is \",round(mpiCsq),\"MeV/c^2\"" + "print\"The threshold kinetic energy in Gev\",round(K/10**3,3);" ], "language": "python", "metadata": {}, @@ -405,11 +638,11 @@ "output_type": "stream", "stream": "stdout", "text": [ - "The mass of the pion is 142.0 MeV/c^2\n" + "The threshold kinetic energy in Gev 5.628\n" ] } ], - "prompt_number": 17 + "prompt_number": 50 } ], "metadata": {} |