summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Malik/Chapter_1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics_Malik/Chapter_1.ipynb')
-rw-r--r--Engineering_Physics_Malik/Chapter_1.ipynb2094
1 files changed, 2094 insertions, 0 deletions
diff --git a/Engineering_Physics_Malik/Chapter_1.ipynb b/Engineering_Physics_Malik/Chapter_1.ipynb
new file mode 100644
index 00000000..4dd3b7b8
--- /dev/null
+++ b/Engineering_Physics_Malik/Chapter_1.ipynb
@@ -0,0 +1,2094 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Interference"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page 1.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # Given \n",
+ "l = 6.6e-7 # wavelength of light in meter\n",
+ "L = 1.32e-5 # coherence length in meter\n",
+ "\n",
+ "#Calculation\n",
+ "coherence_time = L / (3 * 10 ** 8)#calculation for coherence time\n",
+ "\n",
+ "#Result\n",
+ "print \"Coherence time = %.1e sec\"%coherence_time"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence time = 4.4e-14 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page 1.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "L = 2.945e-2 # coherence length in meter\n",
+ "\n",
+ "#Calculations\n",
+ "coherence_time = L / (3 * 10**8) # calculation for coherence time\n",
+ "n = L / l # calculation for number of oscillations \n",
+ "\n",
+ "#Results\n",
+ "print \"Coherence time = %.3e sec.\"%coherence_time\n",
+ "print \"No. of oscillations = %.2e\"%n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence time = 9.817e-11 sec.\n",
+ "No. of oscillations = 4.99e+04\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page 1.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given\n",
+ "l = 6.058e-7 # wavelength of light in meter\n",
+ "L = 0.2 # coherence length in meter\n",
+ "\n",
+ "#Calculations\n",
+ "line_width = (l**2) / L#calculation for line width\n",
+ "f_spread = (3 * 10**8) / L# calculation for frequency spread\n",
+ "f = (3 * 10**8) / l # calculation for frequency\n",
+ "f_stability = f_spread / f # calculation for frequency stability\n",
+ "coherence_time = L / (3 * 10 ** 8) # calculation for coherence time\n",
+ "\n",
+ "#Results\n",
+ "print(\"Coherence time = %.3e sec\"%coherence_time)\n",
+ "print(\"Line width = %.3e meter\"%line_width)\n",
+ "print(\"Frequency stability = %.1e\"%f_stability) #incorrect answer in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence time = 6.667e-10 sec\n",
+ "Line width = 1.835e-12 meter\n",
+ "Frequency stability = 3.0e-06\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page 1.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "lambda_D = 5.5e-13 # Doppler width of orange light in meter\n",
+ "l = 6.058e-7 # wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "coherence_length = (l ** 2) / lambda_D# calculation for coherence light\n",
+ "\n",
+ "#Result\n",
+ "print(\"Coherence length = %.4f meter\"%coherence_length)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence length = 0.6673 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page 1.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "lambda1 = 5.461e-7 # wavelength of light emitted by mercury vapour lamp in meter\n",
+ "band_width1 = 6e8 # band width for mercury vapour lamp in Hz\n",
+ "lambda2 = 6.328e-7 # the operating wavelength of light for He Ne laser \n",
+ "band_width2 = 1e6 # band width for laser in Hz\n",
+ "\n",
+ "#Calculations\n",
+ "delta_lambda1 = (lambda1**2 * band_width1) / 3e8 # calculation for difference between two wavelength for mercury vapour\n",
+ "delta_L1 = lambda1**2 / delta_lambda1 # calculation for coherence length for mercury vapour lamp\n",
+ "delta_lambda2 = (lambda2**2 * band_width2) / 3e8 # calculation for difference between two wavelength for He Ne laser\n",
+ "delta_L2 = lambda2**2 / delta_lambda2 # calculation for coherence length for He Ne laser\n",
+ "R = delta_L1/delta_L2 # calculation for ratio of coherence length of mercury vapour lamp to the coherence length of He Ne laser\n",
+ "\n",
+ "#Result\n",
+ "print(\"The ratio of coherence length of mercury vapour lamp to the coherence length of He Ne laser = 1:%d\"%(1./R))\n",
+ "#Answer differes due to rounding-off values"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of coherence length of mercury vapour lamp to the coherence length of He Ne laser = 1:600\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page 1.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "band_width = 3000 # band width of laser in hertz\n",
+ " \n",
+ "#Calculation\n",
+ "coherence_length = (3 * 10 ** 8) / band_width#calculation for coherence length \n",
+ "\n",
+ "#Result\n",
+ "print(\"Coherence length of laser = %.f meter\"%(coherence_length))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence length of laser = 100000 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7, Page 1.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given\n",
+ "l = 6.328e-7 # wavelength of monochromatic light in meter\n",
+ "t = 10**-10 # chopping time in sec\n",
+ "\n",
+ "#Calculations\n",
+ "coherence_length = (3 * 10 ** 8) * t # calculation for coherence length of monochromatic light \n",
+ "band_width = 1 / t # calculation for band width \n",
+ "line_width = ((l ** 2) * band_width) / (3 * 10 ** 8) # calculation for line width \n",
+ "\n",
+ "#Result\n",
+ "print(\"Coherence length of monochromatic light = %.e meter. \\nband width = %.f Hz. \\nline width = %.4f A.\"%(coherence_length, band_width, line_width*1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence length of monochromatic light = 3e-02 meter. \n",
+ "band width = 10000000000 Hz. \n",
+ "line width = 0.1335 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8, Page 1.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given\n",
+ "l = 6.438e-7 # wavelength of red cadmium line in meter\n",
+ "L = 3.8e-1 # coherence length in meter\n",
+ "\n",
+ "#Calculations\n",
+ "coherence_time = L / (3 * 10 ** 8)# calculation for coherence time\n",
+ "spectral_line_width = (l**2) / L # calculation for spectral line width\n",
+ "\n",
+ "#Result\n",
+ "print(\"Coherence time of red cadmium line = %.3e sec. \\nSpectral line width = %.2e meter.\"%(coherence_time,spectral_line_width))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coherence time of red cadmium line = 1.267e-09 sec. \n",
+ "Spectral line width = 1.09e-12 meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page 1.43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "from sympy import *\n",
+ "\n",
+ "# Given \n",
+ "ratio = 16 # ratio of intensities of two waves\n",
+ "\n",
+ "#Calculation\n",
+ "a1 = sqrt(ratio) # by the formula amplitude = sqrt(intensity)\n",
+ "a2 = 1\n",
+ "R = ((a1 + a2) ** 2) / ((a1 - a2) ** 2)# calculation for ratio of maximum intensity with minimum intensity\n",
+ "R = nsimplify(R)\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio of maximum intensity with minimum intensity =\",R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of maximum intensity with minimum intensity = 25/9\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.10, Page 1.43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "d = 0.0001 # distance between two slits in meter\n",
+ "Beta = 0.005 # width of the fringes formed in meter\n",
+ "D = 1 # distance between slit and screen in meter\n",
+ "\n",
+ "#Calculation\n",
+ "l = (Beta * d) / D # calculation for wavelength of light = %e meter\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A. \"%(l*1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 5000 A. \n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11, Page 1.43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "\n",
+ "# Given \n",
+ "alpha = pi / 180 # angle of bi prism in radian\n",
+ "mu = 1.5 # refractive index of biprism \n",
+ "a = 0.4 # distance of bi prism from slit in meter\n",
+ "b = 0.6 # distance of bi prism from screen in meter\n",
+ "l = 5.893e-7 # wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "D = a + b # calculation for distance between slits and screen\n",
+ "fringe_width = (l * D) / (2 * a * (mu - 1) * alpha) # calculation for fringe width\n",
+ "\n",
+ "#Result\n",
+ "print(\"Fringe width = %.3e meter.\"%(fringe_width))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fringe width = 8.441e-05 meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.12, Page 1.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given \n",
+ "d1 = 4.05e-3 # distance between slits in first position in meter\n",
+ "d2 = 2.90e-3 # distance between slits in second position in meter\n",
+ "l = 5.893e-7 # wavelength of light in meter\n",
+ "D = 1 # distance between slit and screen\n",
+ "\n",
+ "#Calculations\n",
+ "d = sqrt(d1 * d2)# calculation for distance between fringe\n",
+ "fringe_width = (l * D) / d # calculation for fringe width\n",
+ "\n",
+ "#Result\n",
+ "print(\"Fringe width = %.3f mm\"%(fringe_width*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fringe width = 0.172 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.13, Page 1.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import floor\n",
+ "\n",
+ "# Given \n",
+ "fringe_width = 3.42e-4 # fringe width in meter\n",
+ "mu = 1.542 # refractive index of glass\n",
+ "Xn = 2.143e-3 # shift of central fringe in meter\n",
+ "l = 5.89e-7 # wavelength of light in meter\n",
+ "\n",
+ "#Calculations\n",
+ "n = Xn / fringe_width # calculation for order of the fringe\n",
+ "t = (floor(n) * l) / (mu - 1) # calculation for thickness of the glass\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of glass sheet = %.2e meter. \"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of glass sheet = 6.52e-06 meter. \n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.14, Page 1.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "fringe_width = 9e-4 # fringe width in meter\n",
+ "a = 0.1 # distance of bi prism from slit in meter\n",
+ "b = 0.9 # distance of bi prism from screen in meter\n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "D = a + b # calculation for distance between slits and screen\n",
+ "d = (l * D) / fringe_width # calculation for distance between coherent sources\n",
+ "\n",
+ "#Result\n",
+ "print(\"Distance between coherent sources = %.2e meter. \"%d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between coherent sources = 6.55e-04 meter. \n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.15, Page 1.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,degrees\n",
+ "\n",
+ "# Given \n",
+ "fringe_width = 0.0135 # fringe width in meter\n",
+ "a = 0.5 # distance of bi prism from slits in meter\n",
+ "b = 0.5 # distance of bi prism from screen in meter\n",
+ "mu = 1.5 # refractive index of bi prism \n",
+ "alpha = pi / 360 # angle of bi prism in radian \n",
+ "\n",
+ "#Calculations\n",
+ "D = a + b # calculation for distance between slits and screen \n",
+ "l = (2. * a * (mu - 1) * alpha * fringe_width) / D # calculation for wavelength of light = %e meter\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A \"%(l*1e8))\n",
+ "#Answer differs due to rounding-off errors\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 5890 A \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.16, Page 1.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "\n",
+ "# Given \n",
+ "a = 45 # distance between slit and bi prism in cm\n",
+ "alpha = pi / 180 # angle of bi prism in radian\n",
+ "Mu = 1.5 # refractive index of bi prism\n",
+ "fringe_width = 15.6e-3 # fringe width in meter \n",
+ "D = 90 #cm\n",
+ "\n",
+ "#Calculations\n",
+ "d2 = (2*a*(Mu-1)*alpha) # calculation for distance between screen and slit\n",
+ "l = (fringe_width * d2) / D # calculation for wavelength\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A.\"%(l/1e-8))\n",
+ "#Answer differs due to rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 13614 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.17, Page 1.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "D = 1.20 # distance between source and eye piece in meter\n",
+ "Xn = 1.9e-2 # distance move by eye piece for 20 fringe in meter\n",
+ "n = 20 # no. of fringes\n",
+ "d = 6e-4 # distance between slits in meter \n",
+ "\n",
+ "#Calculation\n",
+ "l = (Xn * d) / (D * n)# calculation for wavelength\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A.\"%(l*1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 4750 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.18, Page 1.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import floor\n",
+ "\n",
+ "# Given \n",
+ "lambda1 = 5.890e-7 # wavelength of first light in meter\n",
+ "lambda2 = 4.358e-7 # wavelength of second light in meter\n",
+ "n1 = 40 # no. of fringes observed in the field of in first case \n",
+ "\n",
+ "#Calculation\n",
+ "n2 = (n1 * lambda1) / lambda2 # by using formula n1*lambda1=n2*lambda2\n",
+ "\n",
+ "#Result\n",
+ "print(\"No. of fringes observed in field of view in second case = %d. \"%(floor(n2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of fringes observed in field of view in second case = 54. \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.19, Page 1.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos\n",
+ "\n",
+ "# Given \n",
+ "l = 5.893e-7 # wavelength of light in meter\n",
+ "Mu = 1.42 # refractive index of soap film \n",
+ "i = 0 # incidence angle in radian \n",
+ "r = 0 # refracted angle in radian\n",
+ "n = 1 # for smallest thickness\n",
+ "\n",
+ "#Calculations\n",
+ "t1 = ((2 * n - 1) * l) / (4 * Mu * cos(r)) # calculation for east thickness of soap film for bright fringe\n",
+ "t2 = (n * l) / (2 * Mu * cos(r)) # calculation for east thickness of soap film for dark fringe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Least thickness of soap film -\\n (a) For bright fringe = %.3e mm. \\n (b) For dark fringe = %.3e mm.\"%(t1*1000,t2*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least thickness of soap film -\n",
+ " (a) For bright fringe = 1.038e-04 mm. \n",
+ " (b) For dark fringe = 2.075e-04 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20, Page 1.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,pi,sin,asin\n",
+ "\n",
+ "# Given \n",
+ "l = 5.89e-7 # wavelength of light in meter\n",
+ "Mu_o = 1.4 # refractive index of oil film \n",
+ "Mu_w = 1.33 # refractive index of water\n",
+ "i = pi / 6 # incidence angle in radian \n",
+ "n = 6 # no. of fringes seen\n",
+ "\n",
+ "#Calculation\n",
+ "r = asin(sin(i) / Mu_o) # calculation for angle of refraction\n",
+ "t = (n * l) / (2 * Mu_o * cos(r)) # calculation for thickness of film\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of oil film = %.3e mm.\"%(t*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of oil film = 1.351e-03 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 98
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.21, Page 1.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos\n",
+ "\n",
+ "# Given \n",
+ "l = 6e-7 # wavelength of light in meter\n",
+ "Mu = 1.463 # refractive index of soap film \n",
+ "i = 0 # incidence angle in radian \n",
+ "r = 0 # refracted angle in radian\n",
+ "n = 1 # for smallest thickness\n",
+ "\n",
+ "#Calculation\n",
+ "t = ((2 * n - 1) * l) / (4 * Mu * cos(r)) # calculation for least thickness of soap film for bright fringe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Least thickness of soap film for bright fringe = %.3e mm. \"%(t*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least thickness of soap film for bright fringe = 1.025e-04 mm. \n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.22, Page 1.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,pi,sin\n",
+ "\n",
+ "# Given That\n",
+ "l = 5.89e-7 # wavelength of light \n",
+ "Mu_o = 1.46 # refractive index of oil film \n",
+ "i = pi / 6 # incidence angle in radian \n",
+ "n = 8 # no. of fringe is seen\n",
+ "\n",
+ "#Calculations\n",
+ "r = asin(sin(i) / Mu_o) # calculation for angle of refraction\n",
+ "t = (n * l) / (2 * Mu_o * cos(r)) # calculation for thickness of oil film\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of oil film = %.2e mm. \"%(t*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of oil film = 1.72e-03 mm. \n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.23, Page 1.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,pi,floor\n",
+ "\n",
+ "# Given That\n",
+ "lambda1 = 4e-7 # max. wavelength of light in meter\n",
+ "lambda2 = 5e-7 # min. wavelength of light in meter\n",
+ "Mu = 1.4 # refractive index of soap film \n",
+ "i = pi / 4 # incidence angle in radian \n",
+ "t = 1e-5 # thickness of oil film in meter\n",
+ "\n",
+ "#Calculations\n",
+ "r = asin(sin(i) / Mu) # calculation for angle of refraction\n",
+ "n1 = (2 * Mu * t * cos(r)) / lambda1 # calculation for no. of dark bands seen in the case of max. wavelength \n",
+ "n2 = (2 * t * Mu * cos(r)) / lambda2 # calculation for no. of dark seen in the case of min. wavelength \n",
+ "n = floor(n1) - floor(n2) # claculation for no. of dark bands seen between wavelengths\n",
+ "\n",
+ "#Result\n",
+ "print(\"No. of dark bands seen between wavelengths = %d\"%n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of dark bands seen between wavelengths = 12\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.24, Page 1.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,pi\n",
+ "\n",
+ "# Given \n",
+ "l = 5.89e-7 # wavelength of light in meter\n",
+ "Mu = 1.5 # refractive index of soap film \n",
+ "r = pi / 3 # refracted angle in radian\n",
+ "n = 1 # for smallest thickness\n",
+ "\n",
+ "#Calculation\n",
+ "t = (n * l) / (2 * Mu * cos(r)) # calculation for least thickness of soap film for bright fringe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Least thickness of soap film for bright fringe = %.3e meter \"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least thickness of soap film for bright fringe = 3.927e-07 meter \n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.25, Page 1.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,pi,sin\n",
+ "\n",
+ "# Given That\n",
+ "lambda1 = 6.1e-7 # max. wavelength of light in meter\n",
+ "lambda2 = 6e-7 # min. wavelength of light in meter\n",
+ "Mu = 1.333 # refractive index of film \n",
+ "i = pi / 4 # incidence angle in radian \n",
+ "\n",
+ "#Calculation\n",
+ "r = asin(sin(i) / Mu) # calculation for angle of refraction\n",
+ "n = lambda2 / (lambda1 - lambda2) # calculation for no. of bright band\n",
+ "t = (n * lambda1) / (2 * Mu * cos(r)) # calculation for thickness of the film\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of the film = %.2e meter \"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film = 1.62e-05 meter \n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.26, Page 1.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos\n",
+ "\n",
+ "# Given \n",
+ "l = 6e-7 # wavelength of light in meter\n",
+ "Mu = 1.463 # refractive index of soap film \n",
+ "i = 0 # incidence angle in radian \n",
+ "r = 0 # refracted angle in radian\n",
+ "n = 1 # for smallest thickness\n",
+ "\n",
+ "#Calculation\n",
+ "t = ((2 * n - 1) * l) / (4 * Mu * cos(r)) # calculation for thickness of soap film\n",
+ "\n",
+ "#Result\n",
+ "print(\"\\n Least thickness of soap film for bright fringe = %.3e meter. \"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Least thickness of soap film for bright fringe = 1.025e-07 meter. \n"
+ ]
+ }
+ ],
+ "prompt_number": 106
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.27, Page 1.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import cos,sin,asin,pi,degrees,radians\n",
+ "\n",
+ "# Given \n",
+ "lambda1 = 6.1e-7 # max. wavelength of light in meter\n",
+ "lambda2 = 6e-7 # min. wavelength of light in meter\n",
+ "Mu = 4. / 3 # refractive index of film \n",
+ "i = asin(4. / 5) # incidence angle in radian \n",
+ "\n",
+ "#Calculation\n",
+ "r = asin(sin(i) / Mu)*180/pi # calculation for angle of refraction\n",
+ "n = lambda2 / (lambda1 - lambda2) # calculation for order of fringe\n",
+ "t = (n * lambda1) / (2 * Mu * cos(r*pi/180)) # calculation for thickness of film\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of the film = %.3e mm. \"%(t*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film = 1.716e-02 mm. \n"
+ ]
+ }
+ ],
+ "prompt_number": 127
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.28, Page 1.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 5.893e-7 # wavelenth of light in meter\n",
+ "n = 20 # no. of interference fringes are observed \n",
+ "Mu = 1 # refractive index of air\n",
+ "i = 0 # incidence angle in radian \n",
+ "r = 0 # refracted angle in radian \n",
+ "\n",
+ "#Calculation\n",
+ "t = (n * l) / (2 * Mu) # calculation for thickness of fringe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of wire = %.3e mm. \"%(t*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of wire = 5.893e-03 mm. \n"
+ ]
+ }
+ ],
+ "prompt_number": 128
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.29, Page 1.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "lamda = 6e-7 # wavelength of light in meter\n",
+ "Mu = 1 # refractive index of air film\n",
+ "l = 0.06e-3 # diameter of wire in meter\n",
+ "L = 0.15 # distance of wire from edge in meter\n",
+ "\n",
+ "#Calculation\n",
+ "theta = l / L #calculation for theta\n",
+ "fringe_width = (lamda * L)/ (2 * Mu * l) # calculation for fringe width\n",
+ "\n",
+ "#Result\n",
+ "print(\"Fringe width = %.1e mm.\"%fringe_width)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fringe width = 7.5e-04 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 140
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.30, Page 1.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 4.56e-7 # wavelength of light in meter\n",
+ "theta = 1.9e-4 # angle of wedge in radian \n",
+ "Mu = 1 # refractive index of air\n",
+ "\n",
+ "#Calculation\n",
+ "fringe_width = l / (2 * Mu * theta)# calculation for fringe width \n",
+ "\n",
+ "#Result\n",
+ "print(\"Fringe width = %.1f mm.\"%(fringe_width*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fringe width = 1.2 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.31, Page 1.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "lamda = 6e-7 # wavelength of light in meter\n",
+ "Mu = 1 # refractive index of air film\n",
+ "l = 0.03*10**-3 # diameter of wire in meter\n",
+ "L = 0.15 # distance of wire from edge in meter\n",
+ "i = 0 # incidence angle in radian \n",
+ "r = 0 # refracted angle in radian \n",
+ "\n",
+ "#Calculation\n",
+ "theta = l / L # calculation for theta\n",
+ "fringe_width = lamda / (2 * Mu * theta) # calculation for fringe width \n",
+ "\n",
+ "#Result\n",
+ "print(\"Fringe width = %.1f mm.\"%(fringe_width*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fringe width = 1.5 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 141
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.32, Page 1.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 5.890e-7 # wavelength of light in meter\n",
+ "theta = 1e-2 # angle of wedge in radian \n",
+ "n = 12 # no. of dark fringe\n",
+ "Mu = 1 # refractive index of air\n",
+ "i = 0 # incidence angle in radian\n",
+ "r = 0 # refracted angle in radian\n",
+ "\n",
+ "#Calculatiom\n",
+ "x = ( n * l) / (2 * theta) # calculation for distance\n",
+ "\n",
+ "#Result\n",
+ "print(\"Distance = %.2f mm. \"%(x*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance = 0.35 mm. \n"
+ ]
+ }
+ ],
+ "prompt_number": 142
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.33, Page 1.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "\n",
+ "# Given \n",
+ "l = 5.5e-7 # wavelength of light in meter\n",
+ "w = 2e-5 # fringe width in meter\n",
+ "Mu = 1.5 # refractive index of film\n",
+ "i = 0 # incidence angle in radian\n",
+ "r = 0 # refracted angle in radian\n",
+ "\n",
+ "#Calculation\n",
+ "theta = l / (2 * Mu * w)# calculation for the angle of the film\n",
+ "\n",
+ "#Result\n",
+ "print(\"Angle of wedge = %.3f degree. \"%(theta * 180/pi))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of wedge = 0.525 degree. \n"
+ ]
+ }
+ ],
+ "prompt_number": 143
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Example 1.34, Page 1.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "d1 = 5.9e-3 # diameter of 15th ring in meter\n",
+ "d2 = 3.36e-3 # diameter of 5th ring in meter\n",
+ "R = 1 # radius of the plano-convex lens in meter\n",
+ "\n",
+ "#Calculations\n",
+ "p = 15 - 5\n",
+ "l = ((d1**2) - (d2**2)) / (4 * p * R) # calculation for wavelength of light\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A.\"%(l*1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 5880 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.35, Page 1.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "d1 = 2e-3 # diameter of 10th ring in meter\n",
+ "d2 = 3e-3 # diameter of 20th ring in meter\n",
+ "f = 0.9 # focal length of the plano-convex lens in meter\n",
+ "mu = 1.5 # refractive index of lens\n",
+ "\n",
+ "#Calculations\n",
+ "p = 20 - 10\n",
+ "R = (f * (mu - 1)) # calculation for radius of convex surface of lens\n",
+ "l = ((d2**2) - (d1**2)) / (4 * p * R)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f nm.\"%(l*1e9))\n",
+ "#Incorrect answer in the textbook\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 2778 nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 145
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.36, Page 1.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt \n",
+ "\n",
+ "# Given \n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "f = 1 # focal length of the plano-convex lens in meter\n",
+ "mu = 1.5 # refractive index of lens \n",
+ "n = 7 # no. of bright ring\n",
+ "\n",
+ "#Calculations\n",
+ "p = 20 - 10\n",
+ "R = (f * (mu - 1)) * 2 # calculation for radius of lens\n",
+ "D = sqrt(4 * n * l * R) # calculation for diameter of 7th ring \n",
+ "\n",
+ "#Result\n",
+ "print(\"Diameter of 7th bright ring = %.3e meter.\"%(D))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of 7th bright ring = 4.063e-03 meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 146
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.37, Page 1.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given That\n",
+ "lambda1 = 6e-7 # wavelength of first light in meter\n",
+ "lambda2 = 4.8e-7 # wavelength of second light in meter\n",
+ "r = 0.96 # radius of curvature of curved surface of lens in meter\n",
+ "\n",
+ "#Calculations\n",
+ "n = lambda2 / (lambda1 - lambda2) # calculation for order of fringe\n",
+ "D = sqrt(4 * (n + 1) * lambda2 * r) # calculation for diameter of ring\n",
+ "\n",
+ "#Result\n",
+ "print(\"Diameter of (n +1)th dark ring of lambda2. = %.2e meter.\"%D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of (n +1)th dark ring of lambda2. = 3.04e-03 meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 147
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.38, Page 1.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given \n",
+ "lambda1 = 6e-7 # wavelength of first light in meter\n",
+ "lambda2 = 5.9e-7 # wavelength of second light in meter\n",
+ "r = 0.9 # radius of curvature of curved surface of lens in meter\n",
+ "\n",
+ "#Calculations\n",
+ "n = lambda2 / (lambda1 - lambda2) # calculation for order of ring\n",
+ "D = sqrt(4 * (n + 1) * lambda1 * r) # calculation for diameter of ring\n",
+ "\n",
+ "#Result\n",
+ "print(\"Diameter of nth dark ring of lambda1 = %.4f meter.\"%D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of nth dark ring of lambda1 = 0.0114 meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 148
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.39, Page 1.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "D = 4e-3 # diameter of 7th brighter fringe in m\n",
+ "R = 1 # radius of curvature in m\n",
+ "n = 7 # for seventh brighter fringe\n",
+ "\n",
+ "#Calculation\n",
+ "mu = 2*(2*n-1)*l*R / D**2 # calculation for refractive index of liquid\n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of liquid = %.2f.\"%mu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid = 0.96.\n"
+ ]
+ }
+ ],
+ "prompt_number": 149
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.40, Page 1.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "D1 = 3e-3 # diameter of nth dark fringe when liquid is absent between the lens and the plate in m\n",
+ "D2 = 2.5e-3 # diameter of nth dark fringe when liquid is introduced between the lens and the plate in m\n",
+ "c = 3e8 # velocity of light in vacuum in m/sed\n",
+ "\n",
+ "#Calculations\n",
+ "mu = D1**2 / D2**2# calculation for refractive index\n",
+ "v = 3e8 / mu # calculation for velocity of light \n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of liquid = %.2f.\\n velocity of light in the liquid = %.2e m/sec.\"%(mu,v))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid = 1.44.\n",
+ " velocity of light in the liquid = 2.08e+08 m/sec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 150
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.41, Page 1.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "D = 5.1e-3 # diameter of 16th brighter fringe in m\n",
+ "R = 1 # radius of curvature in m\n",
+ "n = 16 # for sixteenth brighter fringe\n",
+ "\n",
+ "#Calculation\n",
+ "mu = 4*n*l*R / D**2 # calculation for refractive index of liquid\n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of liquid = %.2f\"%mu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid = 1.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 170
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.42, Page 1.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given \n",
+ "l = 6.3e-7 # wavelength of light in meter\n",
+ "mu = 1.63 # refractive index of liquid \n",
+ "R = 0.9 # the radius of curvature of convex lens in meter\n",
+ "\n",
+ "#Calculation\n",
+ "r = sqrt(l*R/mu) # calculation for the radius of smallest dark ring\n",
+ "\n",
+ "#Result\n",
+ "print(\"The radius of smallest dark ring = %.2f mm.\"%(r*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The radius of smallest dark ring = 0.59 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 171
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.43, Page 1.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "r = 10./7 # ratio of nth ring diameter for two media\n",
+ "\n",
+ "#Calculation\n",
+ "R = (1/r)**2 # calculation for the ratio of refractive index of media\n",
+ "\n",
+ "#Result\n",
+ "print(\"The ratio refractive index of media = %.f:100.\"%(R*100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio refractive index of media = 49:100.\n"
+ ]
+ }
+ ],
+ "prompt_number": 173
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.44, Page 1.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "R = 0.9 # radius of curvature of the lower face of the lens in meter\n",
+ "D = 4.8e-3 # diameter of the 10th dark ring in meter\n",
+ "n = 10 # for 10th dark ring\n",
+ "\n",
+ "#Calculation\n",
+ "l = D**2 / (4 * n * R) # calculation for wavelength of light\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A.\"%(l * 1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 6400 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 174
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.45, Page 1.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "r = 1./2 # ratio of 5th ring diameter \n",
+ "\n",
+ "#Calculatio\n",
+ "R = (1/r)**2 # calculation for refractive index of liquid\n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of liquid = %.f. \"%R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid = 4. \n"
+ ]
+ }
+ ],
+ "prompt_number": 175
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.46, Page 1.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given That\n",
+ "R = 1 # radius of curvature of lens of both side in meter\n",
+ "l = 5.4e-7 # wavelength of monochromatic light in meter\n",
+ "n1 = 5 # for 5th dark ring\n",
+ "n2 = 15 # for 10th dark ring\n",
+ "\n",
+ "#Calculation\n",
+ "r1 = sqrt((n1*l)/(1/R + 1/R)) # calculation for radius of 5th dark ring\n",
+ "r2 = sqrt((n2*l)/(1/R + 1/R)) # calculation for radius of 15th dark ring\n",
+ "d = r2 - r1 # calculation for distance between 5th and 15th dark ring\n",
+ "\n",
+ "#Result\n",
+ "print(\"Distance between 5th and 15th dark ring = %.3f cm.\"%(d * 100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between 5th and 15th dark ring = 0.085 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 177
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.47, Page 1.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "x = 2.5e-5 # distance moved by movable mirror in meter\n",
+ "t = 5e-5 # thickness of mica sheet in meter\n",
+ "\n",
+ "#Calculation\n",
+ "mu = x / t + 1 # calculation for refractive index of mica\n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of mica = %.1f\"%mu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of mica = 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 179
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.48, Page 1.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "x = 6e-5 # distance moved by movable mirror in meter\n",
+ "N = 200 # no. of fringes crossed the field of view \n",
+ "\n",
+ "#Calculation\n",
+ "l = (2 * x) / N # calculation for wavelength of light\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of light = %.f A.\"%(l * 1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light = 6000 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 180
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.49, Page 1.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "n = 50 # no. of bands crosses the line of observation \n",
+ "l = 5.896e-7 # wavelength of light in meter\n",
+ "mu = 1.4 # refractive index \n",
+ "\n",
+ "#Calculation\n",
+ "t = n*l / (2*(mu-1)) # calculation for thickness of the plate\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thickness of the plate = %.2e m.\"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the plate = 3.69e-05 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 181
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.50, Page 1.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "n = 50 # no. of bands crosses the line of observation \n",
+ "lambda1 = 5.896e-7 # max. wavelength of light in meter\n",
+ "lambda2 = 5.89e-7 # min. wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "x = lambda1 * lambda2 /(lambda1 - lambda2) # calculation for the path difference\n",
+ "\n",
+ "#Result\n",
+ "print(\"The path difference = %.4f mm.\"%(x*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The path difference = 0.5788 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 182
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.51, Page 1.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "x = 2.948e-5 # distance moved by movable mirror in meter\n",
+ "n = 100 # no. of fringes cross the field of view \n",
+ "\n",
+ "#Calculation\n",
+ "l = 2*x/n # calculation for wavelength of monochromatic light\n",
+ "\n",
+ "#Result\n",
+ "print(\"Wavelength of monochromatic light = %.f A.\"%(l * 1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of monochromatic light = 5896 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 183
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.52, Page 1.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "lambda1 = 5.896e-7 # max. wavelength of light in meter\n",
+ "lambda2 = 5.89e-7 # min. wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "x = lambda1 * lambda2 /(2*(lambda1 - lambda2)) # calculation for the path difference\n",
+ "\n",
+ "#Result\n",
+ "print(\"The distance through which the movable mirror is move = %.3f mm.\"%(x*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance through which the movable mirror is move = 0.289 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 184
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.53, Page 1.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "x = 2.945e-4 # distance moved by movable mirror in meter\n",
+ "l = 5.893e-7 # mean wavelength of light in meter\n",
+ "\n",
+ "#Calculation\n",
+ "delta_lambda = l**2 / (2*x) # calculation for difference between two wavelengths\n",
+ "\n",
+ "#Result\n",
+ "print(\"Difference between two wavelengths = %.3f A.\"%(delta_lambda*1e10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Difference between two wavelengths = 5.896 A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 185
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.54, Page 1.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given \n",
+ "n = 140 # no. of shift in fringe\n",
+ "l = 5.46e-7 # wavelength of light in meter\n",
+ "t = 0.2 # length of tube in meter\n",
+ "\n",
+ "#Calculation\n",
+ "mu = (n*l)/(2*t) + 1 # calculation for refractive index of gas\n",
+ "\n",
+ "#Result\n",
+ "print(\"Refractive index of gas = %.5f\"%mu)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of gas = 1.00019\n"
+ ]
+ }
+ ],
+ "prompt_number": 188
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file