summaryrefslogtreecommitdiff
path: root/Modern_Physics/chapter1_1.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commit92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch)
tree205e68d0ce598ac5caca7de839a2934d746cce86 /Modern_Physics/chapter1_1.ipynb
parentb14c13fcc6bb6d01c468805d612acb353ec168ac (diff)
downloadPython-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip
added books
Diffstat (limited to 'Modern_Physics/chapter1_1.ipynb')
-rwxr-xr-xModern_Physics/chapter1_1.ipynb383
1 files changed, 383 insertions, 0 deletions
diff --git a/Modern_Physics/chapter1_1.ipynb b/Modern_Physics/chapter1_1.ipynb
new file mode 100755
index 00000000..25ce0403
--- /dev/null
+++ b/Modern_Physics/chapter1_1.ipynb
@@ -0,0 +1,383 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:70cab6f9b725623fc2451b245c5190bb3397c02f8debec03cc8b79cdd3e4b714"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "1: Electric and Magnetic Fields"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.1, Page number 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "q1=3.2*10**-19;\n",
+ "q2=q1; #q1 and q2 are the values of charge on alpha-particle(C)\n",
+ "d=10**-13; #distance between two alpha-particles(m)\n",
+ "m1=6.68*10**-27;\n",
+ "m2=m1; #m1 and m2 are masses of alpha-particles(kg)\n",
+ "G=6.67*10**-11; #Gravitational constant(Nm^2/kg^2)\n",
+ "\n",
+ "#Calculation\n",
+ "F1=(9*10**9)*(q1*q2)/(d**2); #calculation of electrostatic force(N)\n",
+ "F2=G*(m1*m2)/(d**2); #calculation of electrostatic force(N)\n",
+ "F1=math.ceil(F1*10**4)/10**4; #rounding off to 4 decimals\n",
+ "F1 = F1*10**2;\n",
+ "\n",
+ "#Result\n",
+ "print \"The electrosatic force is\",F1,\"*10**-2 N\"\n",
+ "print \"The gravitational force is\",round(F2/1e-37,3),\"*10**-37 N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electrosatic force is 9.22 *10**-2 N\n",
+ "The gravitational force is 2.976 *10**-37 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.2, Page number 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of elctron(kg)\n",
+ "q=1.6*10**-19; #charge on electron(C)\n",
+ "g=9.81; #acceleration due to gravity(m/s^2)\n",
+ "\n",
+ "#Calculation\n",
+ "Fg=m*g; #gravitational force(N)\n",
+ "d=math.sqrt((9*10**9*q**2)/Fg); #equating gravitational force with electrosatic force(m)\n",
+ "d=math.ceil(d*10**3)/10**3; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The distance of separation is\",d,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance of separation is 5.081 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.3, Page number 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.02; #distance between plates(m)\n",
+ "V=400; #potential differnce of plates(V)\n",
+ "q=1.6*10**-19; #charge on a proton(C)\n",
+ "\n",
+ "#Calculation\n",
+ "E=V/d; #electric field intensity between plates(V/m)\n",
+ "F=q*E; #electrostatic force on oil drop(N)\n",
+ "\n",
+ "#Result\n",
+ "print \"The electric field intensity between plates is\",E,\"V/m\"\n",
+ "print \"The force on proton is\",F,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electric field intensity between plates is 20000.0 V/m\n",
+ "The force on proton is 3.2e-15 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.4, Page number 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.02; #distance between plates(m)\n",
+ "q=1.6*10**-19; #charge on oil drop(C)\n",
+ "V=6000; #potential differnce of plates(V)\n",
+ "g=9.81; #acceleration due to gravity(m/s^2)\n",
+ "\n",
+ "#Calculation\n",
+ "E=V/d; #electric field intensity between plates(V/m)\n",
+ "F=q*E; #electrostatic force on oil drop(N)\n",
+ "m=F/g; #equating the weight of oil drop to the electrostatic force on it(kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"The mass of oil drop is\",round(m/1e-15,3),\"*10**-15 kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of oil drop is 4.893 *10**-15 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.5, Page number 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=150; #potential difference between anode and cathode(V)\n",
+ "m=9.31*10**-31; #mass of an electron(kg)\n",
+ "q=1.6*10**-19; #charge on an electron(C)\n",
+ "\n",
+ "#Calculation\n",
+ "E=q*V; #energy gained by electron during speeding from cathode to anode(J)\n",
+ "vel=math.sqrt(E*2/m); #equating with kinetic energy of electron(m/s)\n",
+ "vel=vel*10**-6;\n",
+ "vel=math.ceil(vel*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"The velocity is\",vel,\"*10**6 m/s\"\n",
+ "print \"answer in the book is wrong by 1 decimal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity is 7.2 *10**6 m/s\n",
+ "answer in the book is wrong by 1 decimal\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.6, Page number 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=5*10**6; #potential differnce through which alpha-particle is accelerated(V)\n",
+ "e=1.6*10**-19; #charge on electron(C)\n",
+ "\n",
+ "#Calculation\n",
+ "E1=2*V; #electronic charge on alpha-particle(eV)\n",
+ "E2=E1/10**6; #energy(MeV)\n",
+ "E3=E1*e; #energy(J)\n",
+ "E1=E1*10**-7; \n",
+ "\n",
+ "#Result\n",
+ "print \"The energy is\",E1,\"*10**7 eV\"\n",
+ "print \"The energy is\",E2,\"MeV\"\n",
+ "print \"The energy is\",E3,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The energy is 1.0 *10**7 eV\n",
+ "The energy is 10.0 MeV\n",
+ "The energy is 1.6e-12 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.7, Page number 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.528*10**-10; #radius of the orbit(m)\n",
+ "q=-1.6*10**-19; #charge on electron(C)\n",
+ "Q=1.6*10**-19; #charge on Hydrogen nucleus(C)\n",
+ "Eo=8.854*10**-12; #permittivity in free space(F/m)\n",
+ "\n",
+ "#Calculation\n",
+ "E=(q*Q)/(8*3.14*Eo*r); #electric field intensity between plates(V/m)\n",
+ "E1=E/(1.6*10**-19); #electrifeild intensity(eV)\n",
+ "E=E*10**19;\n",
+ "E=math.ceil(E*10**2)/10**2; #rounding off to 2 decimals\n",
+ "E1=math.ceil(E1*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The total energy is\",E,\"*10**-19 J\"\n",
+ "print \"The total energy is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total energy is -21.79 *10**-19 J\n",
+ "The total energy is -13.62 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.8, Page number 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=3.2*10**-19; #charge on alpha-particle(C)\n",
+ "m=6.68*10**-27; #mass on alpha-particle(kg)\n",
+ "B=1.5; #transverse magnetic field of flux density(Wb/m^2)\n",
+ "v=5*10**6; #velocity of alpha-particle(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "F=B*Q*v; #electrostatic force on oil drop(N)\n",
+ "R=m*v/(Q*B); #radius(m)\n",
+ "R=math.ceil(R*10**2)/10**2; #rounding off to 2 decimals\n",
+ "R1 = R*100; #radius(cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"The force on particle is\",F,\"N\"\n",
+ "print \"The radius of its circular path\",R,\"m or\",R1,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force on particle is 2.4e-12 N\n",
+ "The radius of its circular path 0.07 m or 7.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file