{
 "metadata": {
  "name": "",
  "signature": "sha256:282ea574e7d380ae7e4fe12af02b21f60137010d8c4eced1f0ebaa4c95b2a701"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER17 : LIGHT WAVES "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 : Pg 361"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.1\n",
      "#calculation of the speed of light in glass\n",
      "\n",
      "#given data\n",
      "mu=1.5#refractive index of glass\n",
      "v0=3.*10.**8.#speed(in m/s) of light in vacuum\n",
      "\n",
      "#calculation\n",
      "v=v0/mu#definition of the refractive index\n",
      "\n",
      "print '%s %.2f %s' %('the speed of light in glass is',v,'m/s')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the speed of light in glass is 200000000.00 m/s\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 : Pg 366"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.2\n",
      "#calculation of the separation between successive bright fringes\n",
      "\n",
      "#given data\n",
      "d=0.10*10.**-3.#separation(in m) between the slits\n",
      "lambd=600.*10.**-9.#wavelength(in m) of the light used\n",
      "D=1.#separation(in m) between the slits and the screen\n",
      "\n",
      "#calculation\n",
      "w=D*lambd/d#separation between successive bright fringes\n",
      "\n",
      "print '%s %3.1e %s %.2f %s' %('the separation between successive bright fringes is',w,'m or',w*10**3,'mm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the separation between successive bright fringes is 6.0e-03 m or 6.00 mm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 : Pg 367"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.3\n",
      "#calculation of the wavelength of light in the water \n",
      "\n",
      "#given data\n",
      "lambdan=589.#wavelength(in nm) of light in vacuum\n",
      "mu=1.33#refractive index of water\n",
      "\n",
      "#calculation\n",
      "lambd=lambdan/mu#definition of the refractive index\n",
      "\n",
      "print '%s %.2f %s' %('the wavelength of light in the water is',round(lambd),'nm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the wavelength of light in the water is 443.00 nm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 : Pg 369"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.4\n",
      "#calculation of the minimum thickness of the film\n",
      "\n",
      "#given data\n",
      "lambd=589.#wavelength(in nm) of the light used\n",
      "mu=1.25#refractive index of the material\n",
      "\n",
      "#calculation\n",
      "#for strong reflection......2*mu*d = lambda/2\n",
      "d=lambd/(4.*mu)#minimum thickness\n",
      "\n",
      "print '%s %.2f %s' %('the minimum thickness of the film is',round(d),'nm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the minimum thickness of the film is 118.00 nm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 : Pg 372"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.5\n",
      "#calculation of the angular divergence for most of the light getting diffracted\n",
      "\n",
      "#given data\n",
      "lambd=450.*10.**-9.#wavelength(in m) of the light used\n",
      "b=0.2*10.**-3.#width(in m) of the slit\n",
      "\n",
      "#calculation\n",
      "#for theta tends to zero......sin(theta) = theta\n",
      "theta1=lambd/b#angle of minima\n",
      "theta2=-lambd/b#angle of minima\n",
      "theta=theta1-theta2#angular divergence\n",
      "\n",
      "print '%s %3.1e %s' %('the angular divergence for most of the light getting diffracted is',theta,'radian')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the angular divergence for most of the light getting diffracted is 4.5e-03 radian\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6 : Pg 373"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.6\n",
      "#calculation of the diameter of the disc image\n",
      "\n",
      "#given data\n",
      "lambd=590.*10.**-9.#wavelength(in m) of the light used\n",
      "b=10.*10.**-2.#diameter(in m) of the converging lens used\n",
      "d=20.#distance(in m) between the lens and the point of focus\n",
      "\n",
      "#calculation\n",
      "sintheta=1.22*lambd/b#angular radius\n",
      "r=d*sintheta#radius of the disc image\n",
      "d=2.*r#diameter of the disc image\n",
      "\n",
      "print '%s %3.1e %s' %('the diameter of the disc image is',d,'cm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the diameter of the disc image is 2.9e-04 cm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "WORKED EXAMPLES "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1w : Pg 376"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.1w\n",
      "#calculation of the limits of wavelengths in the water\n",
      "\n",
      "#given data\n",
      "lambda01=400.#mimimum wavelength(in nm) of the light used\n",
      "lambda02=700.#maximum wavelength(in nm) of the light used\n",
      "mu=1.33#refractive index of water\n",
      "\n",
      "#calculation\n",
      "lambda1=lambda01/mu#definition of the refractive index\n",
      "lambda2=lambda02/mu#definition of the refractive index\n",
      "\n",
      "print '%s %.2f %s %.2f %s' %('the limits of wavelengths in the water are',lambda1,'nm and',lambda2,'nm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the limits of wavelengths in the water are 300.75 nm and 526.32 nm\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2w : Pg 376"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.2w\n",
      "#calculation of the refractive index of the glass\n",
      "\n",
      "#given data\n",
      "x1=2.#distance(in cm)travelled through the glass\n",
      "x2=2.25#distance(in cm)travelled through the water\n",
      "muw=1.33#refractive index of water\n",
      "\n",
      "#calculation\n",
      "#for 'x' distance travelled through a medium of refractive index 'mu',the optical path is 'mu*x'\n",
      "mug=muw*x2/x1#refractive index of glass\n",
      "\n",
      "print '%s %.2f' %('the refractive index of the glass is',mug)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the refractive index of the glass is 1.50\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3w : Pg 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.3w\n",
      "#calculation of the wavelengths of the violet and the red light\n",
      "\n",
      "#given data\n",
      "D=2.5#separation(in m) between the slit and the screen\n",
      "d=0.5*10.**-3.#separation(in m) between the slits\n",
      "yv=2.*10.**-3.#distance(in m) between the central white fringe and the first violet fringe\n",
      "yr=3.5*10.**-3.#distance(in m) between the central white fringe and the first red fringe\n",
      "\n",
      "#calculation\n",
      "lambdav=yv*d/D#wavelength of the violet light\n",
      "lambdar=yr*d/D#wavelength of the red light\n",
      "\n",
      "print '%s %.2f %s' %('the wavelength of the violet light is',lambdav*10**9,'nm')\n",
      "print '%s %.2f %s' %('\\nthe wavelength of the red light is',lambdar*10**9,'nm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the wavelength of the violet light is 400.00 nm\n",
        "\n",
        "the wavelength of the red light is 700.00 nm\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4w : Pg 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.4w\n",
      "#calculation of the separation between the slits\n",
      "\n",
      "#given data\n",
      "lambd=589.3*10.**-9.#wavelength(in m) of the sodium light\n",
      "D=100.*10.**-2.#separation(in m) between the slit and the screen\n",
      "n=10.#number of the bright fringe\n",
      "x=12.*10.**-3.#distance(in m) between the central maximum and the tenth bright fringe\n",
      "\n",
      "#calculation\n",
      "d=n*lambd*D/x#separation between the slits\n",
      "\n",
      "print '%s %3.1e %s %.2f %s' %('the separation between the slits is',d,'m or',d*10**3,'mm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the separation between the slits is 4.9e-04 m or 0.49 mm\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5w : Pg 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.5w\n",
      "#calculation of the ratio of maximum intensity to the minimum intensity in the interference fringe pattern\n",
      "#given data\n",
      "#intensity of the light coming from one slit in Young's double slit experiment is double the intensity of the light coming from the other slit\n",
      "n=2.\n",
      "import math\n",
      "#calculation\n",
      "r=((math.sqrt(n)+1.)**2.)/((math.sqrt(n)-1.)**2.)#required ratio\n",
      "\n",
      "print '%s %.2f' %('the ratio of maximum intensity to the minimum intensity in the interference fringe pattern is',round(r))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the ratio of maximum intensity to the minimum intensity in the interference fringe pattern is 34.00\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6w : Pg 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.6w\n",
      "#calculation of the ratio of maximum intensity to the minimum intensity in the interference pattern\n",
      "\n",
      "#given data\n",
      "#width of one slit in Young's double slit experiment is double that of the other\n",
      "n=2.\n",
      "\n",
      "#calculation\n",
      "r=((n+1.)**2.)/((n-1.)**2.)#required ratio\n",
      "\n",
      "print '%s %.2f' %('the ratio of maximum intensity to the minimum intensity in the interference pattern is',r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the ratio of maximum intensity to the minimum intensity in the interference pattern is 9.00\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E7w : Pg 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.7w\n",
      "#calculation of the maximum and the minimum path difference at the detector \n",
      "\n",
      "#given data\n",
      "lambd=600.*10.**-9.#wavelength(in m) of the light \n",
      "d=1.*10.**-2.*10.**-2.#distance(in m) between the sources\n",
      "\n",
      "#calculation\n",
      "pdmax=d#path diffrence maximum\n",
      "pdmin=0#path diffrence minimum\n",
      "#farthest minima occurs for path difference lambda/2\n",
      "#sqrt(D**2 + d**2) - D = lambda/2\n",
      "D=(d**2./lambd)-(lambd/4.)#distance of the farthest minima\n",
      "\n",
      "print '%s %3.1e %s' %('the maximum path difference on moving the detector along S1P line is',pdmax*10**2,'m')\n",
      "print '%s %.2f %s' %('\\nthe minimum path difference on moving the detector along S1P line is',pdmin*10**2,'cm')\n",
      "print '%s %.2f %s' %('\\nthe farthest minimum is located at a distance of',D*10**2,'cm from the point S1')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the maximum path difference on moving the detector along S1P line is 1.0e-02 m\n",
        "\n",
        "the minimum path difference on moving the detector along S1P line is 0.00 cm\n",
        "\n",
        "the farthest minimum is located at a distance of 1.67 cm from the point S1\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E8w : Pg 378"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.8w\n",
      "#calculation of the distance of bright fringe from the central maximum\n",
      "\n",
      "#given data\n",
      "lambda1=6500.*10.**-10.#wavelength(in m) of the light beam1\n",
      "lambda2=5200.*10.**-10.#wavelength(in m) of the light beam2\n",
      "d=2.0*10.**-3.#separation(in m) between the slits\n",
      "D=120.*10.**-2.#separation(in m) between the slits and the screen\n",
      "n=3.#number of the bright fringe\n",
      "\n",
      "#calculation\n",
      "y=n*lambda1*D/d#the distance of bright fringe from the central maximum\n",
      "#from the equation of the distance of bright fringe from the central maximum.....y=n*lambda*D/d\n",
      "#let m th bright fringe of beam 1 coincides with n th bright fringe of beam 2\n",
      "#ym = yn\n",
      "#m : n = 4 : 5.....is their minimum integral ratio\n",
      "m=4.\n",
      "ym=m*lambda1*D/d#least distance from the central maximum where both wavelengths coincides\n",
      "print '%s %.2f %s' %('the distance of the third bright fringe from the central maximum is',y*10**2,'cm')\n",
      "print '%s %.2f %s' %('\\nthe least distance from the central maximum where both the wavelengths coincides is',ym*10**2,'cm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance of the third bright fringe from the central maximum is 0.12 cm\n",
        "\n",
        "the least distance from the central maximum where both the wavelengths coincides is 0.16 cm\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9w : Pg 378"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.9w\n",
      "#calculation of the number of fringes that will shift due to introduction of the sheet\n",
      "\n",
      "#given data\n",
      "lambd=600.*10.**-9.#wavelength(in m) of the light used\n",
      "t=1.8*10.**-5.#thickness(in m) of the transparent sheet\n",
      "mu=1.6#refractive index of the material\n",
      "\n",
      "#calculation\n",
      "n=((mu-1.)*t)/lambd#number of fringes shifted\n",
      "\n",
      "print '%s %.2f' %('the number of fringes that will shift due to introduction of the sheet is',n)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the number of fringes that will shift due to introduction of the sheet is 18.00\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10w : Pg 378"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.10w\n",
      "#calculation of the wavelengths in the visible region that are strongly reflected\n",
      "\n",
      "#given data\n",
      "d=.5*10.**-6.#thickness(in m) of the glass plate\n",
      "mu=1.5#refractive index of the medium\n",
      "lambda1=400.*10.**-9.#minimum wavelength(in m) of the visible region\n",
      "lambda2=700.*10.**-9.#maximum wavelength(in m) of the visible region\n",
      "\n",
      "#calculation\n",
      "#condition for strong reflection of light of wavelength lambda is \n",
      "#2*mu*d = (n + (1/2))*lambda............(1)\n",
      "n1=round((2.*mu*d/lambda1)-(1./2.))#integral value of n for lambda1\n",
      "n2=round((2.*mu*d/lambda2)-(1./2.))#integral value of n for lambda2\n",
      "lambda1n=(2.*mu*d)/(n1+(1./2.))#from equation (1)\n",
      "lambda2n=(2.*mu*d)/(n2+(1./2.))#from equation (1)\n",
      "\n",
      "print '%s %.2f %s %.2f %s' %('the wavelengths in the visible region that are strongly reflected are',round(lambda1n*10**9),'nm and',round(lambda2n*10**9),'nm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the wavelengths in the visible region that are strongly reflected are 429.00 nm and 600.00 nm\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E11w : Pg 378 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#example 17.11w\n",
      "#calculation of the distance between the two first order minima\n",
      "\n",
      "#given data\n",
      "b=.40*10.**-3.#width(in m) of the slit\n",
      "D=40.*10.**-2.#separation(in m) between the slit and the screen\n",
      "lambd=546.*10.**-9.#wavelength(in m) of the light used\n",
      "\n",
      "#calculation\n",
      "#linear distances from the central maxima are given by..x = D*tan(theta) = D*sin(theta) = +-lambda*D/b\n",
      "sep=2.*lambd*D/b#separation between the minima\n",
      "\n",
      "print '%s %.2f %s' %('the distance between the two first order minima is',sep*10**3,'mm')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance between the two first order minima is 1.09 mm\n"
       ]
      }
     ],
     "prompt_number": 17
    }
   ],
   "metadata": {}
  }
 ]
}