{
 "metadata": {
  "name": "",
  "signature": "sha256:e9b50f0b4ca0520935774156fedb1fdaaf2b2fd5241b8184a650d42b25d657cd"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "4: Interference"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.1, Page number 69"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "i=40;                                    #angle of incidence(degrees)\n",
      "mew=1.2;                                #refractive index\n",
      "t=0.23;                                #thickness of the film(micro m)\n",
      "\n",
      "#Calculation\n",
      "i=i*math.pi/180;                     #angle of incidence(radian)\n",
      "r=math.asin(math.sin(i)/mew);        #angle of refraction(radian)\n",
      "lambda1=(2*mew*t*math.cos(r))*10**3;      #wavelength absent(nm) \n",
      "lambda2=lambda1/2;\n",
      "\n",
      "#Result\n",
      "print \"The wavelength absent is\",round(lambda1,1),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength absent is 466.1 nm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.2, Page number 69"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lambda1=400*10**-9;                #wavelength 1(m)\n",
      "lambda2=600*10**-9;                #wavelength 2(m)\n",
      "#2*t=n*lambda\n",
      "n=150;    \n",
      "\n",
      "#Calculation                        \n",
      "t=((n*lambda2)/2)*10**6;     #thickness of the air film(micro meter)\n",
      "\n",
      "#Result\n",
      "print \"The thickness of the air film is\",t,\"micro m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thickness of the air film is 45.0 micro m\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.3, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=600*10**-9;     #wavelength(m)\n",
      "mew=2;\n",
      "theta=0.025;      #wedge-angle(degrees)\n",
      "\n",
      "#Calculation                        \n",
      "theta=theta*math.pi/180;      #wedge-angle(radian)\n",
      "x=(lamda/(2*mew*math.sin(theta)))*10**2;       #bandwidth(cm)\n",
      "\n",
      "#Result\n",
      "print \"The bandwidth is\",round(x,3),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The bandwidth is 0.034 cm\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.4, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "xair=0.15;                     #bandwidth of air(cm)\n",
      "xliq=0.115;                    #bandwidth of liquid(cm)\n",
      "mewair=1;                      #refractive index of air\n",
      "\n",
      "#Calculation                        \n",
      "mewliq=(xair*mewair)/xliq;      #refractive index of liquid\n",
      "\n",
      "#Result\n",
      "print \"The refractive index of liquid is\",round(mewliq,1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The refractive index of liquid is 1.3\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.5, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=9;\n",
      "lamda=589*10**-9;                   #wavelength of light used(m)\n",
      "R=0.95;                             #radius of curvature of lens(m)\n",
      "mew=1;\n",
      "\n",
      "#Calculation                        \n",
      "D=(math.sqrt((4*n*lamda*R)/mew))*10**2;   #diameter of the ninth dark ring(m)\n",
      "\n",
      "#Result\n",
      "print \"The diameter of the ninth dark ring is\",round(D,2),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The diameter of the ninth dark ring is 0.45 cm\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.6, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "x=0.055;                       #distance in fringe shift(mm)\n",
      "n=200;                         #number of fringes\n",
      "\n",
      "#Calculation                        \n",
      "lamda=((2*x)/n)*10**6;          #wavelength(nm)\n",
      "\n",
      "#Result\n",
      "print \"The wavelength of light used is\",lamda,\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength of light used is 550.0 nm\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.7, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=50;                             #number of fringes\n",
      "lamda=500*10**-9;                 #wavelength of light used(m)\n",
      "mew=1.5;                          #refractive index of the plate\n",
      "\n",
      "#Calculation                        \n",
      "t=((n*lamda)/(2*(mew-1)))*10**6;    #thickness of the plate(micro meter)\n",
      "\n",
      "#Result\n",
      "print \"The thickness of the plate is\",t,\"micro m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thickness of the plate is 25.0 micro m\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.8, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=550*10**-9;                   #wavelength(m)\n",
      "mew=1.38;                            #refractive index\n",
      "\n",
      "#Calculation                        \n",
      "t=(lamda/(4*mew))*10**9;              #thickness(nm)\n",
      "\n",
      "#Result\n",
      "print \"The minimum thickness of the plate for normal incidence of light is\",round(t,3),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum thickness of the plate for normal incidence of light is 99.638 nm\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.9, Page number 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "i=35;                                         #angle of incidence(degrees)\n",
      "mew=1.4;                                      #refractive index\n",
      "n=50;                                        \n",
      "lamda=459*10**-9;       #wavelength(m)\n",
      "\n",
      "#Calculation                        \n",
      "i=i*math.pi/180;                     #angle of incidence(radian)\n",
      "r=math.asin(math.sin(i)/mew);        #angle of refraction(radian)\n",
      "#2*mew*cos(r)=n*lambda\n",
      "#n(459)=(n+1)450\n",
      "t=(n*lamda/(2*mew*math.cos(r)))*10**6;          #thickness of the film(micro meter)\n",
      "\n",
      "#Result\n",
      "print \"The thickness of the film is\",round(t,3),\"micro m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thickness of the film is 8.985 micro m\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.10, Page number 71"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=500*10**-9;                      #wavelength(m)\n",
      "x=0.07;                                 #observed band width(cm)\n",
      "mew=1;                                  #refractive index\n",
      "\n",
      "#Calculation                        \n",
      "theta=(math.asin(lamda/(2*mew*x)))*10**2;     #wedge angle(radian)\n",
      "theta=theta*180/math.pi;     #wedge angle(degrees)\n",
      "\n",
      "#Result\n",
      "print \"The wedge angle is\",round(theta,2),\"degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wedge angle is 0.02 degrees\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.11, Page number 71"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "dair=0.42;                   #diameter of certain rings(cm)\n",
      "dliq=0.38;                   #diameter of rings when liquid is introduced(cm)\n",
      "\n",
      "#Calculation                        \n",
      "mew=dair**2/dliq**2;            #refractive index of liquid\n",
      "\n",
      "#Result\n",
      "print \"The refravtive index of liquid is\",round(mew,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The refravtive index of liquid is 1.22\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.12, Page number 71"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "m=8;                                           #eigth ring\n",
      "n=3;                                           #third ring\n",
      "dm=0.4;                                        #diameter of the eigth ring(cm)\n",
      "dn=0.2;                                        #diameter of the third ring(cm)\n",
      "R=101;                                         #Radius of curvature(cm)\n",
      "\n",
      "#Calculation                        \n",
      "lamda=(((dm**2)-(dn**2))/(4*R*(m-n)));      #wavelength of light(cm) \n",
      "\n",
      "#Result\n",
      "print \"The wavelength of light used is\",round(lamda*10**5,4),\"*10**-5 cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength of light used is 5.9406 *10**-5 cm\n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.13, Page number 71"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "mew=1.38;             #refractive index of magnesium floride\n",
      "t=175;                #thickness of coating of magnesium fluoride(nm)\n",
      "\n",
      "#Calculation                        \n",
      "lamda=4*t*mew;        #wavelength(nm)\n",
      "\n",
      "#Result\n",
      "print \"The wavelength which has high transmission is\",lamda,\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength which has high transmission is 966.0 nm\n"
       ]
      }
     ],
     "prompt_number": 41
    }
   ],
   "metadata": {}
  }
 ]
}