diff options
Diffstat (limited to 'Engineering_Physics_by_Shyam_Rajeev')
16 files changed, 3016 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter1.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter1.ipynb new file mode 100755 index 00000000..10f61da5 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter1.ipynb @@ -0,0 +1,621 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2f492bc2a6dad7cae3b696b117670d34888491ec5959ea22de590b83b18e09cd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "1: Theory of Relativity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.1, Page number 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l0 = 50 #length of rocket ship(m)\n",
+ "l = 49.5 #length observed on ground(m)\n",
+ "c = 3*10**8 #velocity of light(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "#we know that l = l0*math.sqrt(1-((v**2)/(c**2)))\n",
+ "v = math.sqrt((c**2)*(1-((l/l0)**2))) #speed(m/sec)\n",
+ "v = v*10**-7;\n",
+ "v=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"speed of the rocket is\",v, \"*10**7 m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of the rocket is 4.233 *10**7 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.2, Page number 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l0 = 1; #assume length(m)\n",
+ "l = (99/100)*l0 #length observed on ground(m)\n",
+ "c = 1 #assume c = 1\n",
+ "\n",
+ "#Calculation\n",
+ "#we know that l = l0*math.sqrt(1-((v**2)/(c**2)))\n",
+ "v = math.sqrt((c**2)*(1-((l/l0)**2))) #speed(m/sec)\n",
+ "v=math.ceil(v*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"speed of the rocket is\",v,\"c\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of the rocket is 0.1411 c\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.3, Page number 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l0 = 120 #length of spaceship(m)\n",
+ "c = 1 #assume c = 1\n",
+ "v = 0.99*c; #speed of spaceship(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "l = l0*math.sqrt(1-((v**2)/(c**2))); #length of the observer(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"length of the observer is\",round(l),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of the observer is 17.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.4, Page number 30 theoretical proof"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.5, Page number 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#surface area of elliptical lamina = 1/2 (area of circular lamina)\n",
+ "\n",
+ "#Calculation\n",
+ "c = 3*10**8; #velocity of light(m/sec)\n",
+ "#((math.pi*D**2)/4)*math.sqrt(1-(v**2/c**2)) = 1/2*math.pi*D**2/4\n",
+ "#math.sqrt(1-(v**2/c**2)) = 1/2\n",
+ "v = c*math.sqrt(1-(1/4)); #velocity(m/sec)\n",
+ "v = v*10**-8;\n",
+ "v=math.ceil(v*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",v,\"*10**8 m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity is 2.6 *10**8 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.6, Page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t0 = 2*10**-8; #mean life of meson(sec)\n",
+ "c = 1; #assume c = 1\n",
+ "v = 0.8*c; #velocity of meson(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t0/math.sqrt(1-(v**2/c**2)); #mean life with a particular velocity\n",
+ "\n",
+ "#Result\n",
+ "print \"mean life of meson with a velocity is\",round(t/1e-8,3),\"*10**-8 sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean life of meson with a velocity is 3.333 *10**-8 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.7, Page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t0 = 3; #time period of pendulum(sec)\n",
+ "c = 1; #assume c = 1\n",
+ "v = 0.95*c; #velocity of observer(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t0/math.sqrt(1-(v**2/c**2)); #time period measured by observer(sec)\n",
+ "t = math.ceil(t*100)/100; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"time period measured by observer is\",t,\"sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time period measured by observer is 9.61 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.8, Page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t0 = 1; #life time of particle(micro sec)\n",
+ "v = 2.7*10**8; #velocity of particle(m/sec)\n",
+ "c = 3*10**8; #velocity of light(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "t0 = t0*10**-6; #life time of particle(sec)\n",
+ "t = t0/math.sqrt(1-(v**2/c**2)); #life time(sec)\n",
+ "t = round(t/1e-6,1)*10**-6; \n",
+ "x = v*t; #distance travelled before disintegration(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"life time is\",t,\"sec\"\n",
+ "print \"distance travelled before disintegration is\",x,\"m\"\n",
+ "print \"answer for distance given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "life time is 2.3e-06 sec\n",
+ "distance travelled before disintegration is 621.0 m\n",
+ "answer for distance given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.9, Page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #assume c = 1\n",
+ "u = -0.85*c; #speed of B\n",
+ "v = 0.75*c; #speed of A\n",
+ "\n",
+ "#Calculation\n",
+ "u_dash = (u-v)/(1-(u*v/c**2)); #velocity of B with respect to A\n",
+ "u_dash = math.ceil(u_dash*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity of B with respect to A is\",u_dash,\"c\"\n",
+ "print \"answer given in the book is wrong with respect to sign\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of B with respect to A is -0.977 c\n",
+ "answer given in the book is wrong with respect to sign\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.10, Page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #assume c = 1\n",
+ "u_dash = 0.9*c; #velocity of beta particle\n",
+ "v = 0.25*c; #speed of A\n",
+ "\n",
+ "#Calculation\n",
+ "u = (u_dash+v)/(1+(u_dash*v/c**2)); #speed of beta particle\n",
+ "u = math.ceil(u*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"speed of beta particle is\",u,\"c\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of beta particle is 0.94 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.11, Page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mp = 1.6*10**-27; #mass of proton(kg)\n",
+ "me = 9.1*10**-31; #mass of electron(kg)\n",
+ "c = 3*10**8; #velocity of light(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "m0 = me;\n",
+ "m = mp;\n",
+ "# we know that m = m0/math.sqrt(1-(v**2/c**2));\n",
+ "A = (m0/m)**2;\n",
+ "v_square = (1-A)*(c**2);\n",
+ "v = math.sqrt(v_square); #speed of electron(m/sec)\n",
+ "v = v*10**-8;\n",
+ "v = math.ceil(v*10**7)/10**7; #rounding off to 7 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"speed of electron is\",v,\"*10**8 m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of electron is 2.9999996 *10**8 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.12, Page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0 = 1; #assume m0 = 1\n",
+ "m = 2.25*m0;\n",
+ "\n",
+ "#Calculation\n",
+ "A = (m0/m)**2;\n",
+ "v_square = (1-A)*(c**2);\n",
+ "v = math.sqrt(v_square); #speed of a body(m/sec)\n",
+ "v = v*10**-8;\n",
+ "v = math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"speed of the body is\",v,\"*10**8 m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of electron is 2.688 *10**8 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.13, Page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 1; #assume c = 1\n",
+ "v = 0.99*c; #velocity of electron\n",
+ "m0 = 9.1*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "m = m0/math.sqrt(1-(v**2/c**2)); #mass of electron(kg)\n",
+ "m = m*10**31;\n",
+ "\n",
+ "#Result\n",
+ "print \"mass of the electron is\",int(m),\"*10**-31 kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass of the electron is 64 *10**-31 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.14, Page number 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.15, Page number 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.16, Page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter10.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter10.ipynb new file mode 100755 index 00000000..66376214 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter10.ipynb @@ -0,0 +1,67 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:32a1f58679b12138480dc1b5e5c18d84b4eee7617fb55dd2b494b13bcfd310c8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "10: Magnetic properties of materials"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.1, Page number 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 0.052; #radius of orbit(nm)\n",
+ "B = 1; #magnetic field(Wb/m**2)\n",
+ "e = 1.6*10**-19; #charge of electron(c)\n",
+ "m = 9.1*10**-31; #mass of electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-9; #radius of orbit(m)\n",
+ "delta_mew = (e**2)*(r**2)*B/(4*m); #change in magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(delta_mew/1e-29,3),\"*10**-29 Am**2\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in magnetic moment is 1.902 *10**-29 Am**2\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter11.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter11.ipynb new file mode 100755 index 00000000..cbbc468c --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter11.ipynb @@ -0,0 +1,159 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4bb25a18af878dce815ea6fd0470757443fe2ad8404e54fa1bb8e38dd97cd417"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "11: Electrostatics and electromagnetic theory"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.1, Page number 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew = 1; #parameter of aluminium\n",
+ "sigma = 3.54*10**7; #conductivity(mho/m)\n",
+ "delta = 0.01*10**-3; #skin depth of aluminium(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "new = 1/((delta**2)*math.pi*mew*sigma); #frequency(Hz)\n",
+ "new = math.ceil(new*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"frequency is\",new,\"Hz\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency is 89.92 Hz\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.2, Page number 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "se = 2; #solar energy(cal /min /cm**2)\n",
+ "j = (4.2*10**4)/60; #conversion factor from cal /min /cm**2 to J /m**2 /sec)\n",
+ "mew0 = 4*math.pi*10**-7; #permeability of free space(H/m)\n",
+ "epsilon0 = 8.854*10**-12; #permittivity of free space(F/m)\n",
+ "\n",
+ "#Calculation\n",
+ "EH = se*j; #solar energy(J /m**2 /sec)\n",
+ "EbyH = math.sqrt(mew0/epsilon0);\n",
+ "EbyH = math.ceil(EbyH*10)/10; #rounding off to 1 decimal\n",
+ "H = math.sqrt(EH/EbyH); #magnetic field of radiation\n",
+ "E = EbyH*H;\n",
+ "H = math.ceil(H*10**3)/10**3; #rounding off to 3 decimals\n",
+ "E = math.ceil(E*10)/10; #rounding off to 1 decimal\n",
+ "E0 = E*math.sqrt(2); #electric field of radiation(volt/m)\n",
+ "H0 = H*math.sqrt(2); #magnetic field of radiation (amp-turn/m)\n",
+ "H0 = math.ceil(H0*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"electric field of radiation is\",int(E0),\"volt/m\"\n",
+ "print \"magnetic field of radiation is\",H0,\"amp-turn/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electric field of radiation is 1027 volt/m\n",
+ "magnetic field of radiation is 2.73 amp-turn/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.3, Page number 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "p = 4.3*10**-8; #polarization(C/m**2)\n",
+ "E = 1000; #electric field(V/m)\n",
+ "epsilon0 = 8.85*10**-12; #permittivity of free space(F/m)\n",
+ "\n",
+ "#Calculation\n",
+ "epsilonr = 1+(p/(epsilon0*E)); #relative permittivity\n",
+ "epsilonr = math.ceil(epsilonr*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permittivity is\",epsilonr"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permittivity is 5.86\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter12.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter12.ipynb new file mode 100755 index 00000000..ccd47d51 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter12.ipynb @@ -0,0 +1,105 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:85ef8262dd8d094957ce6eda00a743c757c0eaabccf750168045359d519c0a4b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "12: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 12.1, Page number 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc = 9.2; #critical temperature of metal(K)\n",
+ "Bc = 1.05*10**5; #magnetic field(amp/m)\n",
+ "B0 = 1.5*10**5; #critical field(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "T = math.sqrt((Tc**2)*(1-(Bc/B0))); #temperature of metal(K)\n",
+ "T = math.ceil(T*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature of the metal is\",T,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature of the metal is 5.0391 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 12.2, Page number 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc1 = 4.185; #critical temperature of Hg(K)\n",
+ "M1 = 199.5; #isotopic mass(gm)\n",
+ "M2 = 203.4; #changed isotopic mass(gm)\n",
+ "\n",
+ "#Calculation\n",
+ "Tc2 = Tc1*math.sqrt(M1/M2); #changed critical temperature(K)\n",
+ "Tc2 = math.ceil(Tc2*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"changed critical temperature of Hg is\",Tc2,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "changed critical temperature of Hg is 4.145 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter15.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter15.ipynb new file mode 100755 index 00000000..365987ff --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter15.ipynb @@ -0,0 +1,332 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:42ca728e6260f85c33ceec306bfa76eadd9931a7ca67b2244aa9a2e681dff896"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "15: Statistical mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.1, Page number 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "import fractions\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 10; #number of identical coins\n",
+ "r1 = 10; #number of heads in 1st case\n",
+ "r2 = 5; #number of heads in 2nd case\n",
+ "r3 = 3; #number of heads in 3rd case\n",
+ "\n",
+ "#Calculation\n",
+ "P10_0 = math.factorial(n)/(math.factorial(r1)*math.factorial(n-r1)*(2**n)); #probability of getting all heads\n",
+ "P10_0 = fractions.Fraction(P10_0); #probability in fraction\n",
+ "P5_5 = math.factorial(n)/(math.factorial(r2)*math.factorial(n-r2)*(2**n)); #probability of getting 5 heads and 5 tails\n",
+ "P5_5 = fractions.Fraction(P5_5); #probability in fraction\n",
+ "P3_7 = math.factorial(n)/(math.factorial(r3)*math.factorial(n-r3)*(2**n)); #probability of getting 3 heads and 7 tails\n",
+ "P3_7 = fractions.Fraction(P3_7); #probability in fraction\n",
+ "Pmax = math.factorial(n)/(((math.factorial(n/2))**2)*(2**n)) #most probable combination\n",
+ "Pmax = fractions.Fraction(Pmax); #probability in fraction\n",
+ "Pmin = 1/(2**n); #least probable combination\n",
+ "Pmin = fractions.Fraction(Pmin); #probability in fraction\n",
+ "\n",
+ "#Result\n",
+ "print \"probability of getting all heads is\",P10_0\n",
+ "print \"probability of getting 5 heads and 5 tails is\",P5_5\n",
+ "print \"probability of getting 3 heads and 7 tails is\",P3_7\n",
+ "print \"most probable combination is\",Pmax\n",
+ "print \"least probable combination is\",Pmin"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability of getting all heads is 1/1024\n",
+ "probability of getting 5 heads and 5 tails is 63/256\n",
+ "probability of getting 3 heads and 7 tails is 15/128\n",
+ "most probable combination is 63/256\n",
+ "least probable combination is 1/1024\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.2, Page number 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "import fractions\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 3; #number of particles\n",
+ "N = 2; #number of compartments\n",
+ "ms = 4; #number of macrostates\n",
+ "n1_03 = 0; #value of n1 for (0,3)\n",
+ "n2_03 = 3; #value of n2 for (0,3)\n",
+ "n1_12 = 1; #value of n1 for (1,2)\n",
+ "n2_12 = 2; #value of n2 for (1,2)\n",
+ "n1_21 = 2; #value of n1 for (2,1)\n",
+ "n2_21 = 1; #value of n2 for (2,1)\n",
+ "n1_30 = 3; #value of n1 for (3,0)\n",
+ "n2_30 = 0; #value of n2 for (3,0)\n",
+ "\n",
+ "#Calculation\n",
+ "#the macrostates are (n1,n2) = [(0,3),(1,2),(2,1),(3,0)]\n",
+ "ms_03 = math.factorial(n)/(math.factorial(n1_03)*math.factorial(n2_03)); #number of microstates in the macrostate (0,3)\n",
+ "mis_03 = \"(0,xyz)\"; #microstates in the macrostate (0,3)\n",
+ "ms_12 = math.factorial(n)/(math.factorial(n1_12)*math.factorial(n2_12)); #number of microstates in the macrostate (1,2)\n",
+ "mis_12 = \"[(x,yz),(y,zx),(z,xy)]\"; #microstates in the macrostate (1,2)\n",
+ "ms_21 = math.factorial(n)/(math.factorial(n1_21)*math.factorial(n2_21)); #number of microstates in the macrostate (2,1)\n",
+ "mis_21 = \"[(xy,z),(yz,x),(zx,y)]\"; #microstates in the macrostate (2,1)\n",
+ "ms_30 = math.factorial(n)/(math.factorial(n1_30)*math.factorial(n2_30)); #number of microstates in the macrostate (3,0)\n",
+ "mis_30 = \"(xyz,0)\"; #microstates in the macrostate (3,0)\n",
+ "tms = N**n; #total number of microstates\n",
+ "mis = \"[(0,xxx),(x,xx),(xx,x),(xxx,0)]\"; #the microstates when particles are indistinguishable\n",
+ "\n",
+ "#Result\n",
+ "print \"number of microstates in the macrostate (0,3) is\",ms_03,\"that is\",mis_03\n",
+ "print \"number of microstates in the macrostate (1,2) is\",ms_12,\"that is\",mis_12\n",
+ "print \"number of microstates in the macrostate (2,1) is\",ms_21,\"that is\",mis_21\n",
+ "print \"number of microstates in the macrostate (3,0) is\",ms_30,\"that is\",mis_30\n",
+ "print \"total number of microstates is\",tms\n",
+ "print \"the microstates when particles are indistinguishable are\",mis"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of microstates in the macrostate (0,3) is 1.0 that is (0,xyz)\n",
+ "number of microstates in the macrostate (1,2) is 3.0 that is [(x,yz),(y,zx),(z,xy)]\n",
+ "number of microstates in the macrostate (2,1) is 3.0 that is [(xy,z),(yz,x),(zx,y)]\n",
+ "number of microstates in the macrostate (3,0) is 1.0 that is (xyz,0)\n",
+ "total number of microstates is 8\n",
+ "the microstates when particles are indistinguishable are [(0,xxx),(x,xx),(xx,x),(xxx,0)]\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.3, Page number 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 4; #1st group of particles\n",
+ "n2 = 2; #2nd group of particles \n",
+ "n3 = 8; #3rd group of particles\n",
+ "n4 = 6; #4th group of particles \n",
+ "n5 = 5; #5th group of particles\n",
+ "v1 = 1; #speed of 1st group of particles\n",
+ "v2 = 2; #speed of 2nd group of particles\n",
+ "v3 = 3; #speed of 3rd group of particles\n",
+ "v4 = 4; #speed of 4th group of particles \n",
+ "v5 = 5; #speed of 5th group of particles\n",
+ "\n",
+ "#Calculation\n",
+ "vbar = ((n1*v1)+(n2*v2)+(n3*v3)+(n4*v4)+(n5*v5))/(n1+n2+n3+n4+n5); #average speed(m/sec)\n",
+ "vsquarebar = ((v1*(n1**2))+(v2*(n2**2))+(v3*(n3**2))+(v4*(n4**2))+(v5*(n5**2)))/(n1+n2+n3+n4+n5); #mean square speed\n",
+ "rms = math.sqrt(vsquarebar); #root mean square speed(m/sec)\n",
+ "rms = math.ceil(rms*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"average speed is\",vbar,\"m/sec\"\n",
+ "print \"root mean square speed is\",rms,\"m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average speed is 3.24 m/sec\n",
+ "root mean square speed is 4.405 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.4, Page number 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = 27; #temperature(C)\n",
+ "M = 14; #mass of nitrogen(gm)\n",
+ "kb = 1.38*10**-23; #boltzmann constant\n",
+ "a = 6.02*10**23; #avagadro number \n",
+ "\n",
+ "#Calculation\n",
+ "T = t+273; #temperature(K) \n",
+ "M = M*10**-3; #mass of nitrogen(kg)\n",
+ "vmp = math.sqrt(2*kb*T*a/M); #most probable speed of nitrogen(m/sec)\n",
+ "vmp = math.ceil(vmp*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"most probable speed of nitrogen is\",vmp,\"m/sec\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "most probable speed of nitrogen is 596.7 m/sec\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.5, Page number 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = 37; #normal temperature of human body(C)\n",
+ "b = 2.898*10**-3; #constant of proportionality(mK)\n",
+ "\n",
+ "#Calculation\n",
+ "T = t+273; #normal temperature of human body(K)\n",
+ "lamda_m = b/T; #wavelength for maximum energy radiation(m)\n",
+ "lamda_m = lamda_m*10**10; #wavelength for maximum energy radiation(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength for maximum energy radiation is\",int(lamda_m),\"angstrom\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength for maximum energy radiation is 93483 angstrom\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15.6, Page number 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "kb = 1.38*10**-23; #boltzmann constant\n",
+ "thetaE = 230; #einstein's temperature(K)\n",
+ "h = 6.63*10**-34; #planck's constant(m**2 kg/s)\n",
+ "\n",
+ "#Calculation\n",
+ "newE = kb*thetaE/h; #einstein's frequency(per sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"einstein's frequency is\",round(newE/1e+12,2),\"*10**12 per sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "einstein's frequency is 4.79 *10**12 per sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter2.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter2.ipynb new file mode 100755 index 00000000..ef49544b --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter2.ipynb @@ -0,0 +1,507 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:614bd66037ed01713a261d0e06bb9f5175d6e2a9e3ef900d57af3a2e6efdf43f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "2: Interference and Diffraction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.1, Page number 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = 12*10**-5; #thickness of mica sheet(cm)\n",
+ "lamda = 6000; #wavelength(Angstrom)\n",
+ "n = 1;\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "mew_1 = n*lamda/t;\n",
+ "mew = mew_1+1; #refractive index of mica\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of mica is\",mew\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "refractive index of mica is 1.005\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.2, Page number 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "D = 0.53; #distance of fringes from slit(m)\n",
+ "lamda = 5890; #wavelength of light(angstrom)\n",
+ "two_d = 0.6*10**-3; #separation of slits(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "beta = D*lamda/two_d; #width of fringes(m)\n",
+ "beta = beta*10**3;\n",
+ "beta = math.ceil(beta*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"width of fringes is\",beta,\"*10**-3 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "width of fringes is 0.521 *10**-3 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.3, Page number 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "beta = 9*10**-4; #width of fringes(m)\n",
+ "d1 = 75; #distance of fringes from biprism(cm)\n",
+ "d2 = 5; #distance of biprism from slit(cm)\n",
+ "lamda = 5890; #wavelength of light(angstrom)\n",
+ "two_d = 0.6*10**-3; #separation of slits(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "d1 = d1*10**-2; #distance of fringes from biprism(m)\n",
+ "d2 = d2*10**-2; #distance of biprism from slit(m)\n",
+ "D = d1+d2; #distance of fringes from slit(m)\n",
+ "two_d = D*lamda/beta; #separation of slits(m)\n",
+ "two_d = two_d*10**4;\n",
+ "two_d = math.ceil(two_d*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between slits is\",two_d,\"*10**-4 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between slits is 5.24 *10**-4 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.4, Page number 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6*10**-7; #wavelength(m)\n",
+ "t = 7.2*10**-6; #thickness(m)\n",
+ "n = 6;\n",
+ "\n",
+ "#Calculation\n",
+ "mew_1 = n*lamda/t;\n",
+ "mew = mew_1+1; #refractive index of sheet\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of sheet is\",mew"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "refractive index of sheet is 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.5, Page number 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "beta = 3; #fringe separation(mm)\n",
+ "mew = 1; #refractive index\n",
+ "lamda = 6000; #wavelength(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "beta = beta*10**-3; #fringe separation(m)\n",
+ "theta = lamda/(2*mew*beta); #angle between plates(sec)\n",
+ "theeta = theta*180*3600/math.pi; #angle between plates(sec \")\n",
+ "theta = theta*10**4;\n",
+ "theeta = math.ceil(theeta*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"angle between plates is\",theta,\"*10**-4 sec or\",theeta,\"'\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "angle between plates is 1.0 *10**-4 sec or 20.627 '\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.6, Page number 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5900*10**-7; #wavelength of light(m)\n",
+ "mew = 1; #refractive index\n",
+ "n = 7.4; #number of fringes\n",
+ "\n",
+ "#Calculation\n",
+ "t2_t1 = n*lamda/(2*mew); #difference of film thickness(m)\n",
+ "t2_t1 = t2_t1*10**2;\n",
+ "\n",
+ "#Result\n",
+ "print \"difference of film thickness is\",t2_t1,\"*10**-2 m\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "difference of film thickness is 0.2183 *10**-2 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.7, Page number 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5.9*10**-7; #wavelength of light(m)\n",
+ "n = 10; #10th ring\n",
+ "D10 = 0.5; #diameter of 10th ring(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "D10 = D10*10**-2; #diameter of 10th ring(m)\n",
+ "R = D10**2/(4*n*lamda); #radius of curvature of lens(m)\n",
+ "R = math.ceil(R*10**4)/10**4; #rounding off to 4 decimals\n",
+ "t = D10**2/(8*R); #thickness of the air film(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of curvature of lens is\",R,\"m\"\n",
+ "print \"thickness of the air film is\",round(t/1e-6,2),\"*10**-6 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radius of curvature of lens is 1.0594 m\n",
+ "thickness of the air film is 2.95 *10**-6 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.8, Page number 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 20; #number of fringes\n",
+ "lamda = 5890; #wavelength(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-8; #wavelength(cm)\n",
+ "t = n*lamda/2; #thickness of wire(cm)\n",
+ "t = t*10**4;\n",
+ "\n",
+ "#Result\n",
+ "print \"thickness of wire is\",t,\"*10**-4 cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thickness of wire is 5.89 *10**-4 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.9, Page number 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5880; #wavelength(angstrom)\n",
+ "n = 1; #number of fringes\n",
+ "mew = 1.5; #refractive index\n",
+ "r = 60; #angle of refraction(degree)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*math.pi/180; #angle of refraction(radian)\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "t = n*lamda/(2*mew*math.cos(r)); #smallest thickness of the plate(m)\n",
+ "t = t*10**10; #smallest thickness of the plate(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"smallest thickness of the plate is\",t,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "smallest thickness of the plate is 3920.0 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.10, Page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 4; #fourth ring\n",
+ "n2 = 12; #12th ring\n",
+ "n3 = 20; #20th ring\n",
+ "D4 = 0.4; #diameter of 4th ring(cm)\n",
+ "D12 = 0.7; #diameter of 12th ring(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "p1 = n2-n1;\n",
+ "p2 = n3-n2;\n",
+ "#D12**2-D4**2 = 4*p1*lamda*R and D20**2-D12**2 = 4*p2*lamda*R\n",
+ "#therefore D12**2-D4**2 = D20**2-D12**2\n",
+ "D20 = math.sqrt((2*D12**2)-(D4**2)); #diameter of 20th ring(cm)\n",
+ "D20 = math.ceil(D20*100)/100; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"diameter of 20th ring is\",D20,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diameter of 20th ring is 0.91 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.11, Page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda1 = 6*10**-5; #wavelength of light 1(cm)\n",
+ "lamda2 = 4.5*10**-5; #wavelength of light 2(cm)\n",
+ "R = 90; #radius of curvature(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "n = lamda2/(lamda1-lamda2); #number of fringes\n",
+ "Dn = math.sqrt(4*n*lamda1*R); #diameter of nth ring(cm)\n",
+ "Dn = math.ceil(Dn*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"diameter of nth ring is\",Dn,\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diameter of nth ring is 0.2546 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter3.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter3.ipynb new file mode 100755 index 00000000..171bcb0d --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter3.ipynb @@ -0,0 +1,275 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:56795fefbe7b62ddb8818924d3943a71c60bd075d0e3f1778fec6ffb47c8906e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "3: Polarization, Laser and Holography"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.1, Page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x = 5; #distance of 1st minimum(mm)\n",
+ "D = 2; #distance between lens and screen(m)\n",
+ "a = 0.2; #width of slit(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "x = x*10**-3; #distance of 1st minimum(m)\n",
+ "a = a*10**-3; #width of slit(m)\n",
+ "lamda = a*x/D; #wavelength of light(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of light is\",lamda,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of light is 5e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.2, Page number 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.2; #width of slit(mm)\n",
+ "lamda = 5*10**-7; #wavelength(m)\n",
+ "f = 50; #focal length(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "a = a*10**-3; #width of slit(m)\n",
+ "f = f*10**-2; #focal length(m)\n",
+ "theta_1 = lamda/a; #angular diffraction correcponding to 1st minima(radian)\n",
+ "theta_2 = 2*lamda/a; #angular diffraction correcponding to 2nd minima(radian)\n",
+ "x = f*(theta_2-theta_1); #separation between 1st and second minima(m)\n",
+ "x = x*10**2;\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between first two minima on the screen is\",x,\"*10**-3 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between first two minima on the screen is 0.125 *10**-3 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.3, Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.16; #1st slit width(mm)\n",
+ "b = 0.8; #2nd slit width(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "nbym = (a+b)/a; #condition for missing orders\n",
+ "\n",
+ "#Result\n",
+ "print \"n = \",nbym,\"m\"\n",
+ "print \"n = \",nbym,\",\",2*nbym,\",\",3*nbym,\"etc for m = 1,2,3...\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n = 6.0 m\n",
+ "n = 6.0 , 12.0 , 18.0 etc for m = 1,2,3...\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.4, Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 2; #second order\n",
+ "theta = 30; #angle of diffraction(degrees)\n",
+ "lamda = 5*10**-5; #wavelength(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #angle of diffraction(radian)\n",
+ "aplusb = n*lamda/math.sin(theta);\n",
+ "N = 1/aplusb; #number of lines(per cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of lines on the grating surface is\",N,\"per cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of lines on the grating surface is 5000.0 per cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.5, Page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "aplusb = 1.5*10**-6; #grating element(m)\n",
+ "lamda = 550; #wavelength(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-9; #wavelength(m)\n",
+ "n = aplusb/lamda; #maximum possible order\n",
+ "n = math.ceil(n*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum possible order is\",n,\". third and higher orders are not possible\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum possible order is 2.728 . third and higher orders are not possible\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.6, Page number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "dlamda = 0.6; #difference in wavelength(nm)\n",
+ "lamda = 589.3; #wavelength(nm)\n",
+ "n = 1; #first order\n",
+ "\n",
+ "#Calculation\n",
+ "N = lamda/(n*dlamda); #number of lines on grating\n",
+ "\n",
+ "#Result\n",
+ "print \"number of lines on grating is\",int(N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of lines on grating is 982\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb new file mode 100755 index 00000000..ff17ab66 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb @@ -0,0 +1,196 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cf0df6ad8ed22fd758025ea5993932acd38bbb0ea0e95c0a8bdc6e4a7c75be59"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "4: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.1, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew = 1.5; #refractive angle for glass\n",
+ "\n",
+ "#Calculation\n",
+ "ip = math.atan(mew); #brewster's angle(radian)\n",
+ "ip = ip*180/math.pi; #brewster's angle(degree)\n",
+ "ip = math.ceil(ip*100)/100; #rounding off to 2 decimals\n",
+ "r = 90-ip; #angle of refraction(degree)\n",
+ "r = math.ceil(r*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"brewster's angle is\",ip,\"degrees\"\n",
+ "print \"angle of refraction is\",r,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "brewster's angle is 56.31 degrees\n",
+ "angle of refraction is 33.7 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.2, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew0 = 1.658; #refractive index of calcite\n",
+ "mew_layer = 1.550; #refractive index of canada balsam\n",
+ "\n",
+ "#Calculation\n",
+ "sinC = mew_layer/mew0; \n",
+ "C = math.asin(sinC); #critical angle(radian)\n",
+ "C = C*180/math.pi; #critical angle(degrees)\n",
+ "i = 90-C; #maximum possible inclination(degrees)\n",
+ "i = math.ceil(i*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum possible inclination is\",i,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum possible inclination is 20.8 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.3, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew0 = 1.544; #refractive index of calcite\n",
+ "mewe = 1.533; #refractive index of canada balsam\n",
+ "lamda = 5000; #wavelength(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "t = lamda/(2*(mew0-mewe)); #thickness of half wave plate(m)\n",
+ "t = t*10**4;\n",
+ "t = math.ceil(t*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"thickness of half wave plate is\",t,\"*10**-4 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thickness of half wave plate is 0.2273 *10**-4 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.4, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l = 20; #length of glass tube(cm)\n",
+ "theta = 26.2; #polarisation angle(degrees)\n",
+ "s = 20; #weight of sugar(gm)\n",
+ "w = 100; #quantity of water(ml)\n",
+ "\n",
+ "#Calculation\n",
+ "l = l/10; #length of glass tube(dm)\n",
+ "C = s/w; #concentration(gm/cc)\n",
+ "S = theta/(l*C); #specific rotation(degrees per dm per(gm/cc))\n",
+ "\n",
+ "#Result\n",
+ "print \"specific rotation of sugar is\",S,\"degrees per dm per(gm/cc)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "specific rotation of sugar is 65.5 degrees per dm per(gm/cc)\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter5.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter5.ipynb new file mode 100755 index 00000000..d6e00d90 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter5.ipynb @@ -0,0 +1,156 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:766f8db46f5669c6f5759d5eab7e64f8d7d90b920fc4c9477c5cb4c2747c652e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "5: Wave and Quantum Mechanics and X-rays"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 5.1, Page number 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.63*10**-34; #planck's constant(J)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "lamda = 6328; #wavelength of laser(angstrom)\n",
+ "ev = 6.24*10**18; #conversion factor from J to eV\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength of laser(m)\n",
+ "E = h*c/lamda; #energy of photon(J)\n",
+ "Eev = E*ev; #energy of photon(eV)\n",
+ "Eev = math.ceil(Eev*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of photon is\",round(E/1e-19,2),\"*10**-19 J or\",Eev,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of photon is 3.14 *10**-19 J or 1.962 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 5.2, Page number 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 6730; #wavelength of laser(angstrom)\n",
+ "p = 1; #output power(mW)\n",
+ "h = 6.63*10**-34; #planck's constant(J)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "p = p*10**-3; #output power(W)\n",
+ "lamda = lamda*10**-10; #wavelength of laser(m)\n",
+ "n = p*lamda/(h*c); #number of photons(per sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons emitted is\",round(n/1e+15,2),\"*10**15 per sec\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of photons emitted is 3.38 *10**15 per sec\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 5.3, Page number 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l = 3*10**-2; #coherence length for sodium light(m)\n",
+ "lamda = 5893; #wavelength(angstrom)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "n = l/lamda; #number of oscillations\n",
+ "tc = l/c; #coherence time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of oscillations is\",round(n)\n",
+ "print \"the coherence time is\",tc,\"s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of oscillations is 50908.0\n",
+ "the coherence time is 1e-10 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb new file mode 100755 index 00000000..8645ed7b --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb @@ -0,0 +1,114 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9517150eeae7e7bf9389a01495b7c5d59b808d0c5432252a5c80e780ef687d70"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "6: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.1, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5; #refractive index of core\n",
+ "n2 = 1.0; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "thetac = math.asin(n2/n1); #critical angle(radian)\n",
+ "thetac = thetac*180/math.pi; #critical angle(degrees)\n",
+ "thetac = math.ceil(thetac*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",thetac,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle is 41.82 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.2, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5; #refractive index of core\n",
+ "n2 = 1.47; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "thetac = math.asin(n2/n1); #critical angle(radian)\n",
+ "thetac = thetac*180/math.pi; #critical angle(degrees)\n",
+ "thetac = math.ceil(thetac*10**2)/10**2; #rounding off to 2 decimals\n",
+ "NA = math.sqrt(n1**2-n2**2); #numerical aperture of fiber\n",
+ "NA = math.ceil(NA*10)/10; #rounding off to 1 decimal\n",
+ "thetaa = math.asin(NA); #acceptance angle(radian)\n",
+ "thetaa = thetaa*180/math.pi; #acceptance angle(degrees)\n",
+ "thetaa = math.ceil(thetaa*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",thetac,\"degrees\"\n",
+ "print \"numerical aperture of fiber is\",NA\n",
+ "print \"acceptance angle is\",thetaa,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle is 78.53 degrees\n",
+ "numerical aperture of fiber is 0.3\n",
+ "acceptance angle is 17.46 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter7.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter7.ipynb new file mode 100755 index 00000000..e302d789 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter7.ipynb @@ -0,0 +1,158 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b66ce97b080f93d72d0e47d146c1f1e700139df6e3e90b6b5ae82aab3595beed"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "7: Wave and Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.1, Page number 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.625*10**-34; #planck's constant(J sec)\n",
+ "m1 = 6*10**24; #mass of earth(kg)\n",
+ "v1 = 3*10**4; #orbital speed(m/sec)\n",
+ "m2 = 10**-30; #mass of electron(kg)\n",
+ "v2 = 10**6; #velocity of electron(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "lamdaE = h/(m1*v1); #wavelength of a wave(m)\n",
+ "lamdae = h/(m2*v2); #wavelength of electron(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of a wave is\",round(lamdaE/1e-63,2),\"*10**-63 m\"\n",
+ "print \"wavelength of electron is\",lamdae,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of a wave is 3.68 *10**-63 m\n",
+ "wavelength of electron is 6.625e-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.2, Page number 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1; #mass of particle(g)\n",
+ "v = 100; #velocity of particle(m/sec)\n",
+ "h = 6.625*10**-34; #planck's constant(J sec)\n",
+ "\n",
+ "#Calculation\n",
+ "m = m*10**-3; #mass of particle(kg)\n",
+ "lamda = h/(m*v); #wavelength of particle(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of particle is\",lamda,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of particle is 6.625e-33 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.3, Page number 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 200; #potential difference(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.28/math.sqrt(V); #de Broglie wavelength(angstrom)\n",
+ "lamda = math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of electron is 0.8684 angstrom\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter8.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter8.ipynb new file mode 100755 index 00000000..33dc3ffa --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter8.ipynb @@ -0,0 +1,262 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:be9a21f00f98f6eae4cb352ab1396adae89de508dceae8166d48e690d1fe887a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "8: X-Rays"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.1, Page number 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta = 15; #angle of reflection(degrees)\n",
+ "d = 2.5; #atomic spacing(angstrom)\n",
+ "n = 1; #first order\n",
+ "\n",
+ "#Calculation\n",
+ "d = d*10**-10; #atomic spacing(m)\n",
+ "theta = theta*math.pi/180; #angle of reflection(radian)\n",
+ "lamda = 2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",round(lamda/1e-10,3),\"*10**-10 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-rays is 1.294 *10**-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.2, Page number 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "two_theta = 20; #angle of reflection(degrees)\n",
+ "d = 2.82; #atomic spacing(angstrom)\n",
+ "n = 1; #first order\n",
+ "\n",
+ "#Calculation\n",
+ "theta = two_theta/2;\n",
+ "theta = theta*math.pi/180; #angle of reflection(radian)\n",
+ "lamda = 2*d*math.sin(theta)/n; #wavelength of X-rays(angstrom)\n",
+ "lamda = math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-rays is 0.9794 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.3, Page number 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 10; #wavelength(pm)\n",
+ "phi = 45; #scattering angle(degrees)\n",
+ "h = 6.62*10**-34; #planck's constant(m**2 kg/s)\n",
+ "m0 = 9.1*10**-31; #mass(kg)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "ev = 6.24*10**18; #conversion factor from J to eV\n",
+ "\n",
+ "#Calculation\n",
+ "phi = phi*math.pi/180; #scattering angle(radian)\n",
+ "a = h/(m0*c); #value of constant(m)\n",
+ "a = a*10**12; #value of constant(pm)\n",
+ "lamda_dash = lamda+(a*(1-math.cos(phi))); #wavelength of X-rays(pm)\n",
+ "lamda_dash = math.ceil(lamda_dash*10**2)/10**2; #rounding off to 2 decimals\n",
+ "lamdadash = lamda+(2*a); #maximum wavelength of scattered x-rays(pm)\n",
+ "lamdadash = math.ceil(lamdadash*10)/10; #rounding off to 1 decimal\n",
+ "KE = h*c*((1/lamda)-(1/lamdadash))/(10**-12); #maximum kinetic energy(J)\n",
+ "KE = KE*ev; #maximum kinetic energy(eV)\n",
+ "KE = KE*10**-3; #maximum kinetic energy(KeV)\n",
+ "KE = math.ceil(KE*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays scattered is\",lamda_dash,\"pm\"\n",
+ "print \"maximum wavelength of scattered x-rays is\",lamdadash,\"pm\"\n",
+ "print \"maximum kinetic energy is\",KE,\"KeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-rays scattered is 10.72 pm\n",
+ "maximum wavelength of scattered x-rays is 14.9 pm\n",
+ "maximum kinetic energy is 40.8 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.4, Page number 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.62*10**-34; #planck's constant(m**2 kg/s)\n",
+ "m0 = 9.1*10**-31; #mass(kg)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "phi = 180; #scattering angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "phi = phi*math.pi/180; #scattering angle(radian)\n",
+ "a = h/(m0*c); #value of constant(m)\n",
+ "a = a*10**10; #value of constant(angstrom)\n",
+ "delta_lamda = a*(1-math.cos(phi)); #change in wavelength(angstrom)\n",
+ "delta_lamda = math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"change in wavelength of photon is\",delta_lamda,\"angstrom\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in wavelength of photon is 0.0485 angstrom\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.5, Page number 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.62*10**-34; #planck's constant(m**2 kg/s)\n",
+ "m0 = 9.1*10**-31; #mass(kg)\n",
+ "c = 3*10**8; #velocity of light(m/s)\n",
+ "phi = 90; #scattering angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "phi = phi*math.pi/180; #scattering angle(radian)\n",
+ "a = h/(m0*c); #value of constant(m)\n",
+ "a = a*10**10; #value of constant(angstrom)\n",
+ "lamda = a*(1-math.cos(phi)); #wavelength(angstrom)\n",
+ "lamda = math.ceil(lamda*10**5)/10**5; #rounding off to 5 decimals\n",
+ "E = h*c/(lamda*10**-10); #energy of photon(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of the photon is\",lamda,\"angstrom\"\n",
+ "print \"energy of the incident photon is\",round(E/1e-14,4),\"*10**-14 J\"\n",
+ "print \"answer for energy of incident photon is wrong in the book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of the photon is 0.02425 angstrom\n",
+ "energy of the incident photon is 8.1897 *10**-14 J\n",
+ "answer for energy of incident photon is wrong in the book\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter9.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter9.ipynb new file mode 100755 index 00000000..847fb2bf --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter9.ipynb @@ -0,0 +1,64 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e8e761ea4c766f0a738732d4994726c98969966c5d35a3277656198f5c5939ee"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "9: Dielectrics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.1, Page number 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "p = 4.3*10**-8; #polarization(C/m**2)\n",
+ "E = 1000; #electric field(V/m)\n",
+ "epsilon_0 = 8.85*10**-12; #permittivity of free space(F/m)\n",
+ "\n",
+ "#Calculation\n",
+ "epsilon_r = 1+(p/(epsilon_0*E)); #relative permittivity\n",
+ "epsilon_r = math.ceil(epsilon_r*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permittivity is\",epsilon_r"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permittivity is 5.86\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_by_Shyam_Rajeev/screenshots/s1.png b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s1.png Binary files differnew file mode 100755 index 00000000..86ab1246 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s1.png diff --git a/Engineering_Physics_by_Shyam_Rajeev/screenshots/s2.png b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s2.png Binary files differnew file mode 100755 index 00000000..becfb80b --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s2.png diff --git a/Engineering_Physics_by_Shyam_Rajeev/screenshots/s3.png b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s3.png Binary files differnew file mode 100755 index 00000000..0e379400 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/screenshots/s3.png |