summaryrefslogtreecommitdiff
path: root/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-09-04 22:04:10 +0530
committerThomas Stephen Lee2015-09-04 22:04:10 +0530
commit41f1f72e9502f5c3de6ca16b303803dfcf1df594 (patch)
treef4bf726a3e3ce5d7d9ee3781cbacfe3116115a2c /Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb
parent9c9779ba21b9bedde88e1e8216f9e3b4f8650b0e (diff)
downloadPython-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.gz
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.bz2
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.zip
add/remove/update books
Diffstat (limited to 'Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb')
-rwxr-xr-xApplied_Physics-II_by_I_A_Shaikh/chapter1.ipynb1353
1 files changed, 1353 insertions, 0 deletions
diff --git a/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb
new file mode 100755
index 00000000..c4b1a860
--- /dev/null
+++ b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb
@@ -0,0 +1,1353 @@
+{
+ "metadata": {
+ "celltoolbar": "Raw Cell Format",
+ "name": "",
+ "signature": "sha256:fad8e22fb99cc3e157ab8315172e2ff6ddae35bb6f49be764a49d2d1d3f70fcc"
+ },
+ "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 number 1-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "i=45*math.pi/180 #angle of incidence\n",
+ "u=1.33 #Refractive index of a soap film\n",
+ "lamda=5.896*10**-7 #wavelength of required yellow light\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=math.asin(math.sin(i)/u) #angle of reflection\n",
+ "\n",
+ "#Now, condition for bright fringe is\n",
+ "#2ut*cos r=(2n-1)lamda/2\n",
+ "#Here n=1\n",
+ "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film at which light will appear bright yellow\n",
+ "print\"Minimum thickness of film at which light will appear bright yellow of required wavelength is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum thickness of film at which light will appear bright yellow of required wavelength is = 1.30853030399e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page number 1-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "theta=40./3600*math.pi/180 #angle of wedge in radians\n",
+ "B=0.12*10**-2 #fringe spacing\n",
+ "\n",
+ "#Calculations:\n",
+ "#We know, B=lam/(2*u*theta). Here u=1\n",
+ "lamda=2*B*theta #wavelength of light used\n",
+ "print\"Wavelength of light used is =\",lamda,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light used is = 4.65421133865e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page number 1-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "i=30*math.pi/180 #angle of incidence\n",
+ "u=1.46 #Refractive index of a oil\n",
+ "lamda=5.890*10**-7 #wavelength of required yellow light\n",
+ "n=8 #eighth dark band\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=math.asin(math.sin(i)/u) #angle of reflection\n",
+ "\n",
+ "#Now, condition for dark fringe is\n",
+ "#2ut*cos r=n*lamda\n",
+ "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n",
+ "print\"Thickness of the film is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film is = 1.71755887917e-06 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page number 1-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "\n",
+ "B=0.1*10**-2 #fringe spacing\n",
+ "lamda=5.893*10**-7 #Wavelength of light\n",
+ "u=1.52 #Refractive index of wedge\n",
+ "\n",
+ "#Calculations:\n",
+ "#We know, B=lamda/(2*u*theta). Here u=1\n",
+ "theta1=lamda/(2*u*B) #angle of wedge in radians\n",
+ "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n",
+ "print\"Angle of wedge is =\",theta,\"seconds of an arc\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of wedge is = 39.9841612899 seconds of an arc\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page number 1-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "t=0.2/(100)**2*10**-2 #thickness of film in meter\n",
+ "lamda=5.5*10**-7 #wavelength of light in meter\n",
+ "r=0 #normal incidence\n",
+ "n=1 #first band\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#Condition for dark fringe is\n",
+ "#2ut*cos r =n*lamda\n",
+ "u=n*lamda/(2*t*math.cos(r)) #Refractive index of a oil\n",
+ "print\"Refractive index of a oil is =\",u\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of a oil is = 1.375\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page number 1-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "lamda=5.893*10**-7 #Wavelength of light\n",
+ "u=1.42 #Refractive index of a soap film\n",
+ "r=0 #normal incidence\n",
+ "n=1 #first band\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#(i)\n",
+ "#Condition for dark fringe is\n",
+ "#2ut*cos r=n*lamda\n",
+ "t1=n*lamda/(2*u*cos(r)) #thickness of film for dark black fringe\n",
+ "print\"Thickness of the film for dark black fringe is =\",t1,\"m\"\n",
+ "\n",
+ "#(ii)\n",
+ "#Now, condition for bright fringe is\n",
+ "#2ut*cos r=(2n-1)lamda/2\n",
+ "t2=lamda/(2*2*u*math.cos(r)) #Thickness of film for bright fringe\n",
+ "print\"Thickness of film for bright fringe is =\",t2,\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film for dark black fringe is = 2.075e-07 m\n",
+ "Thickness of film for bright fringe is = 1.0375e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7, Page number 1-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#Given Data:\n",
+ "i=30*math.pi/180 #angle of incidence\n",
+ "u=1.43 #Refractive index of a soap film\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "n=1 #For minimum thickness\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=(math.asin(math.sin(i)/u)) #angle of reflection\n",
+ "\n",
+ "#Now, condition of minima in transmitted system is\n",
+ "#2ut*cos(r)=(2n-1)lamda/2\n",
+ "t=lamda/(2*2*u*math.cos(r)) #minimum thickness of film\n",
+ "print\"Minimum thickness of film is \",t,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum thickness of film is 1.11962124395e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8, Page number 1-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "\n",
+ "lamda = 5893*10**-10 #Wavelength of light\n",
+ "theta = 1 #assuming value of theta\n",
+ "\n",
+ "#We know, B=lamda/(2*u*theta). Here u=1\n",
+ "B = lamda/(2*theta) #fringe spacing\n",
+ "n=20 #interference fringes\n",
+ "\n",
+ "#Calculations:\n",
+ "#t=n*B*tan(theta)\n",
+ "t = 20*B*theta #Thickness of wire\n",
+ "print\"Thickness of wire is =\",t,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of wire is = 5.893e-06 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page number 1-20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "u1=1.3 #Refractive index of oil\n",
+ "u2=1.5 #Refractive index of glass\n",
+ "lamda1=7*10**-7 #Wavelength of light\n",
+ "lamda2=5*10**-7 #Wavelength of light\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#for finding value of n, solve:\n",
+ "#(2n+1)*lamda1/2=(2(n+1)+1)*lamda2/2\n",
+ "#We get,n=2\n",
+ "n=2\n",
+ "\n",
+ "toil=(2*n+1)*lamda1/(2*u1*2) #thickness of oil layer\n",
+ "print\"Thickness of oil layer is =\",toil,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of oil layer is = 6.73076923077e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Example 1.10, Page number 1-21"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "u1=1.2 #Refractive index of drop of oil\n",
+ "u2=1.33 #Refractive index of water\n",
+ "lamda=4.8*10**-7 #wavelength of light\n",
+ "n=3 #order\n",
+ "r=0 #normal incidence,so r=0\n",
+ "\n",
+ "#Calculations:\n",
+ "t=n*lamda/(2*u1) #Thickness of oil drop\n",
+ "print\"Thickness of oil drop is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of oil drop is = 6e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11, Page number 1-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "i=math.asin(4/5) #angle of incidence\n",
+ "u=4/3 #Refractive index of a soap film\n",
+ "lamda1=6.1*10**-7 #wavelength of light\n",
+ "lamda2=6*10**-7 #wavelength of light\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=math.asin(math.sin(i)/u) #angle of reflection\n",
+ "\n",
+ "#Now, condition for dark band is\n",
+ "#2ut*cos r=n*lamda\n",
+ "#for consecutive bands, n=lamda2/(lamda1-lamda2). hence\n",
+ "\n",
+ "t=lamda2*lamda1/((lamda1-lamda2)*2*u*math.sqrt(1-(math.sin(i)/u)**2)) #thickness of film\n",
+ "print\"Thickness of the film is =\",t,\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film is = 1.83e-05 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.12, Page number 1-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "n=10 #10th dark ring\n",
+ "Dn=0.5*10**-2 #Diameter of ring\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "\n",
+ "#Calculations:\n",
+ "#As Dn^2=4*n*R*lamda\n",
+ "R=Dn**2/(4*n*lamda) #Radius of curvature of the lens\n",
+ "print\"Radius of curvature of the lens is =\",R,\"m\"\n",
+ "\n",
+ "t=Dn**2/(8*R) #thickness of air film\n",
+ "print\"Thickness of air film is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature of the lens is = 1.04166666667 m\n",
+ "Thickness of air film is = 3e-06 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.13, Page number 1-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "\n",
+ "B=0.25*10**-2 #fringe spacing\n",
+ "lamda=5.5*10**-7 #Wavelength of light\n",
+ "u=1.4 #Refractive index of wedge\n",
+ "\n",
+ "#Calculations:\n",
+ "#We know, B=lamda/(2*u*theta).\n",
+ "theta1=lamda/(2*u*B) #angle of wedge in radians\n",
+ "theta=theta1*3600*180/math.pi #angle of wedge in seconds\n",
+ "print\"Angle of wedge is =\",theta,\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of wedge is = 16.2065204908 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.14, Page number 1-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "n=4 #4th dark ring\n",
+ "m=12 #m=n+p\n",
+ "D4=0.4*10**-2 #Diameter of 4th ring\n",
+ "D12=0.7*10**-2 #Diameter of 12th ring\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#(Dn+p)^2-Dn^2=4*p*lamda*R\n",
+ "#Solving, (D12^2-D4^2)/(D20^2-D4^2)\n",
+ "#We get above value =1/2. Hence\n",
+ "D20=math.sqrt(2*D12**2-D4**2) #Diameter of 20th ring\n",
+ "print\"Diameter of 20th ring is =\",D20,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of 20th ring is = 0.00905538513814 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.15, Page number 1-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "n=6 #6th bright ring\n",
+ "D6=0.31*10**-2 #Diameter of 6th ring\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "R=1 #Radius of curvature\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#Diameter of nth bright ring is \n",
+ "#Dn^2=2(2n-1)*lamda*R/u. Hence\n",
+ "u=2*(2*n-1)*lamda*R/(D6)**2 #Refractive index of liquid\n",
+ "print\"Refractive index of liquid is =\",u\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid is = 1.37356919875\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.16, Page number 1-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "k=0.125*10**-4 #k=D(n+1)^2-Dn^2.\n",
+ "u=1 #Refractive index of medium between lens and plate\n",
+ "#Calculations:\n",
+ "\n",
+ "#(i)\n",
+ "lamda1=4.5*10**-7 #new wavelength of light\n",
+ "#Difference between squres of diameters of successive rings is directly proportional to wavelength.So,\n",
+ "k1=lamda1/lamda*k #new Difference between squres of diameters of successive rings after changing wavelength\n",
+ "print\"New Difference between squres of diameters of successive rings after changing wavelength is =\",k1,\"m^2\"\n",
+ "\n",
+ "#(ii)\n",
+ "u2=1.33 #Refractive index of liquid introduced between lens and plate\n",
+ "#Difference between squres of diameters of successive rings is inversely proportional to Refractive index.so,\n",
+ "k2=u/u2*k #new Difference between squres of diameters of successive rings after changing refractive index\n",
+ "print\"New Difference between squres of diameters of successive rings after changing refrective index is =\",k2,\"m^2\"\n",
+ "\n",
+ "#(iii)\n",
+ "#Difference between squres of diameters of successive rings is directly proportional to Radius of curvature.So,\n",
+ "#after doubling radius of curvature,\n",
+ "k3=2*k #new Difference between squres of diameters of successive rings after doubling radius of curvature\n",
+ "print\"New Difference between squres of diameters of successive rings after doubling radius of curvature is =\",k3,\"m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "New Difference between squres of diameters of successive rings after changing wavelength is = 9.375e-06 m^2\n",
+ "New Difference between squres of diameters of successive rings after changing refrective index is = 9.3984962406e-06 m^2\n",
+ "New Difference between squres of diameters of successive rings after doubling radius of curvature is = 2.5e-05 m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.17, Page number 1-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "Dn=0.225*10**-2 #Diameter of nth ring\n",
+ "Dm=0.45*10**-2 #Diameter of (n+9)th ring\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "R=0.9 #Radius of curvature\n",
+ "p=9\n",
+ "\n",
+ "#Calculations:\n",
+ "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n",
+ "u=4*p*lamda*R/((Dm)**2-Dn**2) #Refractive index of liquid\n",
+ "print\"Refractive index of liquid is =\",u\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index of liquid is = 1.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.18, Page number 1-44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "D10=0.5*10**-2 #Diameter of 10th ring\n",
+ "lamda=5.5*10**-7 #wavelength of light\n",
+ "u=1.25 #Refractive index of liquid\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "#As Dn^2=4*n*R*lamda/u\n",
+ "#Dn^2 is inversely proportional to refractive index.\n",
+ "D10n=D10/math.sqrt(u) #new diameter of 10th ring after changing medium between lens and plate\n",
+ "print\"new diameter of 10th ring after changing medium between lens and plate is =\",D10n,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "new diameter of 10th ring after changing medium between lens and plate is = 0.004472135955 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.19, Page number 1-45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "D5=0.336*10**-2 #Diameter of 5th ring\n",
+ "D15=0.59*10**-2 #Diameter of 15th ring\n",
+ "lamda=5.89*10**-7 #wavelength of light\n",
+ "p=10 #n=5,n+p=15\n",
+ "\n",
+ "#Calculations:\n",
+ "#(Dn+p)^2-Dn^2=4*p*lamdaR/u\n",
+ "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n",
+ "print\"Radius of curvature of the lens is =\",R,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature of the lens is = 0.998319185059 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20, Page number 1-45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "n=10 #10th dark ring\n",
+ "D10=0.6*10**-2 #Diameter of ring\n",
+ "lamda=6*10**-7 #wavelength of light\n",
+ "u=4./3 #Refractive index of water\n",
+ "\n",
+ "\n",
+ "#Calculations:\n",
+ "#As Dn^2=4*n*R*lamda/u\n",
+ "R=(D10**2)*u/(4*n*lamda) #Radius of curvature of the lens\n",
+ "print\"Radius of curvature of the lens is =\",R,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature of the lens is = 2.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20.1, Page number 1-52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "i=45*math.pi/180 #angle of incidence\n",
+ "u=1.2 #Refractive index of a film\n",
+ "t=4*10**-7 #thickness of film\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=math.asin(math.sin(i)/u) #angle of reflection\n",
+ "\n",
+ "#Now, condition for dark fringe is\n",
+ "#2ut*cos r=n*lamda\n",
+ "lamda1=2*u*t*math.cos(r)/1 #n=1\n",
+ "print\"For n=1 wavelength is =\",lamda1,\"m\"\n",
+ "print\"This is in the visible spectrum and it will remain absent.\" \n",
+ "\n",
+ "lamda2=2*u*t*math.cos(r)/2 #n=2\n",
+ "print\"For n=2 wavelength is =\",lamda2,\"m\"\n",
+ "print\"This is not in the visible spectrum\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For n=1 wavelength is = 7.75628777187e-07 m\n",
+ "This is in the visible spectrum and it will remain absent.\n",
+ "For n=2 wavelength is = 3.87814388593e-07 m\n",
+ "This is not in the visible spectrum\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20.2, Page number 1-53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "r=45*math.pi/180 #angle of refraction\n",
+ "u=1.45 #Refractive index of a medium\n",
+ "lamda=5.5*10**-7 #wavelength of required yellow light\n",
+ "n=1\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#Now, condition for dark fringe is\n",
+ "#2ut*cos r=n*lamda\n",
+ "t=n*lamda/(2*u*math.cos(r)) #thickness of thin medium\n",
+ "print\"Thickness of the thin medium is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the thin medium is = 2.68212917002e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.21, Page number 1-45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "u=1.33 #Refractive index of a soap film\n",
+ "r=0 #normal incidence\n",
+ "t=5*10**-7 #thickness of film\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#Now, condition for maxima is\n",
+ "#2ut*cos r=(2n-1)lamda/2\n",
+ "lamda1=4*u*t*math.cos(r)/(2*1-1) #n=1\n",
+ "print\"For n=1 wavelength is =\",lamda1,\"m\"\n",
+ "lamda2=4*u*t*math.cos(r)/(2*2-1) #n=2\n",
+ "print\"For n=2 wavelength is =\",lamda2,\"m\"\n",
+ "lamda3=4*u*t*math.cos(r)/(2*3-1) #n=3\n",
+ "print\"For n=3 wavelength is =\",lamda3,\"m\"\n",
+ "lamda4=4*u*t*math.cos(r)/(2*4-1) #n=4\n",
+ "print\"For n=4 wavelength is =\",lamda4,\"m\"\n",
+ "\n",
+ "print\"Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\"\n",
+ "print\"Hence, wavelength for n=3 is the most reflected wavelength.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For n=1 wavelength is = 2.66e-06 m\n",
+ "For n=2 wavelength is = 8.86666666667e-07 m\n",
+ "For n=3 wavelength is = 5.32e-07 m\n",
+ "For n=4 wavelength is = 3.8e-07 m\n",
+ "Out of these wavelengths wavelength for n=3 lies in the visible spectrum.\n",
+ "Hence, wavelength for n=3 is the most reflected wavelength.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.22, Page number 1-46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "u=1.5 #Refractive index of a oil\n",
+ "lamda=5.88*10**-7 #wavelength of required yellow light\n",
+ "n=1 #for smallest thickness\n",
+ "r=60*math.pi/180 #angle of reflection\n",
+ "\n",
+ "#Calculations:\n",
+ "\n",
+ "#Now, condition for dark fringe is\n",
+ "#2ut*cos r=n*lamda\n",
+ "t=n*lamda/(2*u*math.cos(r)) #thickness of film\n",
+ "print\"Thickness of the film is =\",t,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of the film is = 3.92e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.23, Page number 1-46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "theta=20./3600*math.pi/180 #angle of wedge in radians\n",
+ "B=0.25*10**-2 #fringe spacing\n",
+ "u=1.4 #Refractive index of film\n",
+ "\n",
+ "#Calculations:\n",
+ "#We know, B=lamda/(2*u*theta).\n",
+ "lamda=2*B*theta*u #wavelength of light\n",
+ "print\"Wavelength of light is =\",lamda,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light is = 6.78739153553e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.24, Page number 1-47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "#Dn=2*D40\n",
+ "\n",
+ "#Calculations:\n",
+ "#As Dn^2 = 4*n*R*lamda/u and Dn^2 = 4*D40^2\n",
+ "#i.e. 4*n*R*lamda/u = 4*4*40*R*lamda/u .hence,\n",
+ "n=4*40 #order of the required ring\n",
+ "print\"Order of the dark ring which will have double the diameter of that of 40th ring is =\",n\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Order of the dark ring which will have double the diameter of that of 40th ring is = 160\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.25, Page number 1-47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "lamda1=6*10**-7 #wavelength of light\n",
+ "lamda2=4.5*10**-7 #wavelength of light\n",
+ "R=0.9 #Radius of curvature\n",
+ "\n",
+ "#Calculations:\n",
+ "#As Dn^2=4*n*R*lamda.\n",
+ "#Dn^2=D(n+1)^2 for different wavelengths.we get,\n",
+ "n=lamda2/(lamda1-lamda2) #nth dark ring due to lam1 which coincides with (n+1)th dark ring due lamda2\n",
+ "D3=math.sqrt(4*n*R*lamda1) #diameter of 3rd dark ring for lamda1\n",
+ "print\"Diameter of 3rd dark ring for lam1 is =\",D3,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of 3rd dark ring for lam1 is = 0.00254558441227 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.26, Page number 1-48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "i=45*math.pi/180 #angle of incidence\n",
+ "u=4./3 #Refractive index of soap film\n",
+ "lamda=5*10**-7 #wavelength of light\n",
+ "t=1.5*10**-6 #thickness of film\n",
+ "\n",
+ "#Calculations:\n",
+ "#u=sin i/sin r #Snell's law .So,\n",
+ "r=math.asin(math.sin(i)/u) #angle of reflection\n",
+ "\n",
+ "#Now, condition for dark band is\n",
+ "#2ut*cos r=n*lamda\n",
+ "n=2*u*t*math.cos(r)/lamda #order of band\n",
+ "print\"order of dark band is =\",n\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "order of dark band is = 6.78232998313\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.27, Page number 1-49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "D5=0.336*10**-2 #Diameter of 5th ring\n",
+ "D15=0.59*10**-2 #Diameter of 15th ring\n",
+ "lamda=5.89*10**-7 #wavelength of light\n",
+ "p=10 #n=5,n+p=15\n",
+ "\n",
+ "#Calculations:\n",
+ "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n",
+ "R=((D15)**2-D5**2)/(4*p*lamda) #Radius of curvature of the lens\n",
+ "print\"Radius of curvature of the lens is =\",R,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of curvature of the lens is = 0.998319185059 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.29, Page number 1-50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#As Dn^2=4*n*R*lamda.\n",
+ "#thus, Dn is directly proportional to sqaure root of n\n",
+ "D5=math.sqrt(5) #D5 is directly proportional to sqaure root of 5\n",
+ "D4=math.sqrt(4) #D4 is directly proportional to sqaure root of 4\n",
+ "k1=D5-D4\n",
+ "print\"Separation between D5 and D4 is directly proportional to =\",k1\n",
+ "\n",
+ "D80=math.sqrt(80) #D80 is directly proportional to sqaure root of 80\n",
+ "D79=math.sqrt(79) #D79 is directly proportional to sqaure root of 79\n",
+ "k2=D80-D79\n",
+ "print\"Separation between D80 and D79 is directly proportional to =\",k2\n",
+ "\n",
+ "print\"Thus, (D80-D79) < (D5-D4). Hence proved.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Separation between D5 and D4 is directly proportional to = 0.2360679775\n",
+ "Separation between D80 and D79 is directly proportional to = 0.0560774926836\n",
+ "Thus, (D80-D79) < (D5-D4). Hence proved.\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.30, Page number 1-51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given Data:\n",
+ "D5=0.336*10**-2 #Diameter of 5th ring\n",
+ "D15=0.59*10**-2 #Diameter of 15th ring\n",
+ "p=10 #n=5,n+p=15\n",
+ "R=1 #Radius of curvature\n",
+ "\n",
+ "#Calculations:\n",
+ "#(Dn+p)^2-Dn^2=4*p*lamda*R/u\n",
+ "lamda=((D15)**2-D5**2)/(4*p*R) #Wavelength of light\n",
+ "print\"Wavelength of light is =\",lamda,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of light is = 5.8801e-07 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.31, Page number 1-51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#Condition for bright band is\n",
+ "#2ut*cos r = (2n-1)*lamda1\n",
+ "\n",
+ "#for consecutive bands, 2n=(lamda1+lamda2)/(lamda1-lamda).\n",
+ "#thus, 2ut*cos r = lamda2*lamda1/(lamda1-lamda2)\n",
+ "\n",
+ "#And, thicknessof film \n",
+ "#t= lamda2*lamda1/((2*u*cosr)(lamda1-lamda2))\n",
+ "print\"Hence expression for thickness of film is obtained.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence expression for thickness of film is obtained.\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file