import math
#Variable declaration
i = 45 #angle of incidence(degrees)
t = 4*10**-5 #thickness of film(cm)
u = 1.2
#Calculations & Result
r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))
for n in range(1,4):
lamda = (2*u*t*math.cos(r*math.pi/180))/n
print "For n = %d, wavelength = %.2f A"%(n,lamda/10**-8)
print "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range"
import math
#Variable declaration
r = 90 #angle of refraction(degrees)
t = 5*10**-5 #thickness of film(cm)
u = 1.33
#Calculations & Result
for n in range(1,4):
lamda = (4*u*t*int(math.cos(math.radians(90))))/((2*n)-1)
print "For n = %d, wavelength = %.2f A"%(n,lamda)
print "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range"
print "\nPlease note: Since r=90, cos(r)=0\nHence, the answers given in the textbook are incorrect"
import math
#Variable declaration
i = 45 #angle of incidence(degrees)
t = 1.5*10**-4 #thickness of film(cm)
lamda = 5*10**-5 #wavelength(cm)
u = 4./3. #refractive index
#Calculations
r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))
n = (2*u*t*math.cos(r*math.pi/180))/lamda
#Result
print "The order of interfernce is %.2f, close to 7"%n
import math
#Variable declaration
i = 45 #angle of incidence(degrees)
lamda = 5896*10**-8 #wavelength(cm)
u = 1.33 #refractive index
n = 1
#Calculations
r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))
t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)
#Result
print "The required thickness is",round((t/1E-5),2),"*10^-5 cm"
lamda1 = 7000 #wavelength(A)
lamda2 = 5000 #wavelength(A)
u = 1.3 #R.I. of oil
#Calculations
'''
2utcosr = (2n-1)7000/2 ----(1)
2utcosr = (2n+1)5000/2 ----(2)
Divinding (1) by (2), we get the following expression
1 = (2n+1)5000
-----------
(2n-1)7000
Solving the above expression, we get,
'''
n = 12000/4000
t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)
#Result
print "The required thickness is",round((t/1E-5),4),"*10^-5 cm"
import math
#Variable declaration
i = 30 #angle of incidence(degrees)
lamda = 5890*10**-8 #wavelength(cm)
u = 1.46 #refractive index
n = 8
#Calculations
r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))
t = (n*lamda)/(2*u*math.cos(r*math.pi/180))
#Result
print "The required thickness is",round((t/1E-4),3),"*10^-4 cm"
import math
#Variable declaration
r = 60 #angle of refraction(degrees)
lamda = 5890*10**-8 #wavelength(cm)
u = 1.5 #refractive index
n = 1 #for minimumm thickness
#Calculations
#For r = 60
t1 = (n*lamda)/(2*u*math.cos(r*math.pi/180))
#For normal incidence
r = 0
t2 = (n*lamda)/(2*u*math.cos(r*math.pi/180))
#Result
print "For r = 60, the required thickness is",round((t1/1E-5),2),"*10^-5 cm"
print "For r = 0, the required thickness is",round((t2/1E-5),2),"*10^-5 cm"
import math
#Variable declaration
r = 0 #for normal incidence(degrees)
lamda = 5.5*10**-5 #wavelength(cm)
n = 1 #for minimumm thickness
A = 10**4 #area(cm^2)
V = 0.2 #volume(cc)
#Calculations
t = V/A
#for nth dark band,
u = (n*lamda)/(2*t*math.cos(r*math.pi/180))
#Result
print "Refractive index =",u
import math
#Variable declaration
r = 60 #angle of incidence(degrees)
t = 2*10**-7 #thickness of film(cm)
u = 1.2
#Calculations & Result
for n in range(1,4):
lamda = (4*u*t*math.cos(r*math.pi/180))/(2*n-1)
print "For n = %d, wavelength = %.2f A"%(n,lamda/10**-10)
print "Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A"
#Variable declaration
a = 40. #angle(sec)
lamda = 1.2 #distance between fringes(cm)
alpha = 10 #no. of fringes
#Calculations
Bair = lamda/alpha #cm
alpha = (a*math.pi)/(3600*180) #radians
lamda = 2*alpha*Bair
#Result
print "Wavelength of monochromatic light =",round((lamda/1E-8),1),"A"
#Variable declaration
lamda = 5893*10**-8 #wavelength(cm)
u = 1.52 #refractive index
B = 0.1 #fringe spacing(cm)
#Calculations
alpha = (lamda/(2*u*B))*180*3600/math.pi #seconds
#Result
print "Angle of wedge =",round(alpha,2),"secs"
#Variable declaration
u = 1.4 #refractive index
B = 0.25 #fringe spacing(cm)
a = 20 #angle(secs)
#Calculations
alpha = (a*math.pi)/(3600*180) #radians
lamda = 2*u*alpha*B
#Result
print "Wavelength of light =",round((lamda/1E-8),2),"A"
#Variable declaration
u = 1.5 #refractive index
lamda = 5.82*10**-5 #wavelength(cm)
a = 20 #angle(secs)
#Calculations
alpha = (a*math.pi)/(3600*180) #radians
B = lamda/(2*u*alpha)
N = 1/B
#Result
print "Number of interfernce fronges pr cm is",round(N)
#Variable declaration
u = 1 #refractive index for air film
lamda = 6*10**-5 #wavelength(cm)
B = 1./10 #distance between fringes(cm)
#Calculations
alpha = lamda/(2*u*B) #radians
d = alpha*10
#Result
print "Daimeter of wire =",d,"cm"
alpha = 0.01*10**-1/10 #angle(radians)
u = 1 #refractive index for air film
lamda = 5900*10**-10 #wavlength(m)
#Calculation
B = lamda/(2*u*alpha)
#Result
print "Seperation between fringes is",B/10**-3,"mm"
#Variable declaration
n = 40
#Calculation
#Equating the equation 4*R*n*lamda=4*4R*n*lamda, we get
N = (4*4*n)/4
#result
print "Ring number =",N
#Variable declaration
n = 10
Dn = 0.5 #diameter of dark ring(cm)
lamda = 5*10**-5 #waelength(cm)
#Calculations
R = Dn**2/(4*n*lamda)
#Result
print "Radius of curvature =",R,"cm"
#Variable declaration
n = 5
p = 10
D5 = 0.336 #diameter of 5th ring(cm)
lamda = 5890*10**-8 #waelength(cm)
D15 = 0.59 #diameter of 15th ringcm
#Calculations
R = (D15**2-D5**2)/(4*p*lamda)
#Result
print "Radius of curvature =",round(R,2),"cm"
#Varaible declaration
Dn = 0.42 #diameter of dark ring(cm)
p = 8
R = 200 #radius of curvature(cm)
Dn8 = 0.7 #diameter of (n+8)th ring(cm)
#Calculations
lamda = (Dn8**2-Dn**2)/(4*R*p)
#Result
print "Wavelength =",lamda/1E-8,"A"
#Varaible declaration
Dn = 0.218 #cm
Dn10 = 0.451 #cm
lamda = 5893*10**-8 #wavelength(cm)
R = 90 #radius of curvature(cm)
p = 10
#Calculation
u = (4*p*lamda*R)/(Dn10**2-Dn**2)
#Result
print "Refractive index =",round(u,3)
#Varaible declaration
D5 = 0.42 #diameter of dark ring(cm)
#Calculations
'''
For 5th dark ring,
D5^2 = 20*R*lamda -----1
For 10th dark ring,
D10^2 = 40*R*lamda -----2
Substituting 1 in 2,
'''
D10 = math.sqrt((40*D5**2)/20)
#Result
print "Diameter of the 10th dark ring =",round(D10,3),"cm"
#Varaible declaration
lamda_n = 6000 #wavelength of nth ring(A)
lamda_n1 = 5000 #wavelength for (n+1)th ring(cm)
#Calculations
'''
Dn^2 = 4*R*n*lamda_n ---1
Dn+1^2 = 4*R(n+1)*lamda_n1 ---2
Equating 1 and 2, we get,
'''
n = 5
R = 2
Dn = math.sqrt(4*R*n*lamda_n*10**-8)
#Result
print "Diameter =",round(Dn,3),"cm"
#Varaible declaration
Dair = 2.3 #diameter of ring in air(cm)
Dliq = 2 #diameter of ring in liquid(cm)
#Calculations
u = Dair**2/Dliq**2
#Result
print "Refractive index =",u
D4 = 0.4 #diameter of 4th ring(cm)
D12 = 0.7 #diameter of 12th ring(cm)
#Calculations
'''
For D4,
D4 = math.sqrt(4R*4*lamda)
'''
rt_Rl = 0.1
R = 80
#For D20,
D20 = math.sqrt(R)*rt_Rl
#Result
print "Diameter of 20th ring =",round(D20,3),"cm"
#Variable declaration
n = 5
p = 10
D5 = 0.336 #diameter of 5th ring(cm)
D15 = 0.590 #diameter of 15th ring(cm)
R = 100 #radius of curvature(cm)
#Calculations
lamda = (D15**2-D5**2)/(4*R*p)
#Result
print "Wavlength =",lamda/1E-8,"A"
#Variable declaration
lamda = 560 #wavelength(nm)
u = 2 #refractive index
#Calculations
lamda_dash = lamda/u
t = lamda_dash/4
#Result
print "Thickness of film =",t,"nm"
#Variable declaration
lamda = 6000 #wavelength(E)
u = 1.2 #refractive index
#Calculations
lamda_dash = lamda/u
t = lamda_dash/4
#Result
print "Thickness of film =",t,"A"