diff options
Diffstat (limited to 'Engineering_Physics/chapter3.ipynb')
-rwxr-xr-x | Engineering_Physics/chapter3.ipynb | 1365 |
1 files changed, 1365 insertions, 0 deletions
diff --git a/Engineering_Physics/chapter3.ipynb b/Engineering_Physics/chapter3.ipynb new file mode 100755 index 00000000..1c763114 --- /dev/null +++ b/Engineering_Physics/chapter3.ipynb @@ -0,0 +1,1365 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f8c5b92f0cb0a1787021af8dd46e58ab42d75991e4d7ba39c4a4693a16608b3e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3:DIFFRACTION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.1:pg-97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate angular width and linear width \n",
+ "lamda=6*10**-5\n",
+ "e=0.01 #width of slit in cm\n",
+ "#position of minima is given by\n",
+ "sintheta=lamda/e #sintheta=m*lamda/e ,where m=1,2,3,......\n",
+ "print \"sintheta=\",sintheta,\" m\"\n",
+ "#since theta is very small,so sintheta is approximately equal to theta\n",
+ "theta=sintheta\n",
+ "theta1=2*theta\n",
+ "print \"total angular width of central maximum is theta1=\",theta1,\" m radians \"\n",
+ "d=100 #distance in cm\n",
+ "Y=theta*d\n",
+ "Y1=2*Y\n",
+ "print \"linear width of central maximum on the screen is Y1=\",Y1,\" m cm\"\n",
+ "print \"values of m =1,2,3,............ gives the directions of first, second .............minima\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "sintheta= 0.006 m\n",
+ "total angular width of central maximum is theta1= 0.012 m radians \n",
+ "linear width of central maximum on the screen is Y1= 1.2 m cm\n",
+ "values of m =1,2,3,............ gives the directions of first, second .............minima\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.2:pg-97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength of light\n",
+ "#in a diffraction pattern due to single slit, minima is given by e*sintheta=m*lamda\n",
+ "#since theta is very small, sintheta is approximately equal to theta\n",
+ "#theta=Y/d\n",
+ "e=0.014 #width of slit in cm\n",
+ "d=200 #distance in cm\n",
+ "m=2 \n",
+ "Y=1.6 #in cm\n",
+ "lamda=Y*e/(d*m)\n",
+ "print \"wavelength of light is lamda=\",lamda,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of light is lamda= 5.6e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.3:pg-98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate width of slit\n",
+ "#direction of minima in fraunhofer diffraction due to single slit is given by math.pi/lamda*e*siuntheta=+m*math.pi,where m=1,2,3\n",
+ "#angular spread of the central maximum on either side of the incident light is sintheta=lamda/e,where m=1,position of first minima\n",
+ "lamda=5000*10**-8\n",
+ "e=lamda/math.sin(math.pi/6)\n",
+ "print \"width of slit is e=\",e,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "width of slit is e= 0.0001 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.4:pg-98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength of incident light\n",
+ "#direction of minima is given by e*sintheta=+m*lamda\n",
+ "#for first minima m=1,i.e. e*sintheta=lamda,sintheta is approximately equal to theta,then we can write it as e*theta=lamda ...........eq(1)\n",
+ "#theta=Y/d........................eq(2) \n",
+ "e=0.02 #in cm\n",
+ "Y=0.5 #position of first minima from the central maxima in cm\n",
+ "d=200 #distance of screen from the slit in cm\n",
+ "#from eq(1) and eq(2),we get\n",
+ "lamda=e*Y/d\n",
+ "print \"wavelength of incident light is lamda=\",lamda,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of incident light is lamda= 5e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.6:pg-99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate values of lamda1 and lamda2\n",
+ "#in fraunhofer diffraction pattern ,the direction of minima is given by e*sintheta=+m*lamda,where m=1,2,.......\n",
+ "#direction of fourth minima (m=4) for wavelength lamda1 is given by e*sintheta1=4*lamda1..........eq(1)\n",
+ "#similarly, e*sintheta2=5*lamda2..........eq(2)\n",
+ "#from eq(1) and eq(2),we get e*sintheta=4*lamda1=5*lamda2....eq(3)\n",
+ "y=0.5 #in cm\n",
+ "f=100 #in cm\n",
+ "theta=y/f #in radian\n",
+ "sintheta=theta #theta is very small\n",
+ "e=0.05 #width of slit in cm\n",
+ "lamda1=e*sintheta/4\n",
+ "print \"lamda1=\",lamda1,\"cm\"\n",
+ "#from eq(3) we get,\n",
+ "lamda2=4*lamda1/5\n",
+ "print \"lamda2=\",lamda2,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lamda1= 6.25e-05 cm\n",
+ "lamda2= 5e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.7:pg-100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate half angular width \n",
+ "e=1.2*10**-4 #width of slit in cm\n",
+ "y=6*10**-5 #wavelength of monochromatic light in cm\n",
+ "theta=y/e\n",
+ "print \"half angular width of central bright maxima is theta=\",theta,\"radian\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "half angular width of central bright maxima is theta= 0.5 radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.8:pg-100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate angle\n",
+ "lamda=6000.0*10**-8 #wavelength of light in cm\n",
+ "e=0.03 #width of slit in cm\n",
+ "#e*sintheta=m*lamda,where m=1\n",
+ "theta=math.degrees(math.asin(lamda/e)) \n",
+ "print \"angle at which the first dark band are formed in the fraunhofer diffraction pattern is theta=\",round(theta,4),\"degree\"\n",
+ "theta1=math.degrees(math.sin(3*lamda/(2*e)))\n",
+ "print \"angle at which the next bright band are formed in the fraunhofer diffraction pattern is theta1=\",round(theta1,4),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "angle at which the first dark band are formed in the fraunhofer diffraction pattern is theta= 0.1146 degree\n",
+ "angle at which the next bright band are formed in the fraunhofer diffraction pattern is theta1= 0.1719 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.9:pg-101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate distances of first dark band and of next bright band on either side of the central maximum\n",
+ "#formula is e*sintheta=m*lamda,where m=1\n",
+ "lamda=5890.0*10**-8 #wavelength of light in cm\n",
+ "e=0.03 #width of slit in cm\n",
+ "sintheta=lamda/e \n",
+ "theta=sintheta #becoz theta is very small,so sintheta is approximately equal to theta\n",
+ "f=50.0\n",
+ "y=f*theta\n",
+ "print \"linear distance of first minimum from the central maximum is y=\",y,\"cm\"\n",
+ "sintheta1=3*lamda/(2*e)\n",
+ "theta1=sintheta1\n",
+ "y1=f*theta1\n",
+ "print \"linear distance of first secondary maxima is y1=\",y1,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "linear distance of first minimum from the central maximum is y= 0.0981666666667 cm\n",
+ "linear distance of first secondary maxima is y1= 0.14725 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.10:pg-105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength of light and missing orders\n",
+ "omega=0.25 #fringe width in cm\n",
+ "D=170 #distance in cm\n",
+ "twod=0.04 # distance in cm\n",
+ "lamda=omega*twod/D\n",
+ "print \"wavelength of light is lamda=\",lamda,\"cm\"\n",
+ "e=0.08 #width of slit in mm\n",
+ "d=0.4 #in mm\n",
+ "m=1\n",
+ "n=m*(e+d)/e \n",
+ "print \"missing order is n=\",n,\"unitless\"\n",
+ "#we can also find order for m=2,3,....\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of light is lamda= 5.88235294118e-05 cm\n",
+ "missing order is n= 6.0 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.11:pg-112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate wavelength\n",
+ "n=2.0 #order of spectrum\n",
+ "theta=math.pi/6 #in radians\n",
+ "E=1.0/5000 #let (e+d)=E\n",
+ "lamda=E*math.sin(math.pi/6)/n\n",
+ "print \"the wavelength of the spectral line is lamda=\",lamda,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the wavelength of the spectral line is lamda= 5e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.12:pg-112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate difference in deviations \n",
+ "lamda=5*10**-5 #wavelength of light in cm\n",
+ "eplusd=1/6000.0 #where eplusd=e+d\n",
+ "theta1=math.degrees(math.asin(lamda/eplusd)) #for first order spectrum\n",
+ "theta3=math.degrees(math.asin(3*lamda/eplusd)) #for second order spectrum\n",
+ "difference=theta3-theta1\n",
+ "print \"difference in deviations in first and third order spectra is difference =\",round(difference,1),\"degree\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "difference in deviations in first and third order spectra is difference = 46.7 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.13:pg-112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate orders\n",
+ "#let E=(e+d) \n",
+ "#formula is (e+d)*sin thita=n*lamda\n",
+ "#for maximum order to be possible thita=90 degree\n",
+ "#sin theta=1\n",
+ "E=2.54/2620 #in cm\n",
+ "lamda=5*10**-5 #wavelength of the incident light in cm\n",
+ "n=E/lamda\n",
+ "print \"the orders will be visible is n=\",n,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the orders will be visible is n= 19.3893129771 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.14:pg-113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate number of lines in the grating\n",
+ "#theta1=theta2=30 degree\n",
+ "#sin theta1=sin theta2=1/2\n",
+ "lamda1=6*10**-5 \n",
+ " #wavelength in cm\n",
+ "lamda2=4.5*10**-5\n",
+ "#let (e+d)=E \n",
+ "#formula is (e+d)*sin theta1=n*lamda1----------eq(1)\n",
+ "#(e+d)*sin theta2=(n+1)*lamda2----------eq(2)\n",
+ "#we get,\n",
+ "n=lamda2/(lamda1-lamda2) #order of spectrum\n",
+ "E=n*lamda1/math.sin(math.pi/6)\n",
+ "number=1/E\n",
+ "print \"number of lines is number=\",number,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of lines is number= 2777.77777778 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.15:pg-113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate order when visible light of wavelength in the range 4000 to 7500 angstrom\n",
+ "#let E=(e+d)\n",
+ "E=1.0/4000 #in cm\n",
+ "lamda1=4*10**-5 \n",
+ " #wavelength in cm\n",
+ "lamda2=7.5*10**-5\n",
+ "n1=E*math.sin(math.pi/2)/lamda1\n",
+ "n2=E*math.sin(math.pi/2)/lamda2\n",
+ "print \"order when wavelength of 4000 angstrom is n1=\",n1,\"unitless\"\n",
+ "print \"order when wavelength of 7500 angstrom is n2=\",n2,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "order when wavelength of 4000 angstrom is n1= 6.25 unitless\n",
+ "order when wavelength of 7500 angstrom is n2= 3.33333333333 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.17:pg-114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate angle of diffraction \n",
+ "n=1 #order\n",
+ "lamda=5000*10**-8 #wavelength of light in cm\n",
+ "eplusd=1/5000.0 # in cm\n",
+ "theta=math.degrees(math.asin(n*lamda/(eplusd)))\n",
+ "minu=(theta-int(theta))*60 # minute\n",
+ "print \"angle of diffraction for maximum intensity in the first order is theta=\",int(theta),\"degree\",round(minu),\"minutes\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "angle of diffraction for maximum intensity in the first order is theta= 14 degree 29.0 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.18:pg-115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate number of lines in one centimeter of the grating\n",
+ "#let E=(e+d)\n",
+ "#formula for grating equation for principal maxima is (e+d)*sin theta=n*lamda\n",
+ "n=2 #order of spectrum\n",
+ "lamda=5*10**-5 #wavelength in cm\n",
+ "E=n*lamda/math.sin(math.pi/6)\n",
+ "number=1/E\n",
+ "print \"number of lines is number=\",number,\"unitless\"\n",
+ "#answer is given wrong in the book ,number of lines=1000\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of lines is number= 5000.0 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.19:pg-115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate which spectral line in 5th order will overlap with 4th order line of 5890 angstrom\n",
+ "#the grating equation for principal maxima is (e+d)*sin theta =n*lamda\n",
+ "n1=5 \n",
+ " #order of spectrum \n",
+ "n2=4\n",
+ "lamda2=5890*10**-8 #wavelength of 4th order spectrum in cm\n",
+ "#(e+d)*sin theta=5*lamda-------------eq(1)\n",
+ "#(e+d)*sin theta=4*5890*10**-8-----------------eq(2)\n",
+ "#from eq(1) and eq(2) ,we get\n",
+ "lamda1=n2*lamda2/n1\n",
+ "print \"wavelength of 5th order spectrum is lamda1=\",lamda1,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of 5th order spectrum is lamda1= 4.712e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.20:pg-115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate grating element\n",
+ "#grating equation for principal maxima is given by (e+d)*sintheta=n*lamda\n",
+ "#let nth order spectrum for yellow line (lamda=6000 angstrom) coincide with (n+1)th order spectrum for blue line (lamda=4800 angstrom) \n",
+ "#(e+d)*sintheta=n*6000*10**-8..eq(1)\n",
+ "#(e+d)*sintheta=(n+1)*4800*10**-8.....eq(2)\n",
+ "#from eq(1) and eq(2),we get n=4\n",
+ "n=4\n",
+ "lamda=6000*10**-8 #wavelength in cm\n",
+ "sintheta=3.0/4 \n",
+ "eplusd=n*lamda/sintheta\n",
+ "print \"grating element is eplusd=\",eplusd,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "grating element is eplusd= 0.00032 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.21:pg-116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate angle of diffraction for third order spectrum and absent spectra if any\n",
+ "n=3\n",
+ "lamda=6000*10**-8\n",
+ "eplusd=1/200.0\n",
+ "theta=math.degrees(math.asin(n*lamda/eplusd))\n",
+ "minu=(theta-int(theta))*60 # minute\n",
+ "print \"angle of refraction is theta=\",int(theta),\"degree\",round(minu),\"minutes\"\n",
+ "d=0.0025\n",
+ "e=eplusd-d #width of wire in cm\n",
+ "m=1\n",
+ "n=eplusd*m/e\n",
+ "print \"order of absent spectrum is n=\",n,\"unitless\"\n",
+ "print \"here,m=1 is considered because the higher values of m result the order of absent spectrum more than the given order 3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "angle of refraction is theta= 2 degree 4.0 minutes\n",
+ "order of absent spectrum is n= 2.0 unitless\n",
+ "here,m=1 is considered because the higher values of m result the order of absent spectrum more than the given order 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.22:pg-116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate difference in the two wavelengths\n",
+ "#grating equation for principal maxima is (e+d)*sintheta=n*lamda...............eq(1)\n",
+ "#differentiate both sides ,we get dtheta=n*dlamda/((e+d)*costheta)...........eq(2)\n",
+ "lamda=5000 #mean value of wavelengths in angstrom\n",
+ "cottheta=1.732 #cot30degree=1.732\n",
+ "dtheta=0.01 #in radian\n",
+ "#put the value of n from eq(2),we can write eq(2) \n",
+ "dlamda=lamda*dtheta*cottheta\n",
+ "print \"difference in two wavelengths is dlamda=\",dlamda,\"angstrom\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "difference in two wavelengths is dlamda= 86.6 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.23:pg-117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate dispersive power \n",
+ "#differentiate grating equation ,we get dtheta/dlamda=n/((e+d)*costheta)\n",
+ "n=2 #order \n",
+ "eplusd=1/4000.0\n",
+ "lamda=5000.0*10**-8 #wavelength in cm\n",
+ "sintheta=n*lamda/(eplusd)\n",
+ "costheta=math.sqrt(1-(sintheta)**2)\n",
+ "dtheta=n/((eplusd)*costheta) #where dispersive power dtheta/dlamda=dtheta\n",
+ "print \"dispersive power of grating in the second order spectrum is dtheta=\",int(dtheta),\"unitless\"\n",
+ "\n",
+ "# answer is slightly different due to approximation\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dispersive power of grating in the second order spectrum is dtheta= 8728 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.24:pg-117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate orders\n",
+ "eplusd=1/4000.0\n",
+ "lamda1=5*10.0**-5 #wavelengh in cm\n",
+ "lamda2=7.5*10**-5\n",
+ "nmax1=eplusd/lamda1\n",
+ "nmax2=eplusd/lamda2\n",
+ "print \"orders will be observed by a grating ,if it is illuminated by light of wavelength of 5000 angstrom is nmax1=\",nmax1,\"unitless \"\n",
+ "print \"orders will be observed ,if it is illuminated by light of wavelength of 7500 angstrom is nmax2=\",round(nmax2,1),\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "orders will be observed by a grating ,if it is illuminated by light of wavelength of 5000 angstrom is nmax1= 5.0 unitless \n",
+ "orders will be observed ,if it is illuminated by light of wavelength of 7500 angstrom is nmax2= 3.3 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.25:pg-118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate difference in wavelengths of two lines\n",
+ "#let E=(e+d)=1/5000\n",
+ "#we get\n",
+ "E=2*10**-4 #in cm\n",
+ "n=2 #order of spectrum\n",
+ "lamda=5893*10**-8 #wavelength in cm\n",
+ "#dtheta=2.5'=(2.5/60)*(3.14/180),we get\n",
+ "dtheta=7.27*10**-4 #in radian\n",
+ "dlamda=math.sqrt(((E/n)**2)-lamda**2)*dtheta\n",
+ "print \"the difference in wavelengths of two lines is dlamda=\",dlamda,\"cm\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the difference in wavelengths of two lines is dlamda= 5.87353693335e-08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.26:pg-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate aperture of the objective of a telescope\n",
+ "lamda=6*10**-5 #wavelength of light in cm\n",
+ "dtheta=4.88*10**-6 # in radians\n",
+ "a=1.22*lamda/dtheta\n",
+ "print \"the aperture of the objective of a telescope is a=\",a,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the aperture of the objective of a telescope is a= 15.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.27:pg-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate separation of two points on the moon\n",
+ "lamda=5.5*10**-5 #wavelength of light in cm\n",
+ "a=500 #diameter in cm\n",
+ "dtheta=1.22*lamda/a #limit of resolution of telescope in radians\n",
+ "R=3.8*10**8 #distance between earth and moon in m\n",
+ "X=R*dtheta\n",
+ "print \"the separation of two points on the moon is X=\",X,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the separation of two points on the moon is X= 50.996 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.28:pg-124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate numerical aperture of the objective\n",
+ "lamda=5.461*10**-5 #wavelength in cm\n",
+ "S=5.55*10**-5 #distance in cm\n",
+ "NA=1.22*lamda/(2*S)\n",
+ "print \"the numerical aperture of the objective is NA=\",NA,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the numerical aperture of the objective is NA= 0.600218018018 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.29:pg-124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate resolving power of microscope\n",
+ "NA=0.12 #numerical aperture\n",
+ "lamda=6*10**-5 #wavelength of light in cm\n",
+ "RP=2*NA/lamda #RP=resolving power\n",
+ "print \"the resolving power of microscope is RP=\",RP,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the resolving power of microscope is RP= 4000.0 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.30:pg-124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate maximum resolving power\n",
+ "lamda=5*10**-5 #wavelength of light in cm\n",
+ "N=40000 #total number of lines on grating\n",
+ "#(e+d)=12.5*10**-5 cm\n",
+ "#formula is nmax=(e+d)/lamda\n",
+ "#we get\n",
+ "nmax=2 #order of spectrum\n",
+ "RP=nmax*N #RP=resolving power\n",
+ "print \"the maximum resolving power is RP=\",RP,\"unitless\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the maximum resolving power is RP= 80000 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.31:pg-124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate minimum number of lines in a grating\n",
+ "lamda1=5890 \n",
+ " #wavelengh in angstrom\n",
+ "lamda2=5896\n",
+ "dlamda=6 #smallest wavelength difference in angstrom\n",
+ "n=2 #order of spectrum \n",
+ "lamda=(lamda1+lamda2)/2 #average wavelength in angstrom\n",
+ "RP=lamda/dlamda #RP=resolving power\n",
+ "N=RP/n\n",
+ "print \"minimum number of lines in a grating is N=\",N,\"unitless\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum number of lines in a grating is N= 491 unitless\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.32:pg-125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#will the telescope be able to observe the wiremesh\n",
+ "a=3 #aperture in cm\n",
+ "lamda=5.5*10**-5 #wavelength of light in cm\n",
+ "#limit of resolution of telescope is given by\n",
+ "theta=1.22*lamda/a\n",
+ "#alpha=spacing of wire-mesh/distance of objective from wire-mesh\n",
+ "alpha=0.2/(80*10**2)\n",
+ "print \"theta=\",theta,\"radian\"\n",
+ "print \"alpha=\",alpha,\"radian\"\n",
+ "print \"if alpha>theta then telescope will be able to observe the wire-mesh\"\n",
+ "#value of alpha is given wrong in the book 2.25*10**-5 radian\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theta= 2.23666666667e-05 radian\n",
+ "alpha= 2.5e-05 radian\n",
+ "if alpha>theta then telescope will be able to observe the wire-mesh\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.33:pg-125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#distance between the centres of images of two stars\n",
+ "lamda=5500*10**-8 #wavelength of light in cm\n",
+ "f=4*10**2 #focal length of telescope objective in cm\n",
+ "a=0.01*10**2 #diameter in cm\n",
+ "X=1.22*lamda*f/a\n",
+ "print \"distance between the centres of images of two stars is X=\",X,\"cm \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between the centres of images of two stars is X= 0.02684 cm \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.34:pg-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate diameter of a telescope \n",
+ "lamda=5.0*10**-5 #wavelength in cm\n",
+ "theta=(math.pi/180)*(1.0/1000) #in radians\n",
+ "a=1.22*lamda/theta\n",
+ "print \"the diameter of a telescope is a=\",a,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the diameter of a telescope is a= 3.4950425503 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.35:pg-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate smallest angle between two stars\n",
+ "lamda=5*10**-5 #wavelength in cm\n",
+ "a=100*2.54 #diameter in cm\n",
+ "theta=1.22*lamda/a\n",
+ "print \"the smallest angle between two stars is thita=\",theta,\"radians\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the smallest angle between two stars is thita= 2.40157480315e-07 radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.36:pg-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate limit of resolution of the telescope\n",
+ "lamda=5890*10**-8 #wavelength in cm\n",
+ "a=1 #diameter in cm\n",
+ "theta=1.22*lamda/a\n",
+ "print \"the limit of resolution of the telescope is theta=\",theta,\"radians \"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the limit of resolution of the telescope is theta= 7.1858e-05 radians \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.37:pg-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate resolving limit of microscope\n",
+ "lamda=5.5*10**-5 #wavelengh in cm\n",
+ "theta=math.pi/6 #in radians\n",
+ "s=1.22*lamda/(2*math.sin(math.pi/6))\n",
+ "print \"resolving limit of microscope is s=\",s,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resolving limit of microscope is s= 6.71e-05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.38:pg-127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate resolving power of grating \n",
+ "N=15000 #total number of lines on grating\n",
+ "lamda=6*10**-5 #wavelength in cm\n",
+ "n=2 #order of spectrum\n",
+ "RP=n*N\n",
+ "print \"resolving power is RP =\",RP,\"unitless\"\n",
+ "#to calculate smallest wavelength difference that can be resolved with a light of wavelength 6000angstrom in the second order\n",
+ "dlamda=lamda/(n*N)\n",
+ "print \"smallest wavelength difference dlamda=\",dlamda,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resolving power is RP = 30000 unitless\n",
+ "smallest wavelength difference dlamda= 2e-09 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.39:pg-127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#to calculate resolving power in the second order\n",
+ "N=6*10**4 #N=total number of lines on grating\n",
+ "n=2 #order of spectrum\n",
+ "RP=n*N #RP=resoling power\n",
+ "print \"the resolving power is RP=\",RP,\"unitless\"\n",
+ "#to calculate smallest wavelength\n",
+ "lamda=6000*10**-8 #wavelength in cm\n",
+ "n=3 #order of spectrum\n",
+ "dlamda=lamda/(n*N)\n",
+ "print \"smallest wavelength that can be resolved in the third order in 6000angstrom wavelength region is dlamda=\",dlamda,\"cm\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the resolving power is RP= 120000 unitless\n",
+ "smallest wavelength that can be resolved in the third order in 6000angstrom wavelength region is dlamda= 3.33333333333e-10 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |