summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter1.ipynb
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (patch)
treedb67ac5738a18b921d9a8cf6e86f402703f30bdf /Engineering_Physics/chapter1.ipynb
parent37d315828bbfc0f5cabee669d2b9dd8cd17b5154 (diff)
downloadPython-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.gz
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.bz2
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.zip
add/remove books
Diffstat (limited to 'Engineering_Physics/chapter1.ipynb')
-rwxr-xr-xEngineering_Physics/chapter1.ipynb862
1 files changed, 0 insertions, 862 deletions
diff --git a/Engineering_Physics/chapter1.ipynb b/Engineering_Physics/chapter1.ipynb
deleted file mode 100755
index 69791eee..00000000
--- a/Engineering_Physics/chapter1.ipynb
+++ /dev/null
@@ -1,862 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:0e6e83846c51774a2df15d43a35bd12afc7130920f3c7a5b4cb2d5a70d8dae4a"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter1:RELATIVISTIC MECHANICS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.1:pg-12"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# example 1\n",
- "import math\n",
- "#to calculate length of the bar measured by the ststionary observer\n",
- "lo =1 #length in metre\n",
- "v=0.75*3*10**8 #speed (m/s)\n",
- "c=3*10**8 #light speed(m/s)\n",
- "l=lo*math.sqrt(1-(v**2/c**2))\n",
- "print \"\\n the length of bar in is\",round(l,2),\"m\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the length of bar in is 0.66 m\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.2:pg-12"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# example 2\n",
- "import math\n",
- "#to calculate velocity of rocket \n",
- "#lo be the length at rest \n",
- "l=99.0/100 #length is 99 per cent of its length at rest is l=(99/100)lo\n",
- "c=3*10**8 #light speed(m/s)\n",
- "v=c*math.sqrt(1-l**2) #formula is v=c math.sqrt(1-(l/lo)**2)\n",
- "print\" the velocity of rocket is v=\",\"{:.2e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " the velocity of rocket is v= 4.23e+07 m/s\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.4:pg-13"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to percentage contraction of a rod\n",
- "c=3.0*10**8 #light speed(m/s)\n",
- "v=0.8*c #velocity(m/s)\n",
- "#let lo be the length of the rod in the frame in which it is at rest\n",
- "#s' is the frame which is moving with a speed 0.8c in a direction making an angle 60 with x-axis\n",
- "#components of lo along perpendicular to the direction of motion are lo cos60 and lo sin60 respectively\n",
- "l1=math.cos(math.pi/3)*math.sqrt(1-(v/c)**2) #length of the rod alond the direction of motion =lo math.cos(pi/3)math.sqrt(1-(v/c)**2)\n",
- "l2=math.sin(math.pi/3) #length of the rod perpendicular to the direction of motion =lo sin60\n",
- "l=math.sqrt(l1**2+l2**2) # length of the moving rod\n",
- "per=(1-l)*100/1\n",
- "print \"percentage contraction of a rod is\",round(per,2),\"%\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "percentage contraction of a rod is 8.35 %\n"
- ]
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.7:pg-14"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# example 7\n",
- "import math\n",
- "#to calculate velocity of the circular lamina \n",
- "c=3*10**8 #light speed (m/s)\n",
- "#R'=R/2 (radius)\n",
- "#R'=R math.sqrt(1-(v/c)**2)\n",
- "v=(math.sqrt(3)/2)*c \n",
- "print \"velocity of the circular lamina relative to frame s is v=\",v,\"m/s\"\n",
- "#answer is given in terms of c in the textbook\n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "velocity of the circular lamina relative to frame s is v= 259807621.135 m/s\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.8:pg-17"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# example 8\n",
- "import math\n",
- "#to calculate speed of the clock\n",
- "#clock should record l=59 minutes for each hour recorded by clocks stationary with respect to the observer\n",
- "l=59.0 \n",
- "lo=60\n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=math.sqrt(c**2*(1-l**2/lo**2))\n",
- "print \"speed of the clock is v =\",\"{:.2e}\".format(v),\"m/s\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "speed of the clock is v = 5.45e+07 m/s\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.9:pg-17"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate distance travelled by the beam \n",
- "deltat0=2.5*10**-8 #proper half life of pi mesons in (s)\n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=0.8*c #mesons velocity (m/s)\n",
- "deltat=deltat0/math.sqrt(1-(v/c)**2) #half life (s)\n",
- "#No=initial flux ,N=flux after time t\n",
- "#N=N0 e**(-t/T)\n",
- "#N=N0/e**2 (given)=No e(-t/T)\n",
- "#t=2 deltat\n",
- "d=2*deltat*v #d=vt\n",
- "print \"distance travelled by the beam is d=\",d,\"m\" \n",
- "#answer is given in the textbook=19.96 m\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "distance travelled by the beam is d= 20.0 m\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.10:pg-17"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate distance travelled by the particle \n",
- "deltat0=2*10**-8 #proper half life to of the particle in (s) \n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=0.96*c #speed of the particle (m/s)\n",
- "deltat=(deltat0)/(math.sqrt(1-(v/c)**2)) #half life in the laboratory frame t in (s) \n",
- "#t=deltat (flux of the beam falls to (1/2) times initial flux)\n",
- "d=v*deltat #d=vt\n",
- "print \"distance travelled by the particle in this time is d=\",d,\"m\"\n",
- "#answer is given wrong in the textbook =20.45 m\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "distance travelled by the particle in this time is d= 20.5714285714 m\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.11:pg-18"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate speed\n",
- "deltat0=1440 #proper time interval measured by an observer moving with the clock (min)\n",
- "deltat=1444 #time interval measured by a stationary observer (min)\n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=c*math.sqrt(1-(deltat0/deltat)**2)\n",
- "print \" moving clock appears to lose 4min in 24 hours from the stationary observer is v=\",\"{:.1e}\".format(v),\"m/s\"\n",
- "#answer is given wrong in the book =2.32*10**7 m/s\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " moving clock appears to lose 4min in 24 hours from the stationary observer is v= 3.0e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.12:pg-18"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate velocity of beta particle\n",
- "c=3*10**8 #light velocity(m/s)\n",
- "u1=0.9*c #velocity of the beta particle relative to the atom in the direction of motion\n",
- "v=0.25*c #velocity of the radioactive atom relative to an experimenter\n",
- "u=(u1+v)/(1+u1*v/c**2) \n",
- "print \" velocity of the beta particle as observed by the experimenter is u=\",\"{:.3e}\".format(u),\"m/s\"\n",
- "#answer is given in terms of c in the book =0.94c\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " velocity of the beta particle as observed by the experimenter is u= 2.816e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.13:pg-18"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate velocity\n",
- "c=3*10**8 # light velocity\n",
- "v=0.75*c #speed of A\n",
- "ux=-0.85*c #speed of B\n",
- "ux1=(ux-v)/(1-ux*v/c**2)\n",
- "print\"\\n the velocity of B with respect to A (m/s) is\",\"{:.3e}\".format(ux1),\"m/s\"\n",
- "#answer is given in terms of c in the book=-0.9771c\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the velocity of B with respect to A (m/s) is -2.931e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.14:pg-19"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate velocity in the laboratory frame\n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=0.8*c #velocity relative to laboratory along positive direction of x-axis\n",
- "#given that u'=3 i+4 j+12 k (m/s)\n",
- "ux1=3 #in (m/s)\n",
- "uy1=4 #in (m/s)\n",
- "uz1=12 #in (m/s)\n",
- "ux=(ux1+v)/(1+v*ux1/c**2)\n",
- "uy=(uy1*math.sqrt(1-(v/c)**2))/(1+v*ux1/c**2)\n",
- "uz=(uz1*math.sqrt(1-(v/c)**2))/(1+v*ux1/c**2)\n",
- "print \"u=ux i+uy j+uz k\"\n",
- "print \"where\"\n",
- "print \"ux=\", \"{:.1e}\".format(ux),\"m/s\"\n",
- "print \"uy=\",round(uy,1),\"m/s\"\n",
- "print \"uz=\",round(uz,1),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "u=ux i+uy j+uz k\n",
- "where\n",
- "ux= 2.4e+08 m/s\n",
- "uy= 2.4 m/s\n",
- "uz= 7.2 m/s\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.17:pg-21"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# to calculate velocity of the particle\n",
- "c=3.0*10**8 #light speed (m/s)\n",
- "v=0.4*c #velocity of frame s' relative to s along axis x\n",
- "ux=0.8*c*(1.0/2) #component of velocity u(=0.8 c) of the particle along x axis ux=0.8 c cos60\n",
- "uy=0.8*c*sin (math.pi/3) #component of the velocity u of the particle along y axis \n",
- "ux1=(ux-v)/(1-ux*v/c**2)\n",
- "uy1=uy*math.sqrt(1-(v/c)**2)/(1-(ux*v/c**2))\n",
- "print \"resultant velocity as observed by a person in frame s1 is u1=ux1 i+uy1 j\"\n",
- "print \"where\"\n",
- "print \"ux1=\",ux1,\"m/s\"\n",
- "print \"uy1=\",\"{:.1e}\".format(uy1),\"m/s\"\n",
- "#answer is given in terms of c in the book i.e. uy1=0.756c m/s\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "resultant velocity as observed by a person in frame s1 is u1=ux1 i+uy1 j\n",
- "where\n",
- "ux1= 0.0 m/s\n",
- "uy1= 2.3e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 48
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.18:pg-25"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate mass, momentum,total energy,kinetic energy\n",
- "c=3*10**8 #light speed (m/s)\n",
- "v=c/sqrt (2) #velocity (m/s)\n",
- "#let mo be the rest mass of the particle \n",
- "#relativistic mass m of the particle is m=mo/math.sqrt(1-(v/c)**2)\n",
- "m=1/sqrt (1-v**2/c**2) #in kg\n",
- "print \"mass m=\",round(m,2),\" mo\"\n",
- "#momentum p of the particle is p=mv\n",
- "p=m*v #in kg-m/s\n",
- "print \"momentum p=\",\"{:.1e}\".format(p),\" mo\"\n",
- "#total energy E of the particle\n",
- "E=m*c**2 #in J\n",
- "print \"energy E=\",\"{:.3e}\".format(E,3),\" mo\"\n",
- "#kinetic energy K=E-mo c**2\n",
- "K=E-c**2 #in J\n",
- "print \"kinetic energy K=\",\"{:.3e}\".format(K),\" mo\"\n",
- "#answer is given in terms of m0 and c in the book\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "mass m= 1.41 mo\n",
- "momentum p= 3.0e+08 mo\n",
- "energy E= 1.273e+17 mo\n",
- "kinetic energy K= 3.728e+16 mo\n"
- ]
- }
- ],
- "prompt_number": 56
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.19:pg-26"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate velocity of the parcticle \n",
- "c=3*10**8 #light speed(m/s)\n",
- "# we know that E(energy)=mc**2\n",
- "# mo=rest mass\n",
- "#E=3 moc**2=mc**2 or m=3 mo (given that total energy of the particle is thrice its rest energy) \n",
- "m=3.0 # relativistic mass \n",
- "#formula is v=c math.sqrt(1-(mo/m)**2)\n",
- "v=math.sqrt(c**2*(1-(1/m)**2))\n",
- "print \"velocity of the particle is v=\",\"{:.3e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "velocity of the particle is v= 2.828e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 57
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.20:pg-26"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate mass(m),speed(v) of an electron\n",
- "K=1.5*10**6*1.6*10**-19 #kinetic energy(J)\n",
- "m0=9.11*10**-31 #rest mass of an electron(kg)\n",
- "c=3*10**8 # velocity of light in vacuum(m/s)\n",
- "m=(K/c**2)+m0 #relativistic kinetic energy(k=(m-mo)c**2)\n",
- "print \"mass is m=\",\"{:.2e}\".format(m),\"kg \"\n",
- "v=c*math.sqrt(1-m0**2/m**2)\n",
- "print \"speed of an electron is v=\",\"{:.1e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "mass is m= 3.58e-30 kg \n",
- "speed of an electron is v= 2.9e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 59
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.21:pg-27"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate work to be done \n",
- "E=0.5*10**6 #rest energy of electron (MeV) E=m0*c**2\n",
- "v1=0.6*3*10**8 #speed of electron in (m/s)\n",
- "v2=0.8*3*10**8\n",
- "c=3.0*10**8 #speed of light in (m/s)\n",
- "K1=E*((1.0/math.sqrt(1-v1**2/c**2))-1) #kinetic energy in (eV)\n",
- "K2=E*((1.0/math.sqrt(1-v2**2/c**2))-1)\n",
- "w=(K2-K1)*1.6*10**-19\n",
- "print \"amount of work to be done is w=\",\"{:.1e}\".format(w),\"J\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "amount of work to be done is w= 3.3e-14 J\n"
- ]
- }
- ],
- "prompt_number": 64
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.22:pg-27"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate speed\n",
- "c=3*10**8 #light speed (m/s)\n",
- "m=2.25 #mass m of a body be 2.25 times its rest mass mo i.e. m=2.25m0\n",
- "#formula is v=c math.sqrt(1-(m0/m)**2)\n",
- "v=c*math.sqrt(1-(1/m)**2)\n",
- "print \" speed is v=\",\"{:.3e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " speed is v= 2.687e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 67
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.23:pg-27"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate speed of the rocket\n",
- "m0=50.0 #weight of man on the earth(kg)\n",
- "m=50.5 #weight of man in rocket ship (kg)\n",
- "c=3*10**8 #speed of light(m/s)\n",
- "v=c*math.sqrt(1-m0**2/m**2)\n",
- "print \"speed of the rocket is v=\",\"{:.2e}\".format(v),\"m/s\" \n",
- "#to calculate speed of electron\n",
- "m0=9.11*10**-31 #mass of electron =rest mass of proton\n",
- "m=1.67*10**-27\n",
- "v=c*math.sqrt(1-m0**2/m**2)\n",
- "print \"speed of an electron is v=\",\"{:.2e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "speed of the rocket is v= 4.21e+07 m/s\n",
- "speed of an electron is v= 3.00e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 71
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.24:pg-28"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate velocity\n",
- "c=3*10**8 #light speed (m/s)\n",
- "#K(kinetic energy)=(m-mo(rest mass))c**2\n",
- "#it can also be written as mc**2=K+m0c**2\n",
- "#given that K=2m0c**2(rest mass energy)\n",
- "#m=3m0\n",
- "m=3.0 #relativistic mass\n",
- "#formula is v=c math.sqrt(1-(m0/m)**2)\n",
- "v=c*math.sqrt(1-(1/m)**2)\n",
- "print \"velocity of a body is v=\",\"{:.3e}\".format(v),\"m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "velocity of a body is v= 2.828e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 73
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.25:pg-28"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate kinetic energy ,momentum of electron\n",
- "m0=9.11*10**-31 #its rest mass (kg)\n",
- "c=3*10**8 #light velocity in (m/s)\n",
- "m=11*m0 #mass of moving electron is 11 times its rest mass\n",
- "K=(m-m0)*c**2/(1.6*10**-19) # kinetic energy\n",
- "print \"kinetic energy is K=\",\"{:.2e}\".format(K),\"eV\" \n",
- "v=c*math.sqrt(1-(m0/m)**2) #velocity(m/s)\n",
- "p=m*v #momentum\n",
- "print \"momentum is p=\",\"{:.2e}\".format(p),\"kg m/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "kinetic energy is K= 5.12e+06 eV\n",
- "momentum is p= 2.99e-21 kg m/s\n"
- ]
- }
- ],
- "prompt_number": 74
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.26:pg-29\n",
- " "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate proton gain in mass\n",
- "c=3*10**8 #light speed(m/s)\n",
- "K=500*10**6*1.6*10**-19 #kinetic energy (J)\n",
- "deltam=K/c**2\n",
- "print \"proton gain in mass is delm=\",\"{:.2e}\".format(deltam),\"kg\"\n",
- "#answer is given wrong in the book=8.89*10**28 kg\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " proton gain in mass is delm= 8.89e-28 kg\n"
- ]
- }
- ],
- "prompt_number": 76
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.27:pg-29"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#to calculate speed of 0.1MeV electron\n",
- "E=0.512*10**6 #rest mass energy E=m0*c**2\n",
- "c=3*10**8 #velocity of light (m/s)\n",
- "K=0.1*10**6 #kinetic energy (MeV)\n",
- "v=c*math.sqrt(1-(E/(K+E))**2) \n",
- "print \"speed of electron is v=\",\"{:.3e}\".format(v),\"m/s\" \n",
- "#to calculate mass and speed of 2MeV electron\n",
- "E=2*10**6*1.6*10**-19 #in (J)\n",
- "m=E/c**2 \n",
- "print \"mass is m=\",\"{:.2e}\".format(m),\"kg\"\n",
- "m0=9.11*10**-31 #electron mass (kg)\n",
- "v=c*math.sqrt(1-m0**2/m**2)\n",
- "print \"speed is v=\",\"{:.2e}\".format(v),\"m/s\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "speed of electron is v= 1.643e+08 m/s\n",
- "mass is m= 3.56e-30 kg\n",
- "speed is v= 2.90e+08 m/s\n"
- ]
- }
- ],
- "prompt_number": 78
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file