summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
diff options
context:
space:
mode:
authordebashisdeb2014-06-20 15:42:42 +0530
committerdebashisdeb2014-06-20 15:42:42 +0530
commit83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch)
treef54eab21dd3d725d64a495fcd47c00d37abed004 /Engineering_Physics_Aruldhas/Chapter3_1.ipynb
parenta78126bbe4443e9526a64df9d8245c4af8843044 (diff)
downloadPython-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip
removing problem statements
Diffstat (limited to 'Engineering_Physics_Aruldhas/Chapter3_1.ipynb')
-rw-r--r--Engineering_Physics_Aruldhas/Chapter3_1.ipynb304
1 files changed, 271 insertions, 33 deletions
diff --git a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
index e20ce99f..645d7595 100644
--- a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
+++ b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb
@@ -1,6 +1,7 @@
{
"metadata": {
- "name": "Chapter3"
+ "name": "",
+ "signature": "sha256:bdc5e7b39dc3529751aa6372cd3db8b0870c9abab4c9b51855fb3bce7de6dc73"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -11,25 +12,52 @@
"cell_type": "heading",
"level": 1,
"metadata": {},
- "source": "3: Interference"
+ "source": [
+ "3: Interference"
+ ]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.1, Page number 71"
+ "source": [
+ "Example number 3.1, Page number 71"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the velocity of light\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nbeta = 0.51; #Fringe width(mm)\nd = 2.2; #Distance between the slits(mm)\nD = 2; #Distance between the slits and the screen(m)\n\n#Calculation\nbeta = beta*10**-1; #Fringe width(cm)\nd = d*10**-1; #Distance between the slits(cm)\nD=D*10**2; #Distance between the slits and the screen(cm)\nlamda = beta*d/D; #Wavelength of light(cm)\nlamda = lamda*10**8; #Wavelength of light(A)\n\n#Result\nprint \"The wavelength of light is\",lamda, \"angstrom\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "beta = 0.51; #Fringe width(mm)\n",
+ "d = 2.2; #Distance between the slits(mm)\n",
+ "D = 2; #Distance between the slits and the screen(m)\n",
+ "\n",
+ "#Calculation\n",
+ "beta = beta*10**-1; #Fringe width(cm)\n",
+ "d = d*10**-1; #Distance between the slits(cm)\n",
+ "D=D*10**2; #Distance between the slits and the screen(cm)\n",
+ "lamda = beta*d/D; #Wavelength of light(cm)\n",
+ "lamda = lamda*10**8; #Wavelength of light(A)\n",
+ "\n",
+ "#Result\n",
+ "print \"The wavelength of light is\",lamda, \"angstrom\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The wavelength of light is 5610.0 angstrom\n"
+ "text": [
+ "The wavelength of light is 5610.0 angstrom\n"
+ ]
}
],
"prompt_number": 4
@@ -38,19 +66,48 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.2, Page number 71"
+ "source": [
+ "Example number 3.2, Page number 71"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the seperation between the third fringe\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nlambda1 = 4250; #First wavelength emitted by source of light(A)\nlambda2 = 5050; #Second wavelength emitted by source of light(A)\nD = 1.5; #Distance between the source and the screen(m)\nd = 0.025; #Distance between the slits(mm)\nn = 3; #Number of fringe from the centre\n\n#Calculation\nlambda1 = lambda1*10**-10; #First wavelength emitted(m)\nlambda2 = lambda2*10**-10; #Second wavelength emitted(m)\nd = d*10**-3; #Distance between the slits(m)\nx3 = n*lambda1*D/d; #Position of third bright fringe due to lambda1(m)\nx3_prime = n*lambda2*D/d; #Position of third bright fringe due to lambda2(m)\nx = x3_prime-x3; #separation between the third bright fringe(m)\nx = x*10**2; #separation between the third bright fringe(cm)\n\n#Result\nprint \"The separation between the third bright fringe due to the two wavelengths is\",x, \"cm\"\n",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambda1 = 4250; #First wavelength emitted by source of light(A)\n",
+ "lambda2 = 5050; #Second wavelength emitted by source of light(A)\n",
+ "D = 1.5; #Distance between the source and the screen(m)\n",
+ "d = 0.025; #Distance between the slits(mm)\n",
+ "n = 3; #Number of fringe from the centre\n",
+ "\n",
+ "#Calculation\n",
+ "lambda1 = lambda1*10**-10; #First wavelength emitted(m)\n",
+ "lambda2 = lambda2*10**-10; #Second wavelength emitted(m)\n",
+ "d = d*10**-3; #Distance between the slits(m)\n",
+ "x3 = n*lambda1*D/d; #Position of third bright fringe due to lambda1(m)\n",
+ "x3_prime = n*lambda2*D/d; #Position of third bright fringe due to lambda2(m)\n",
+ "x = x3_prime-x3; #separation between the third bright fringe(m)\n",
+ "x = x*10**2; #separation between the third bright fringe(cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"The separation between the third bright fringe due to the two wavelengths is\",x, \"cm\"\n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The separation between the third bright fringe due to the two wavelengths is 1.44 cm\n"
+ "text": [
+ "The separation between the third bright fringe due to the two wavelengths is 1.44 cm\n"
+ ]
}
],
"prompt_number": 5
@@ -59,19 +116,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.3, Page number 71"
+ "source": [
+ "Example number 3.3, Page number 71"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the refractive index of the sheet of glass\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5.5*10**-5; #Wavelength emitted by source of light(cm)\nn = 4; #Number of fringes shifted\nt = 3.9*10**-4; #Thickness of the thin glass sheet(cm)\n\n#Calculation\nmew = (n*lamda/t)+1; #Refractive index of the sheet of glass\nmew = math.ceil(mew*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The refractive index of the sheet of glass is\",mew",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5.5*10**-5; #Wavelength emitted by source of light(cm)\n",
+ "n = 4; #Number of fringes shifted\n",
+ "t = 3.9*10**-4; #Thickness of the thin glass sheet(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "mew = (n*lamda/t)+1; #Refractive index of the sheet of glass\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off the value of v to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The refractive index of the sheet of glass is\",mew"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The refractive index of the sheet of glass is 1.5642\n"
+ "text": [
+ "The refractive index of the sheet of glass is 1.5642\n"
+ ]
}
],
"prompt_number": 6
@@ -80,19 +158,47 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.4, Page number 72"
+ "source": [
+ "Example number 3.4, Page number 72"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the least thickness of the film that appears bright and dark\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5893; #Wavelength of monochromatic lihgt used(A)\nn = 1; #Number of fringe for the least thickness of the film\ncosr = 1; #for normal incidence\nmew = 1.42; #refractive index of the soap film\n\n#Calculation\n#As for constructive interference, \n#2*mew*t*cos(r) = (2*n-1)*lambda/2, solving for t\nt = (2*n-1)*lamda/(4*mew*cosr); #Thickness of the film that appears bright(A)\n#As for destructive interference, \n#2*mu*t*cos(r) = n*lambda, solving for t\nt1 = n*lamda/(2*mew*cosr); #Thickness of the film that appears bright(A)\n\n#Result\nprint \"The thickness of the film that appears bright is\",t, \"angstrom\"\nprint \"The thickness of the film that appears dark is\",t1, \"angstrom\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5893; #Wavelength of monochromatic lihgt used(A)\n",
+ "n = 1; #Number of fringe for the least thickness of the film\n",
+ "cosr = 1; #for normal incidence\n",
+ "mew = 1.42; #refractive index of the soap film\n",
+ "\n",
+ "#Calculation\n",
+ "#As for constructive interference, \n",
+ "#2*mew*t*cos(r) = (2*n-1)*lambda/2, solving for t\n",
+ "t = (2*n-1)*lamda/(4*mew*cosr); #Thickness of the film that appears bright(A)\n",
+ "#As for destructive interference, \n",
+ "#2*mu*t*cos(r) = n*lambda, solving for t\n",
+ "t1 = n*lamda/(2*mew*cosr); #Thickness of the film that appears bright(A)\n",
+ "\n",
+ "#Result\n",
+ "print \"The thickness of the film that appears bright is\",t, \"angstrom\"\n",
+ "print \"The thickness of the film that appears dark is\",t1, \"angstrom\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The thickness of the film that appears bright is 1037.5 angstrom\nThe thickness of the film that appears dark is 2075.0 angstrom\n"
+ "text": [
+ "The thickness of the film that appears bright is 1037.5 angstrom\n",
+ "The thickness of the film that appears dark is 2075.0 angstrom\n"
+ ]
}
],
"prompt_number": 7
@@ -101,19 +207,42 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.5, Page number 72"
+ "source": [
+ "Example number 3.5, Page number 72"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the angle of the wedge\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5893; #Wavelength of monochromatic lihgt used(A)\nn = 10; #Number of fringe that are found \nd = 1; #Distance of 10 fringes(cm)\n\n#Calculation\nbeta = d/n; #Fringe width(cm)\nlamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\ntheta = lamda/(2*beta); #Angle of the wedge(rad)\ntheta = theta*10**4;\ntheta = math.ceil(theta*10**4)/10**4; #rounding off the value of theta to 4 decimals\n\n#Result\nprint \"The angle of the wedge is\",theta,\"*10**-4 rad\"",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5893; #Wavelength of monochromatic lihgt used(A)\n",
+ "n = 10; #Number of fringe that are found \n",
+ "d = 1; #Distance of 10 fringes(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "beta = d/n; #Fringe width(cm)\n",
+ "lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\n",
+ "theta = lamda/(2*beta); #Angle of the wedge(rad)\n",
+ "theta = theta*10**4;\n",
+ "theta = math.ceil(theta*10**4)/10**4; #rounding off the value of theta to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The angle of the wedge is\",theta,\"*10**-4 rad\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The angle of the wedge is 2.9465 *10**-4 rad\n"
+ "text": [
+ "The angle of the wedge is 2.9465 *10**-4 rad\n"
+ ]
}
],
"prompt_number": 12
@@ -122,19 +251,43 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.6, Page number 72"
+ "source": [
+ "Example number 3.6, Page number 72"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the separation between consecutive bright fringes\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 5900; #Wavelength of monochromatic lihgt used(A)\nt = 0.010; #Spacer thickness(mm)\nl = 10; #Wedge length(cm)\n\n#Calculation\nt = t*10**-1; #Spacer thickness(cm)\ntheta = t/l; #Angle of the wedge(rad)\nlamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\nbeta = lamda/(2*theta); #Fringe width(cm)\n\n#Result\nprint \"The separation between consecutive bright fringes is\",beta, \"cm\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 5900; #Wavelength of monochromatic lihgt used(A)\n",
+ "t = 0.010; #Spacer thickness(mm)\n",
+ "l = 10; #Wedge length(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t*10**-1; #Spacer thickness(cm)\n",
+ "theta = t/l; #Angle of the wedge(rad)\n",
+ "lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\n",
+ "beta = lamda/(2*theta); #Fringe width(cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"The separation between consecutive bright fringes is\",beta, \"cm\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The separation between consecutive bright fringes is 0.295 cm\n"
+ "text": [
+ "The separation between consecutive bright fringes is 0.295 cm\n"
+ ]
}
],
"prompt_number": 13
@@ -143,19 +296,42 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.7, Page number 72"
+ "source": [
+ "Example number 3.7, Page number 72"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the diameter of 20th dark ring\n\n#importing modules\nimport math\n\n#Variable declaration\nD4 = 0.4; #Diameter of 4th dark ring(cm)\nD12 = 0.7; #Diameter of 12th dark ring(cm)\n\n#Calculation\n#We have (dn_plus_k**2)-Dn**2 = 4*k*R*lamda\n#D12**2-D4**2 = 32*R*lamda and D20**2-D12**2 = 32*R*lamda for k = 8\n#since RHS are equal, by equating the LHS we get D12**2-D4**2 = D20**2-D12**2\nD20 = math.sqrt((2*D12**2)-D4**2); #Diameter of 20th dark ring(cm)\nD20 = math.ceil(D20*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n\n#Result\nprint \"The diameter of 20th dark ring is\",D20, \"cm\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "D4 = 0.4; #Diameter of 4th dark ring(cm)\n",
+ "D12 = 0.7; #Diameter of 12th dark ring(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "#We have (dn_plus_k**2)-Dn**2 = 4*k*R*lamda\n",
+ "#D12**2-D4**2 = 32*R*lamda and D20**2-D12**2 = 32*R*lamda for k = 8\n",
+ "#since RHS are equal, by equating the LHS we get D12**2-D4**2 = D20**2-D12**2\n",
+ "D20 = math.sqrt((2*D12**2)-D4**2); #Diameter of 20th dark ring(cm)\n",
+ "D20 = math.ceil(D20*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The diameter of 20th dark ring is\",D20, \"cm\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The diameter of 20th dark ring is 0.9056 cm\n"
+ "text": [
+ "The diameter of 20th dark ring is 0.9056 cm\n"
+ ]
}
],
"prompt_number": 14
@@ -164,19 +340,39 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.8, Page number 73"
+ "source": [
+ "Example number 3.8, Page number 73"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the refractive index of the liquid\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nDn = 0.30; #Diameter of nth dark ring with air film(cm)\ndn = 0.25; #Diameter of nth dark ring with liquid film(cm)\n\n#Calculation\nmew = (Dn/dn)**2; #Refractive index of the liquid\n\n#Result\nprint \"The refractive index of the liquid is\", mew\n",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Dn = 0.30; #Diameter of nth dark ring with air film(cm)\n",
+ "dn = 0.25; #Diameter of nth dark ring with liquid film(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "mew = (Dn/dn)**2; #Refractive index of the liquid\n",
+ "\n",
+ "#Result\n",
+ "print \"The refractive index of the liquid is\", mew\n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The refractive index of the liquid is 1.44\n"
+ "text": [
+ "The refractive index of the liquid is 1.44\n"
+ ]
}
],
"prompt_number": 15
@@ -185,19 +381,39 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.9, Page number 73"
+ "source": [
+ "Example number 3.9, Page number 73"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the wavelength of light\n\n#importing modules\nimport math\n\n#Variable declaration\nx = 0.002945; #Distance through which movable mirror is shifted(cm)\nN = 100; #Number of fringes shifted\n\n#Calculation\nx = x*10**-2; #Distance through which movable mirror is shifted(m)\nlamda = 2*x/N; #Wavelength of light(m)\nlamda = lamda*10**10; #Wavelength of light(A)\n\n#Result\nprint \"The wavelength of light is\",lamda, \"angstrom\"",
+ "input": [
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "x = 0.002945; #Distance through which movable mirror is shifted(cm)\n",
+ "N = 100; #Number of fringes shifted\n",
+ "\n",
+ "#Calculation\n",
+ "x = x*10**-2; #Distance through which movable mirror is shifted(m)\n",
+ "lamda = 2*x/N; #Wavelength of light(m)\n",
+ "lamda = lamda*10**10; #Wavelength of light(A)\n",
+ "\n",
+ "#Result\n",
+ "print \"The wavelength of light is\",lamda, \"angstrom\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The wavelength of light is 5890.0 angstrom\n"
+ "text": [
+ "The wavelength of light is 5890.0 angstrom\n"
+ ]
}
],
"prompt_number": 16
@@ -206,19 +422,41 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 3.10, Page number 73"
+ "source": [
+ "Example number 3.10, Page number 73"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "#To calculate the shift in movable mirror\n\n#importing modules\nimport math\n\n#Variable declaration\nlambda1 = 5896; #Wavelength of D1 line of sodium(A)\nlambda2 = 5890; #Wavelength of D2 line of sodium(A)\n\n#Calculation\nlamda = (lambda1+lambda2)/2;\nx = (lamda**2)/(2*(lambda1-lambda2)); #Shift in movable mirror of Michelson Interferometer(A)\nx = x*10**-7; #Shift in movable mirror of Michelson Interferometer(mm)\nx = math.ceil(x*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n\n#Result\nprint \"The shift in movable mirror is\",x, \"mm\"",
+ "input": [
+ "\n",
+ "\n",
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "lambda1 = 5896; #Wavelength of D1 line of sodium(A)\n",
+ "lambda2 = 5890; #Wavelength of D2 line of sodium(A)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = (lambda1+lambda2)/2;\n",
+ "x = (lamda**2)/(2*(lambda1-lambda2)); #Shift in movable mirror of Michelson Interferometer(A)\n",
+ "x = x*10**-7; #Shift in movable mirror of Michelson Interferometer(mm)\n",
+ "x = math.ceil(x*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"The shift in movable mirror is\",x, \"mm\""
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "The shift in movable mirror is 0.2894 mm\n"
+ "text": [
+ "The shift in movable mirror is 0.2894 mm\n"
+ ]
}
],
"prompt_number": 17
@@ -226,7 +464,7 @@
{
"cell_type": "code",
"collapsed": false,
- "input": "",
+ "input": [],
"language": "python",
"metadata": {},
"outputs": []